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..72d0f0bf73e 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). Sort by (Name, insertion-idx) — this gives + // a stable order independent of intra-file walk timing AND matches what the + // #19732 baseline regeneration assumes ('.cctor' before '.ctor' alphabetically, + // overloads in name order). + // + // 2. Method bodies emitted by the DEFERRED codegen pass — primarily closure + // invokers (`Invoke@`, `MoveNext`) and other compiler-generated methods. + // Under `--parallelcompilation+` these are added in scheduler order, not source + // order. Their names always carry the compiler-generated '@' marker, so we sort + // them by name to get a stable order. + // + // 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 fst |> Seq.map snd |> List.ofSeq + + let sortedDeferred = deferredMethods |> Seq.sortBy fst |> Seq.map snd |> List.ofSeq + + sortedUser @ sortedDeferred + + // Fields and events MUST preserve insertion order. For struct types, the IL field + // declaration order determines physical memory layout (visible via Marshal.SizeOf, + // P/Invoke ABI, blittable interop). Sorting fields by name silently breaks any + // [] DU/Record whose runtime size or layout is observed. + // + // However, raw-data static fields generated by GenConstArray (IlxGen.fs:~3115) + // have the stable form "field@" where N is the source-order counter from + // mgbuf.GetOrAssignFieldCounter(m). Under --parallelcompilation+ these fields are + // emitted from deferred method-body codegen — so their insertion order into + // gfields races with other parallel emitters. Sort them by their numeric N to + // restore byte-identical IL across sequential and parallel codegen. The numeric + // suffix already encodes deterministic source order (assigned by + // PrimeStableNamesForCodegen). Anchor them after all user fields so user struct + // memory layout is unaffected. See https://github.com/dotnet/fsharp/issues/19928. + let preservedFields = + let isRawDataField (name: string) = + name.Length > 6 + && name.StartsWith("field", StringComparison.Ordinal) + && name.EndsWith("@", StringComparison.Ordinal) + && (let mid = name.Substring(5, name.Length - 6) + + mid.Length > 0 + && System.Linq.Enumerable.All(mid, fun (c: char) -> Char.IsDigit c)) + + let parseRawDataN (name: string) = + Int32.Parse(name.Substring(5, name.Length - 6)) + + let userFields = ResizeArray() + let rawFields = ResizeArray() + + for entry in gfields do + let struct (name, _) = fst entry + + if isRawDataField name then + rawFields.Add(parseRawDataN name, snd 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) + + let newVal = sortKey, (TypeDefBuilder(tdef, tdefDiscards), eliminateIfEmpty) - tdefs.AddOrUpdate(tdef.Name, [ newVal ], (fun key oldList -> newVal :: oldList)) + 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,40 @@ 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) + + 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 +2737,54 @@ 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', creating and registering it + /// the first time. Two inlined copies of the same TOp.Bytes site share the same source range + /// (and therefore the same static data field). The 'makeFspec' callback is invoked at most once + /// per source range and is responsible for emitting the field def and any associated type def. + member this.GetOrCreateRawDataFieldSpec(m: range, makeFspec: int -> ILFieldSpec) = + let key = struct (m.FileIndex, m.StartLine, m.StartColumn, m.EndLine, m.EndColumn) + + fieldSpecByRange.GetOrAdd( + key, + (fun _ -> + let counter = this.GetOrAssignFieldCounter(m) + makeFspec counter) + ) + + /// 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 +2794,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 +3175,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 +3185,25 @@ 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 fspec = + cgbuf.mgbuf.GetOrCreateRawDataFieldSpec( + m, + fun unique -> + let vtspec = cgbuf.mgbuf.GenerateRawDataValueType(eenv.cloc, bytes.Length) + let ilFieldName = CompilerGeneratedName $"field{unique}" + let fty = ILType.Value vtspec - 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 +3559,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 +4279,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 +6858,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 +7013,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 +7211,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 +7441,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 +7521,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 +7856,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 +10943,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 +11137,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 +11169,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 +12563,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 +12851,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 +13241,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..50e2625b38b 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 9168384 -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 7602176 -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..5506d62122f 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/StaticLet/StaticLetInUnionsAndRecords.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/StaticLet/StaticLetInUnionsAndRecords.fs @@ -272,8 +272,7 @@ let ``Static let record - generics - IL test`` compilation = compilation |> withLangVersion80 |> compile - |> verifyIL [""" .method private specialname rtspecialname static - void .cctor() cil managed + |> verifyIL [""" .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 @@ -291,6 +290,21 @@ let ``Static let record - generics - IL test`` compilation = IL_0030: ret } + .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 public static string GetMyName() cil managed { @@ -400,8 +414,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 +427,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 +447,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 +589,18 @@ 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 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 + } + + .method public specialname static int32 get_GetX() cil managed { .maxstack 8 @@ -583,18 +616,6 @@ Console.Write(MyTypes.X.GetX) IL_0016: ret } - .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 - } - .property int32 GetX() { .get int32 MyTypes.X::get_GetX() @@ -605,6 +626,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 +646,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 @@ -685,6 +716,17 @@ 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 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 + } + .method public specialname static int32 get_GetX() cil managed { @@ -701,17 +743,6 @@ Console.Write(MyTypes.X.GetX) IL_0016: ret } - .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 - } - .method assembly static void staticInitialization@() cil managed { 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..2572da31373 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 @@ -83,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 + } + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f1() cil managed { @@ -100,6 +111,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.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index f29f5d1d42a..774c96f5f6c 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 @@ -46,6 +46,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field static assembly initonly class assembly/assembly/f1@6 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/f1@6::.ctor() + IL_0005: stsfld class assembly/assembly/f1@6 assembly/assembly/f1@6::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -92,15 +101,17 @@ IL_0051: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/assembly/f1@6::.ctor() - IL_0005: stsfld class assembly/assembly/f1@6 assembly/assembly/f1@6::@_instance - IL_000a: 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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f1() 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.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 3f306577502..680d2b5e9a7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -83,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 + } + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f1() cil managed { @@ -98,17 +109,6 @@ 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 assembly static void staticInitialization@() cil managed { 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..00be811675f 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 @@ -46,6 +46,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field static assembly initonly class assembly/assembly/f1@6 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/f1@6::.ctor() + IL_0005: stsfld class assembly/assembly/f1@6 assembly/assembly/f1@6::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -92,21 +101,23 @@ IL_0051: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/assembly/f1@6::.ctor() - IL_0005: stsfld class assembly/assembly/f1@6 assembly/assembly/f1@6::@_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@10 .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::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f1() cil managed { @@ -134,17 +145,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::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/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index fe00078e075..1125ec61794 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,55 +171,15 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .method private specialname rtspecialname static void .cctor() cil managed { - .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 - } - + + .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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f2() cil managed @@ -194,6 +205,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.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index a86732cfe55..fdcab21e450 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,43 +160,15 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .method private specialname rtspecialname static void .cctor() 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_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 - } - + + .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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f2() 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..e97f3604490 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,55 +171,15 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .method private specialname rtspecialname static void .cctor() cil managed { - .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 - } - + + .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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f2() cil managed @@ -192,17 +203,6 @@ 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 assembly static void staticInitialization@() 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..7e6ab6f46e9 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,49 +160,21 @@ } - .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 .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::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f2() cil managed { @@ -196,17 +207,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::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/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 3cd259184db..04df1111552 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,53 @@ } + .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 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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f3() cil managed { @@ -160,6 +171,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.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index c8d7cdc2080..caa59f64218 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,43 +37,19 @@ 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> + .class auto ansi serializable sealed nested assembly beforefieldinit f3@5 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .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 + .field static assembly initonly class assembly/assembly/f3@5 @_instance + .method private specialname rtspecialname static void .cctor() 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 + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/f3@5::.ctor() + IL_0005: stsfld class assembly/assembly/f3@5 assembly/assembly/f3@5::@_instance + IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f3@5 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field static assembly initonly class assembly/assembly/f3@5 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -123,17 +99,52 @@ IL_0045: ret } - .method private specialname rtspecialname static void .cctor() cil managed + } + + .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 10 - IL_0000: newobj instance void assembly/assembly/f3@5::.ctor() - IL_0005: stsfld class assembly/assembly/f3@5 assembly/assembly/f3@5::@_instance - IL_000a: ret + .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 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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f3() 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..8ff82041440 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,53 @@ } + .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 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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f3() cil managed { @@ -158,17 +169,6 @@ 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 assembly static void staticInitialization@() 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..58e84a05bdc 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,43 +37,19 @@ 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> + .class auto ansi serializable sealed nested assembly beforefieldinit f3@5 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .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 + .field static assembly initonly class assembly/assembly/f3@5 @_instance + .method private specialname rtspecialname static void .cctor() 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 + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/f3@5::.ctor() + IL_0005: stsfld class assembly/assembly/f3@5 assembly/assembly/f3@5::@_instance + IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f3@5 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field static assembly initonly class assembly/assembly/f3@5 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -123,13 +99,37 @@ IL_0045: ret } - .method private specialname rtspecialname static void .cctor() cil managed + } + + .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 10 - IL_0000: newobj instance void assembly/assembly/f3@5::.ctor() - IL_0005: stsfld class assembly/assembly/f3@5 assembly/assembly/f3@5::@_instance - IL_000a: ret + .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 } } @@ -138,6 +138,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 class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation@12 .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::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f3() cil managed { @@ -165,17 +176,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::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/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 348b1d1471d..83c8c93ef21 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,76 +231,65 @@ .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 } } + .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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f4() cil managed { @@ -296,6 +307,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.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index c204c7e95a1..447529d2393 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 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 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 + } + + } + + .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,103 +265,15 @@ } - .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> + .method private specialname rtspecialname static void .cctor() cil managed { - .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 - } - + + .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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f4() 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..c0d43052e8f 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,76 +231,65 @@ .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 } } + .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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f4() cil managed { @@ -294,17 +305,6 @@ 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 assembly static void staticInitialization@() cil managed { 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..28493ff2f02 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 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 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 + } + + } + + .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,109 +265,21 @@ } - .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 .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::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f4() cil managed { @@ -296,17 +307,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::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/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 1c4d13e1c30..7268ed6e2bc 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,12 +222,99 @@ } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() cil managed + .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 private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::es@4 - 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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f7() cil managed @@ -329,6 +332,14 @@ IL_0014: ret } + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::es@4 + IL_0005: 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..ad989c00ac9 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 @@ -46,44 +46,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field static assembly initonly class assembly/assembly/'f7@6-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 ) - - .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 _arg1) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) - IL_0000: ldstr "hello" - 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 "hello 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 { @@ -93,12 +55,6 @@ IL_000a: ret } - } - - .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 ) @@ -110,12 +66,12 @@ IL_0006: 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.FSharpAsync`1 Invoke(int32 _arg1) cil managed { .maxstack 6 .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) - IL_0000: ldstr "goodbye" + IL_0000: ldstr "hello" 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() @@ -123,7 +79,7 @@ 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_0017: ldstr "hello 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() @@ -137,54 +93,6 @@ 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' @@ -269,6 +177,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field static assembly initonly class assembly/assembly/f7@6 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/f7@6::.ctor() + IL_0005: stsfld class assembly/assembly/f7@6 assembly/assembly/f7@6::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -309,23 +226,109 @@ IL_003a: ret } + } + + .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 private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/assembly/f7@6::.ctor() - IL_0005: stsfld class assembly/assembly/f7@6 assembly/assembly/f7@6::@_instance + 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 } + .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 public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() cil managed + .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 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 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 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::es@4 - 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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f7() cil managed @@ -339,6 +342,14 @@ IL_0011: ret } + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::es@4 + IL_0005: 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..f422d257a4e 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,14 +222,101 @@ } + .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 + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly/assembly::es@4 - 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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f7() cil managed @@ -331,15 +334,12 @@ IL_0014: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() 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.Collections.FSharpList`1 assembly/assembly::es@4 + IL_0005: ret } .method assembly static void staticInitialization@() 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..8067ecf065b 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 @@ -46,44 +46,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field static assembly initonly class assembly/assembly/'f7@6-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 ) - - .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 _arg1) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) - IL_0000: ldstr "hello" - 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 "hello 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 { @@ -93,12 +55,6 @@ IL_000a: ret } - } - - .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 ) @@ -110,12 +66,12 @@ IL_0006: 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.FSharpAsync`1 Invoke(int32 _arg1) cil managed { .maxstack 6 .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) - IL_0000: ldstr "goodbye" + IL_0000: ldstr "hello" 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() @@ -123,7 +79,7 @@ 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_0017: ldstr "hello 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() @@ -137,54 +93,6 @@ 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' @@ -269,6 +177,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field static assembly initonly class assembly/assembly/f7@6 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/f7@6::.ctor() + IL_0005: stsfld class assembly/assembly/f7@6 assembly/assembly/f7@6::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -309,15 +226,98 @@ IL_003a: ret } + } + + .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 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 + } + + .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 + } + + } + + .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 private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/assembly/f7@6::.ctor() - IL_0005: stsfld class assembly/assembly/f7@6 assembly/assembly/f7@6::@_instance + 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 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 + } + } .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 es@4 @@ -326,12 +326,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 class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation@13 .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 + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly/assembly::es@4 - 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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f7() cil managed @@ -345,31 +348,28 @@ IL_0011: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::arg@1 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly/assembly::es@4 IL_0005: 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..b9ab0d7ba11 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,54 +622,53 @@ } - .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 } } + .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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f2() cil managed { @@ -690,6 +701,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.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index fe7a8801068..7e4f33ed538 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,43 +37,19 @@ 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> + .class auto ansi serializable sealed nested assembly beforefieldinit f2@5 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .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 + .field static assembly initonly class assembly/assembly/f2@5 @_instance + .method private specialname rtspecialname static void .cctor() 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 + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/f2@5::.ctor() + IL_0005: stsfld class assembly/assembly/f2@5 assembly/assembly/f2@5::@_instance + IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f2@5 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field static assembly initonly class assembly/assembly/f2@5 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -123,18 +99,9 @@ IL_0045: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/assembly/f2@5::.ctor() - IL_0005: stsfld class assembly/assembly/f2@5 assembly/assembly/f2@5::@_instance - IL_000a: ret - } - } - .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,20 @@ } - .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 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 + } + + .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 +155,68 @@ .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 } } - .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,19 @@ } - .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 private specialname rtspecialname static void .cctor() 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 + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -455,11 +432,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 +444,65 @@ 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 + } + + .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 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 + .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@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 @@ -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,49 +548,48 @@ } - .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 + 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 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.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 + .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 } - .method private specialname rtspecialname static void .cctor() 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 - } + } + .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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f2() 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..bcacee9a207 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,54 +622,53 @@ } - .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 } } + .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 public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f2() cil managed { @@ -688,17 +699,6 @@ 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 assembly static void staticInitialization@() cil managed { 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..5d9ea05cf3b 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,43 +37,19 @@ 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> + .class auto ansi serializable sealed nested assembly beforefieldinit f2@5 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .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 + .field static assembly initonly class assembly/assembly/f2@5 @_instance + .method private specialname rtspecialname static void .cctor() 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 + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/f2@5::.ctor() + IL_0005: stsfld class assembly/assembly/f2@5 assembly/assembly/f2@5::@_instance + IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f2@5 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field static assembly initonly class assembly/assembly/f2@5 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -123,18 +99,9 @@ IL_0045: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/assembly/f2@5::.ctor() - IL_0005: stsfld class assembly/assembly/f2@5 assembly/assembly/f2@5::@_instance - IL_000a: ret - } - } - .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,20 @@ } - .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 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 + } + + .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 +155,68 @@ .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 } } - .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,19 @@ } - .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 private specialname rtspecialname static void .cctor() 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 + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -455,11 +432,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 +444,65 @@ 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 + } + + .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 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 + .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@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 @@ -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 } } @@ -585,6 +585,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 class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation@22 .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::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f2() cil managed { @@ -623,17 +634,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::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/AttributeTargets/Default.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.RealInternalSignatureOff.il.bsl index 7ab702c8659..631879f89aa 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 @@ -51,6 +51,17 @@ } + .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 + } + .method public specialname static int32 get_T() cil managed { @@ -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..fe6ed58c416 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 @@ -54,14 +54,6 @@ .field static assembly int32 T@12 .custom instance void M/ExportAttribute::.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 ) - .method public specialname static int32 get_T() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 M::T@12 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -73,6 +65,14 @@ IL_000c: ret } + .method public specialname static int32 get_T() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 M::T@12 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { @@ -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..da39504a86e 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 @@ -51,6 +51,17 @@ } + .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 + } + .method public specialname static int32 get_T() cil managed { @@ -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..748697a7b5a 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 @@ -54,14 +54,6 @@ .field static assembly int32 T@12 .custom instance void M/ExportAttribute::.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 ) - .method public specialname static int32 get_T() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 M::T@12 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -73,6 +65,14 @@ IL_000c: ret } + .method public specialname static int32 get_T() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 M::T@12 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { @@ -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..5b739c190a7 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 @@ -51,6 +51,17 @@ } + .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 + } + .method public specialname static int32 get_T() cil managed { @@ -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..0f48c7897ef 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 @@ -53,14 +53,6 @@ .field static assembly int32 T@12 .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 int32 get_T() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 M::T@12 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -72,6 +64,14 @@ IL_000c: ret } + .method public specialname static int32 get_T() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 M::T@12 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { @@ -115,4 +115,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOff.il.net472.bsl index 7f56357adaa..ebe885ba690 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOff.il.net472.bsl @@ -61,7 +61,7 @@ [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 ) + 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 @@ -97,9 +97,9 @@ .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 16 43 43 74 6F 72 44 55 57 69 - 74 68 4D 65 6D 62 65 72 30 31 61 2B 43 00 00 ) + .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 16 43 43 74 6F 72 44 55 57 69 + 74 68 4D 65 6D 62 65 72 30 31 61 2B 43 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 ) @@ -112,94 +112,6 @@ IL_000d: ret } - .method public static class assembly/C get_A() 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 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/C assembly/C::_unique_A - IL_0005: ret - } - - .method public hidebysig instance bool get_IsA() 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/C::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret - } - - .method public static class assembly/C get_B() 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 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/C assembly/C::_unique_B - IL_0005: ret - } - - .method public hidebysig instance bool get_IsB() 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/C::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/C::_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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/C>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -306,36 +218,6 @@ 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 - IL_0001: brfalse.s IL_000c - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: ldfld int32 assembly/C::_tag - IL_000b: ret - - 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/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/C obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -397,17 +279,6 @@ IL_0014: ret } - .method public hidebysig specialname instance int32 get_P() cil managed - { - - .maxstack 3 - .locals init (class assembly/C V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.1 - IL_0003: ret - } - .method public hidebysig virtual final instance bool Equals(class assembly/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -464,6 +335,135 @@ IL_0013: 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 + IL_0001: brfalse.s IL_000c + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 assembly/C::_tag + IL_000b: ret + + 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/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/C>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/C get_A() 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 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/C assembly/C::_unique_A + IL_0005: ret + } + + .method public static class assembly/C get_B() 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 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/C assembly/C::_unique_B + IL_0005: ret + } + + .method public hidebysig instance bool get_IsA() 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/C::get_Tag() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } + + .method public hidebysig instance bool get_IsB() 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/C::get_Tag() + IL_0006: ldc.i4.1 + IL_0007: ceq + IL_0009: ret + } + + .method public hidebysig specialname instance int32 get_P() cil managed + { + + .maxstack 3 + .locals init (class assembly/C V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.1 + IL_0003: 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/C::_tag + IL_0006: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -507,6 +507,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 + } + .method public specialname static class assembly/C get_e2() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -542,97 +553,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..ebe885ba690 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 @@ -112,94 +112,6 @@ IL_000d: ret } - .method public static class assembly/C get_A() 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 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/C assembly/C::_unique_A - IL_0005: ret - } - - .method public hidebysig instance bool get_IsA() 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/C::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret - } - - .method public static class assembly/C get_B() 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 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/C assembly/C::_unique_B - IL_0005: ret - } - - .method public hidebysig instance bool get_IsB() 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/C::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/C::_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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/C>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -306,36 +218,6 @@ 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 - IL_0001: brfalse.s IL_000c - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: ldfld int32 assembly/C::_tag - IL_000b: ret - - 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/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/C obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -397,17 +279,6 @@ IL_0014: ret } - .method public hidebysig specialname instance int32 get_P() cil managed - { - - .maxstack 3 - .locals init (class assembly/C V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.1 - IL_0003: ret - } - .method public hidebysig virtual final instance bool Equals(class assembly/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -464,6 +335,135 @@ IL_0013: 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 + IL_0001: brfalse.s IL_000c + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 assembly/C::_tag + IL_000b: ret + + 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/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/C>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/C get_A() 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 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/C assembly/C::_unique_A + IL_0005: ret + } + + .method public static class assembly/C get_B() 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 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/C assembly/C::_unique_B + IL_0005: ret + } + + .method public hidebysig instance bool get_IsA() 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/C::get_Tag() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } + + .method public hidebysig instance bool get_IsB() 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/C::get_Tag() + IL_0006: ldc.i4.1 + IL_0007: ceq + IL_0009: ret + } + + .method public hidebysig specialname instance int32 get_P() cil managed + { + + .maxstack 3 + .locals init (class assembly/C V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.1 + IL_0003: 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/C::_tag + IL_0006: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -507,6 +507,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 + } + .method public specialname static class assembly/C get_e2() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -546,4 +557,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.net472.bsl index 0d32a2de1dd..7d8851eed67 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.net472.bsl @@ -61,7 +61,7 @@ [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 ) + 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 @@ -97,9 +97,9 @@ .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 16 43 43 74 6F 72 44 55 57 69 - 74 68 4D 65 6D 62 65 72 30 31 61 2B 43 00 00 ) + .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 16 43 43 74 6F 72 44 55 57 69 + 74 68 4D 65 6D 62 65 72 30 31 61 2B 43 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 ) @@ -112,94 +112,6 @@ IL_000d: ret } - .method public static class assembly/C get_A() 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 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/C assembly/C::_unique_A - IL_0005: ret - } - - .method public hidebysig instance bool get_IsA() 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/C::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret - } - - .method public static class assembly/C get_B() 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 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/C assembly/C::_unique_B - IL_0005: ret - } - - .method public hidebysig instance bool get_IsB() 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/C::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/C::_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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/C>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -306,36 +218,6 @@ 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 - IL_0001: brfalse.s IL_000c - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: ldfld int32 assembly/C::_tag - IL_000b: ret - - 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/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/C obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -397,17 +279,6 @@ IL_0014: ret } - .method public hidebysig specialname instance int32 get_P() cil managed - { - - .maxstack 3 - .locals init (class assembly/C V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.1 - IL_0003: ret - } - .method public hidebysig virtual final instance bool Equals(class assembly/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -464,6 +335,135 @@ IL_0013: 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 + IL_0001: brfalse.s IL_000c + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 assembly/C::_tag + IL_000b: ret + + 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/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/C>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/C get_A() 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 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/C assembly/C::_unique_A + IL_0005: ret + } + + .method public static class assembly/C get_B() 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 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/C assembly/C::_unique_B + IL_0005: ret + } + + .method public hidebysig instance bool get_IsA() 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/C::get_Tag() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } + + .method public hidebysig instance bool get_IsB() 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/C::get_Tag() + IL_0006: ldc.i4.1 + IL_0007: ceq + IL_0009: ret + } + + .method public hidebysig specialname instance int32 get_P() cil managed + { + + .maxstack 3 + .locals init (class assembly/C V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.1 + IL_0003: 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/C::_tag + IL_0006: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -528,97 +528,6 @@ { } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..7d8851eed67 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 @@ -112,94 +112,6 @@ IL_000d: ret } - .method public static class assembly/C get_A() 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 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/C assembly/C::_unique_A - IL_0005: ret - } - - .method public hidebysig instance bool get_IsA() 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/C::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret - } - - .method public static class assembly/C get_B() 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 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/C assembly/C::_unique_B - IL_0005: ret - } - - .method public hidebysig instance bool get_IsB() 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/C::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/C::_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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/C>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -306,36 +218,6 @@ 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 - IL_0001: brfalse.s IL_000c - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: ldfld int32 assembly/C::_tag - IL_000b: ret - - 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/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/C obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -397,17 +279,6 @@ IL_0014: ret } - .method public hidebysig specialname instance int32 get_P() cil managed - { - - .maxstack 3 - .locals init (class assembly/C V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.1 - IL_0003: ret - } - .method public hidebysig virtual final instance bool Equals(class assembly/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -464,6 +335,135 @@ IL_0013: 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 + IL_0001: brfalse.s IL_000c + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 assembly/C::_tag + IL_000b: ret + + 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/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/C>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/C get_A() 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 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/C assembly/C::_unique_A + IL_0005: ret + } + + .method public static class assembly/C get_B() 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 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/C assembly/C::_unique_B + IL_0005: ret + } + + .method public hidebysig instance bool get_IsA() 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/C::get_Tag() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } + + .method public hidebysig instance bool get_IsB() 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/C::get_Tag() + IL_0006: ldc.i4.1 + IL_0007: ceq + IL_0009: ret + } + + .method public hidebysig specialname instance int32 get_P() cil managed + { + + .maxstack 3 + .locals init (class assembly/C V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.1 + IL_0003: 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/C::_tag + IL_0006: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -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..30776ba3769 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 @@ -56,6 +56,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 + } + .method public specialname static int32 get_x() cil managed { @@ -81,6 +92,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 + } + .method public specialname static int32 get_y() cil managed { @@ -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..ca2f2720154 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 @@ -58,6 +58,17 @@ .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 int32 x@7 .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::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method public specialname static int32 get_x() cil managed { @@ -75,17 +86,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 { @@ -110,14 +110,6 @@ .field static assembly int32 y@9 .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 int32 get_y() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::y@9 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -129,6 +121,14 @@ IL_000c: ret } + .method public specialname static int32 get_y() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 assembly::y@9 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { @@ -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..f7a473cf60d 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 @@ -52,6 +52,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 + } + .method public specialname static int32 get_x() cil managed { @@ -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..8491ab3da8a 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 @@ -54,6 +54,17 @@ .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 int32 x@3 .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::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method public specialname static int32 get_x() cil managed { @@ -71,17 +82,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 { @@ -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..a5d29c4d180 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 @@ -62,6 +73,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 + } + .method public specialname static int32 get_x() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -101,4 +123,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.bsl index 6c6892a055a..8d19cf5c44a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -48,17 +49,6 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.AbstractClassAttribute::.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 public hidebysig abstract virtual - instance int32 A1(int32 A_1, - int32 A_2) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - } - - .method public hidebysig abstract virtual instance int32 A2(int32 A_1) cil managed - { - } - .method public specialname rtspecialname instance void .ctor() cil managed { @@ -70,17 +60,16 @@ IL_0008: ret } - .method public hidebysig specialname instance int32 get_P() cil managed + .method public hidebysig abstract virtual instance int32 A1(int32 A_1, int32 A_2) cil managed { - - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: ret + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) } - .method public hidebysig instance int32 - M1(int32 x, - int32 y) cil managed + .method public hidebysig abstract virtual instance int32 A2(int32 A_1) cil managed + { + } + + .method public hidebysig instance int32 M1(int32 x, int32 y) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -99,6 +88,14 @@ IL_0001: ret } + .method public hidebysig specialname instance int32 get_P() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.1 + IL_0001: ret + } + .property instance int32 P() { .get instance int32 Program/C::get_P() @@ -149,9 +146,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -167,29 +162,7 @@ IL_000b: 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 8 - IL_0000: ldc.i4.0 - IL_0001: 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: call instance int32 Program/S::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(valuetype Program/S obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype Program/S obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -201,9 +174,7 @@ IL_0004: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -232,14 +203,6 @@ IL_001e: ret } - .method public hidebysig instance !!a M1(!!a x) cil managed preservesig - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype Program/S obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -279,6 +242,34 @@ IL_001d: 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 8 + IL_0000: ldc.i4.0 + IL_0001: 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: call instance int32 Program/S::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance !!a M1(!!a x) cil managed preservesig + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + } .class interface abstract auto ansi serializable nested public ITestInterface @@ -308,7 +299,7 @@ .method private hidebysig newslot virtual final instance int32 Program.ITestInterface.M(int32 x) cil managed { - .custom instance void [runtime]System.Runtime.InteropServices.PreserveSigAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime.InteropServices]System.Runtime.InteropServices.PreserveSigAttribute::.ctor() = ( 01 00 00 00 ) .override Program/ITestInterface::M .maxstack 8 @@ -320,6 +311,17 @@ } + .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 + } + .method public static int32 f1(int32 x, int32 y) cil managed { @@ -383,4 +385,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..bf7db82cf68 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 @@ -39,15 +39,6 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.AbstractClassAttribute::.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 public hidebysig abstract virtual instance int32 A1(int32 A_1, int32 A_2) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - } - - .method public hidebysig abstract virtual instance int32 A2(int32 A_1) cil managed - { - } - .method public specialname rtspecialname instance void .ctor() cil managed { @@ -59,12 +50,13 @@ IL_0008: ret } - .method public hidebysig specialname instance int32 get_P() cil managed + .method public hidebysig abstract virtual instance int32 A1(int32 A_1, int32 A_2) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + } + + .method public hidebysig abstract virtual instance int32 A2(int32 A_1) cil managed { - - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: ret } .method public hidebysig instance int32 M1(int32 x, int32 y) cil managed @@ -86,6 +78,14 @@ IL_0001: ret } + .method public hidebysig specialname instance int32 get_P() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.1 + IL_0001: ret + } + .property instance int32 P() { .get instance int32 Program/C::get_P() @@ -152,26 +152,6 @@ IL_000b: 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 8 - IL_0000: ldc.i4.0 - IL_0001: 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: call instance int32 Program/S::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype Program/S obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -213,14 +193,6 @@ IL_001e: ret } - .method public hidebysig instance !!a M1(!!a x) cil managed preservesig - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype Program/S obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -260,6 +232,34 @@ IL_001d: 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 8 + IL_0000: ldc.i4.0 + IL_0001: 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: call instance int32 Program/S::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance !!a M1(!!a x) cil managed preservesig + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + } .class interface abstract auto ansi serializable nested public ITestInterface @@ -301,6 +301,17 @@ } + .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 + } + .method public static int32 f1(int32 x, int32 y) cil managed { @@ -364,4 +375,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.bsl index 39585f9e6e3..d324c8de208 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -48,17 +49,6 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.AbstractClassAttribute::.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 public hidebysig abstract virtual - instance int32 A1(int32 A_1, - int32 A_2) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - } - - .method public hidebysig abstract virtual instance int32 A2(int32 A_1) cil managed - { - } - .method public specialname rtspecialname instance void .ctor() cil managed { @@ -70,17 +60,16 @@ IL_0008: ret } - .method public hidebysig specialname instance int32 get_P() cil managed + .method public hidebysig abstract virtual instance int32 A1(int32 A_1, int32 A_2) cil managed { - - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: ret + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) } - .method public hidebysig instance int32 - M1(int32 x, - int32 y) cil managed + .method public hidebysig abstract virtual instance int32 A2(int32 A_1) cil managed + { + } + + .method public hidebysig instance int32 M1(int32 x, int32 y) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -99,6 +88,14 @@ IL_0001: ret } + .method public hidebysig specialname instance int32 get_P() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.1 + IL_0001: ret + } + .property instance int32 P() { .get instance int32 Program/C::get_P() @@ -149,9 +146,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -167,29 +162,7 @@ IL_000b: 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 8 - IL_0000: ldc.i4.0 - IL_0001: 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: call instance int32 Program/S::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(valuetype Program/S obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype Program/S obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -201,9 +174,7 @@ IL_0004: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -232,14 +203,6 @@ IL_001e: ret } - .method public hidebysig instance !!a M1(!!a x) cil managed preservesig - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype Program/S obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -279,6 +242,34 @@ IL_001d: 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 8 + IL_0000: ldc.i4.0 + IL_0001: 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: call instance int32 Program/S::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance !!a M1(!!a x) cil managed preservesig + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + } .class interface abstract auto ansi serializable nested public ITestInterface @@ -308,7 +299,7 @@ .method private hidebysig newslot virtual final instance int32 Program.ITestInterface.M(int32 x) cil managed { - .custom instance void [runtime]System.Runtime.InteropServices.PreserveSigAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime.InteropServices]System.Runtime.InteropServices.PreserveSigAttribute::.ctor() = ( 01 00 00 00 ) .override Program/ITestInterface::M .maxstack 8 @@ -322,6 +313,17 @@ .field static assembly class Program/ITestInterface a@49 .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 ''.$Program::init@ + IL_0006: ldsfld int32 ''.$Program::init@ + IL_000b: pop + IL_000c: ret + } + .method public static int32 f1(int32 x, int32 y) cil managed { @@ -350,17 +352,6 @@ 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 - } - .method assembly static void staticInitialization@() cil managed { @@ -399,4 +390,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..035fdbeb4df 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 @@ -39,15 +39,6 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.AbstractClassAttribute::.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 public hidebysig abstract virtual instance int32 A1(int32 A_1, int32 A_2) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - } - - .method public hidebysig abstract virtual instance int32 A2(int32 A_1) cil managed - { - } - .method public specialname rtspecialname instance void .ctor() cil managed { @@ -59,12 +50,13 @@ IL_0008: ret } - .method public hidebysig specialname instance int32 get_P() cil managed + .method public hidebysig abstract virtual instance int32 A1(int32 A_1, int32 A_2) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + } + + .method public hidebysig abstract virtual instance int32 A2(int32 A_1) cil managed { - - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: ret } .method public hidebysig instance int32 M1(int32 x, int32 y) cil managed @@ -86,6 +78,14 @@ IL_0001: ret } + .method public hidebysig specialname instance int32 get_P() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.1 + IL_0001: ret + } + .property instance int32 P() { .get instance int32 Program/C::get_P() @@ -152,26 +152,6 @@ IL_000b: 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 8 - IL_0000: ldc.i4.0 - IL_0001: 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: call instance int32 Program/S::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype Program/S obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -213,14 +193,6 @@ IL_001e: ret } - .method public hidebysig instance !!a M1(!!a x) cil managed preservesig - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype Program/S obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -260,6 +232,34 @@ IL_001d: 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 8 + IL_0000: ldc.i4.0 + IL_0001: 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: call instance int32 Program/S::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance !!a M1(!!a x) cil managed preservesig + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + } .class interface abstract auto ansi serializable nested public ITestInterface @@ -303,6 +303,17 @@ .field static assembly class Program/ITestInterface a@49 .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 ''.$Program::init@ + IL_0006: ldsfld int32 ''.$Program::init@ + IL_000b: pop + IL_000c: ret + } + .method public static int32 f1(int32 x, int32 y) cil managed { @@ -331,17 +342,6 @@ 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 - } - .method assembly static void staticInitialization@() cil managed { @@ -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..b924956c845 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs.il.bsl @@ -68,23 +68,23 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.AutoOpenAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) .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 public static void UseCosmosDb(class Program/Builder builder, - [opt] bool storeScopesAndAppsInMemory) cil managed + .method public static void Builder.UseCosmosDb(class Program/Builder builder, + class [runtime]System.Action`1 configuration) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationSourceNameAttribute::.ctor(string) = ( 01 00 0B 55 73 65 43 6F 73 6D 6F 73 44 62 00 00 ) - .param [2] = bool(false) .maxstack 8 IL_0000: ret } - .method public static void Builder.UseCosmosDb(class Program/Builder builder, - class [runtime]System.Action`1 configuration) cil managed + .method public static void UseCosmosDb(class Program/Builder builder, + [opt] bool storeScopesAndAppsInMemory) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationSourceNameAttribute::.ctor(string) = ( 01 00 0B 55 73 65 43 6F 73 6D 6F 73 44 62 00 00 ) + .param [2] = bool(false) .maxstack 8 IL_0000: ret @@ -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..fc89f770a7a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs.il.bsl @@ -66,21 +66,21 @@ 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 public static int32 Renamed(class Program/Builder builder, - int32 i) cil managed + .method public static string Builder.UseDb(class Program/Builder builder, + string s) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationSourceNameAttribute::.ctor(string) = ( 01 00 05 55 73 65 44 62 00 00 ) .maxstack 8 IL_0000: ldarg.1 IL_0001: ret } - .method public static string Builder.UseDb(class Program/Builder builder, - string s) cil managed + .method public static int32 Renamed(class Program/Builder builder, + int32 i) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationSourceNameAttribute::.ctor(string) = ( 01 00 05 55 73 65 44 62 00 00 ) .maxstack 8 IL_0000: ldarg.1 @@ -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..2cb1708247e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field static assembly initonly class assembly/f33@47 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/f33@47::.ctor() + IL_0005: stsfld class assembly/f33@47 assembly/f33@47::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -58,21 +67,21 @@ IL_0008: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f33@47-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'f33@47-1' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/f33@47::.ctor() - IL_0005: stsfld class assembly/f33@47 assembly/f33@47::@_instance + IL_0000: newobj instance void assembly/'f33@47-1'::.ctor() + IL_0005: stsfld class assembly/'f33@47-1' assembly/'f33@47-1'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f33@47-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'f33@47-1' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -92,21 +101,21 @@ IL_0001: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit f34@48 + 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 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'f33@47-1'::.ctor() - IL_0005: stsfld class assembly/'f33@47-1' assembly/'f33@47-1'::@_instance + IL_0000: newobj instance void assembly/f34@48::.ctor() + IL_0005: stsfld class assembly/f34@48 assembly/f34@48::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f34@48 - 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 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -128,21 +137,21 @@ IL_0008: 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> + { + .field static assembly initonly class assembly/'f34@48-2' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/f34@48::.ctor() - IL_0005: stsfld class assembly/f34@48 assembly/f34@48::@_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-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .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 ) @@ -150,18 +159,26 @@ .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 } + } + + .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-1' @_instance .method private specialname rtspecialname static void .cctor() cil managed { @@ -171,12 +188,6 @@ 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> - { - .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 ) @@ -184,35 +195,33 @@ .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 } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f34@48-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'f34@48-3' @_instance .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-3'::.ctor() + IL_0005: stsfld class assembly/'f34@48-3' assembly/'f34@48-3'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f34@48-3' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'f34@48-3' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -232,21 +241,21 @@ IL_0001: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit f35@49 + 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 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'f34@48-3'::.ctor() - IL_0005: stsfld class assembly/'f34@48-3' assembly/'f34@48-3'::@_instance + IL_0000: newobj instance void assembly/f35@49::.ctor() + IL_0005: stsfld class assembly/f35@49 assembly/f35@49::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f35@49 - 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 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -268,21 +277,21 @@ IL_0008: 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> + { + .field static assembly initonly class assembly/'f35@49-2' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/f35@49::.ctor() - IL_0005: stsfld class assembly/f35@49 assembly/f35@49::@_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-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .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 ) @@ -290,18 +299,26 @@ .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 } + } + + .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-1' @_instance .method private specialname rtspecialname static void .cctor() cil managed { @@ -311,12 +328,6 @@ 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> - { - .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 ) @@ -324,35 +335,33 @@ .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 } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f35@49-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'f35@49-3' @_instance .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-3'::.ctor() + IL_0005: stsfld class assembly/'f35@49-3' assembly/'f35@49-3'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f35@49-3' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'f35@49-3' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -372,15 +381,6 @@ IL_0001: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/'f35@49-3'::.ctor() - IL_0005: stsfld class assembly/'f35@49-3' assembly/'f35@49-3'::@_instance - IL_000a: ret - } - } .method public static int32[] f0(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1148,333 +1148,27 @@ IL_0030: ret } - .method public static int32[] f2() cil managed - { - - .maxstack 8 - IL_0000: call !!0[] [runtime]System.Array::Empty() - IL_0005: ret - } - - .method public static int32[] f3() cil managed + .method public static int32[] f10(int32 finish) cil managed { .maxstack 5 - .locals init (int32[] V_0, + .locals init (uint64 V_0, uint64 V_1, - int32 V_2, - int32 V_3, - native int V_4, - int32[] V_5) - IL_0000: ldc.i4.s 10 - IL_0002: conv.i8 - IL_0003: conv.ovf.i.un - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: conv.i8 - IL_000c: stloc.1 - IL_000d: ldc.i4.1 - IL_000e: stloc.2 - IL_000f: br.s IL_0029 - - IL_0011: ldloc.2 - IL_0012: stloc.3 - IL_0013: ldloc.0 - IL_0014: ldloc.1 - IL_0015: conv.i - IL_0016: stloc.s V_4 - IL_0018: stloc.s V_5 - IL_001a: ldloc.s V_5 - IL_001c: ldloc.s V_4 - IL_001e: ldloc.3 - IL_001f: stelem.i4 - IL_0020: ldloc.2 - IL_0021: ldc.i4.1 - IL_0022: add - IL_0023: stloc.2 - IL_0024: ldloc.1 - IL_0025: ldc.i4.1 - IL_0026: conv.i8 - IL_0027: add - IL_0028: stloc.1 - IL_0029: ldloc.1 - IL_002a: ldc.i4.s 10 - IL_002c: conv.i8 - IL_002d: blt.un.s IL_0011 + int32[] V_2, + uint64 V_3, + int32 V_4, + int32 V_5, + native int V_6, + int32[] V_7) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldc.i4.1 + IL_0003: bge.s IL_000a - IL_002f: ldloc.0 - IL_0030: ret - } - - .method public static int32[] f4() cil managed - { - - .maxstack 5 - .locals init (int32[] V_0, - uint64 V_1, - int32 V_2, - int32 V_3, - native int V_4, - int32[] V_5) - IL_0000: ldc.i4.5 - IL_0001: conv.i8 - IL_0002: conv.ovf.i.un - IL_0003: newarr [runtime]System.Int32 - IL_0008: stloc.0 - IL_0009: ldc.i4.0 - IL_000a: conv.i8 - IL_000b: stloc.1 - IL_000c: ldc.i4.1 - IL_000d: stloc.2 - IL_000e: br.s IL_0028 - - IL_0010: ldloc.2 - IL_0011: stloc.3 - IL_0012: ldloc.0 - IL_0013: ldloc.1 - IL_0014: conv.i - IL_0015: stloc.s V_4 - IL_0017: stloc.s V_5 - IL_0019: ldloc.s V_5 - IL_001b: ldloc.s V_4 - IL_001d: ldloc.3 - IL_001e: stelem.i4 - IL_001f: ldloc.2 - IL_0020: ldc.i4.2 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.1 - IL_0024: ldc.i4.1 - IL_0025: conv.i8 - IL_0026: add - IL_0027: stloc.1 - IL_0028: ldloc.1 - IL_0029: ldc.i4.5 - IL_002a: conv.i8 - IL_002b: blt.un.s IL_0010 - - IL_002d: ldloc.0 - IL_002e: ret - } - - .method public static int32[] f5() cil managed - { - - .maxstack 8 - IL_0000: call !!0[] [runtime]System.Array::Empty() - IL_0005: ret - } - - .method public static int32[] f6() cil managed - { - - .maxstack 8 - IL_0000: call !!0[] [runtime]System.Array::Empty() - IL_0005: ret - } - - .method public static int32[] f7() cil managed - { - - .maxstack 5 - .locals init (int32[] V_0, - uint64 V_1, - int32 V_2, - int32 V_3, - native int V_4, - int32[] V_5) - IL_0000: ldc.i4.s 10 - IL_0002: conv.i8 - IL_0003: conv.ovf.i.un - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: conv.i8 - IL_000c: stloc.1 - IL_000d: ldc.i4.s 10 - IL_000f: stloc.2 - IL_0010: br.s IL_002a - - IL_0012: ldloc.2 - IL_0013: stloc.3 - IL_0014: ldloc.0 - IL_0015: ldloc.1 - IL_0016: conv.i - IL_0017: stloc.s V_4 - IL_0019: stloc.s V_5 - IL_001b: ldloc.s V_5 - IL_001d: ldloc.s V_4 - IL_001f: ldloc.3 - IL_0020: stelem.i4 - IL_0021: ldloc.2 - IL_0022: ldc.i4.m1 - IL_0023: add - IL_0024: stloc.2 - IL_0025: ldloc.1 - IL_0026: ldc.i4.1 - IL_0027: conv.i8 - IL_0028: add - IL_0029: stloc.1 - IL_002a: ldloc.1 - IL_002b: ldc.i4.s 10 - IL_002d: conv.i8 - IL_002e: blt.un.s IL_0012 - - IL_0030: ldloc.0 - IL_0031: ret - } - - .method public static int32[] f8() cil managed - { - - .maxstack 5 - .locals init (int32[] V_0, - uint64 V_1, - int32 V_2, - int32 V_3, - native int V_4, - int32[] V_5) - IL_0000: ldc.i4.5 - IL_0001: conv.i8 - IL_0002: conv.ovf.i.un - IL_0003: newarr [runtime]System.Int32 - IL_0008: stloc.0 - IL_0009: ldc.i4.0 - IL_000a: conv.i8 - IL_000b: stloc.1 - IL_000c: ldc.i4.s 10 - IL_000e: stloc.2 - IL_000f: br.s IL_002a - - IL_0011: ldloc.2 - IL_0012: stloc.3 - IL_0013: ldloc.0 - IL_0014: ldloc.1 - IL_0015: conv.i - IL_0016: stloc.s V_4 - IL_0018: stloc.s V_5 - IL_001a: ldloc.s V_5 - IL_001c: ldloc.s V_4 - IL_001e: ldloc.3 - IL_001f: stelem.i4 - IL_0020: ldloc.2 - IL_0021: ldc.i4.s -2 - IL_0023: add - IL_0024: stloc.2 - IL_0025: ldloc.1 - IL_0026: ldc.i4.1 - IL_0027: conv.i8 - IL_0028: add - IL_0029: stloc.1 - IL_002a: ldloc.1 - IL_002b: ldc.i4.5 - IL_002c: conv.i8 - IL_002d: blt.un.s IL_0011 - - IL_002f: ldloc.0 - IL_0030: ret - } - - .method public static int32[] f9(int32 start) cil managed - { - - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - int32[] V_2, - uint64 V_3, - int32 V_4, - int32 V_5, - native int V_6, - int32[] V_7) - IL_0000: nop - IL_0001: ldc.i4.s 10 - IL_0003: ldarg.0 - IL_0004: bge.s IL_000b - - IL_0006: ldc.i4.0 - IL_0007: conv.i8 - IL_0008: nop - IL_0009: br.s IL_0014 - - IL_000b: ldc.i4.s 10 - IL_000d: ldarg.0 - IL_000e: sub - IL_000f: conv.i8 - IL_0010: ldc.i4.1 - IL_0011: conv.i8 - IL_0012: add - IL_0013: nop - IL_0014: stloc.0 - IL_0015: ldloc.0 - IL_0016: stloc.1 - IL_0017: ldloc.1 - IL_0018: brtrue.s IL_0020 - - IL_001a: call !!0[] [runtime]System.Array::Empty() - IL_001f: ret - - IL_0020: ldloc.1 - IL_0021: conv.ovf.i.un - IL_0022: newarr [runtime]System.Int32 - IL_0027: stloc.2 - IL_0028: ldc.i4.0 - IL_0029: conv.i8 - IL_002a: stloc.3 - IL_002b: ldarg.0 - IL_002c: stloc.s V_4 - IL_002e: br.s IL_004d - - IL_0030: ldloc.s V_4 - IL_0032: stloc.s V_5 - IL_0034: ldloc.2 - IL_0035: ldloc.3 - IL_0036: conv.i - IL_0037: stloc.s V_6 - IL_0039: stloc.s V_7 - IL_003b: ldloc.s V_7 - IL_003d: ldloc.s V_6 - IL_003f: ldloc.s V_5 - IL_0041: stelem.i4 - IL_0042: ldloc.s V_4 - IL_0044: ldc.i4.1 - IL_0045: add - IL_0046: stloc.s V_4 - IL_0048: ldloc.3 - IL_0049: ldc.i4.1 - IL_004a: conv.i8 - IL_004b: add - IL_004c: stloc.3 - IL_004d: ldloc.3 - IL_004e: ldloc.0 - IL_004f: blt.un.s IL_0030 - - IL_0051: ldloc.2 - IL_0052: ret - } - - .method public static int32[] f10(int32 finish) cil managed - { - - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - int32[] V_2, - uint64 V_3, - int32 V_4, - int32 V_5, - native int V_6, - int32[] V_7) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: bge.s IL_000a - - IL_0005: ldc.i4.0 - IL_0006: conv.i8 - IL_0007: nop - IL_0008: br.s IL_0012 + IL_0005: ldc.i4.0 + IL_0006: conv.i8 + IL_0007: nop + IL_0008: br.s IL_0012 IL_000a: ldarg.0 IL_000b: ldc.i4.1 @@ -2434,6 +2128,14 @@ IL_005e: ret } + .method public static int32[] f2() cil managed + { + + .maxstack 8 + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: ret + } + .method public static int32[] f20(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed { @@ -3505,8 +3207,59 @@ IL_0045: conv.i8 IL_0046: blt.un.s IL_0022 - IL_0048: ldloc.2 - IL_0049: ret + IL_0048: ldloc.2 + IL_0049: ret + } + + .method public static int32[] f3() cil managed + { + + .maxstack 5 + .locals init (int32[] V_0, + uint64 V_1, + int32 V_2, + int32 V_3, + native int V_4, + int32[] V_5) + IL_0000: ldc.i4.s 10 + IL_0002: conv.i8 + IL_0003: conv.ovf.i.un + IL_0004: newarr [runtime]System.Int32 + IL_0009: stloc.0 + IL_000a: ldc.i4.0 + IL_000b: conv.i8 + IL_000c: stloc.1 + IL_000d: ldc.i4.1 + IL_000e: stloc.2 + IL_000f: br.s IL_0029 + + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: ldloc.3 + IL_001f: stelem.i4 + IL_0020: ldloc.2 + IL_0021: ldc.i4.1 + IL_0022: add + IL_0023: stloc.2 + IL_0024: ldloc.1 + IL_0025: ldc.i4.1 + IL_0026: conv.i8 + IL_0027: add + IL_0028: stloc.1 + IL_0029: ldloc.1 + IL_002a: ldc.i4.s 10 + IL_002c: conv.i8 + IL_002d: blt.un.s IL_0011 + + IL_002f: ldloc.0 + IL_0030: ret } .method public static int32[] f30(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -4143,6 +3896,253 @@ IL_00de: ret } + .method public static int32[] f4() cil managed + { + + .maxstack 5 + .locals init (int32[] V_0, + uint64 V_1, + int32 V_2, + int32 V_3, + native int V_4, + int32[] V_5) + IL_0000: ldc.i4.5 + IL_0001: conv.i8 + IL_0002: conv.ovf.i.un + IL_0003: newarr [runtime]System.Int32 + IL_0008: stloc.0 + IL_0009: ldc.i4.0 + IL_000a: conv.i8 + IL_000b: stloc.1 + IL_000c: ldc.i4.1 + IL_000d: stloc.2 + IL_000e: br.s IL_0028 + + IL_0010: ldloc.2 + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldloc.1 + IL_0014: conv.i + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.2 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.1 + IL_0024: ldc.i4.1 + IL_0025: conv.i8 + IL_0026: add + IL_0027: stloc.1 + IL_0028: ldloc.1 + IL_0029: ldc.i4.5 + IL_002a: conv.i8 + IL_002b: blt.un.s IL_0010 + + IL_002d: ldloc.0 + IL_002e: ret + } + + .method public static int32[] f5() cil managed + { + + .maxstack 8 + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: ret + } + + .method public static int32[] f6() cil managed + { + + .maxstack 8 + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: ret + } + + .method public static int32[] f7() cil managed + { + + .maxstack 5 + .locals init (int32[] V_0, + uint64 V_1, + int32 V_2, + int32 V_3, + native int V_4, + int32[] V_5) + IL_0000: ldc.i4.s 10 + IL_0002: conv.i8 + IL_0003: conv.ovf.i.un + IL_0004: newarr [runtime]System.Int32 + IL_0009: stloc.0 + IL_000a: ldc.i4.0 + IL_000b: conv.i8 + IL_000c: stloc.1 + IL_000d: ldc.i4.s 10 + IL_000f: stloc.2 + IL_0010: br.s IL_002a + + IL_0012: ldloc.2 + IL_0013: stloc.3 + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: conv.i + IL_0017: stloc.s V_4 + IL_0019: stloc.s V_5 + IL_001b: ldloc.s V_5 + IL_001d: ldloc.s V_4 + IL_001f: ldloc.3 + IL_0020: stelem.i4 + IL_0021: ldloc.2 + IL_0022: ldc.i4.m1 + IL_0023: add + IL_0024: stloc.2 + IL_0025: ldloc.1 + IL_0026: ldc.i4.1 + IL_0027: conv.i8 + IL_0028: add + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.s 10 + IL_002d: conv.i8 + IL_002e: blt.un.s IL_0012 + + IL_0030: ldloc.0 + IL_0031: ret + } + + .method public static int32[] f8() cil managed + { + + .maxstack 5 + .locals init (int32[] V_0, + uint64 V_1, + int32 V_2, + int32 V_3, + native int V_4, + int32[] V_5) + IL_0000: ldc.i4.5 + IL_0001: conv.i8 + IL_0002: conv.ovf.i.un + IL_0003: newarr [runtime]System.Int32 + IL_0008: stloc.0 + IL_0009: ldc.i4.0 + IL_000a: conv.i8 + IL_000b: stloc.1 + IL_000c: ldc.i4.s 10 + IL_000e: stloc.2 + IL_000f: br.s IL_002a + + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: ldloc.3 + IL_001f: stelem.i4 + IL_0020: ldloc.2 + IL_0021: ldc.i4.s -2 + IL_0023: add + IL_0024: stloc.2 + IL_0025: ldloc.1 + IL_0026: ldc.i4.1 + IL_0027: conv.i8 + IL_0028: add + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.5 + IL_002c: conv.i8 + IL_002d: blt.un.s IL_0011 + + IL_002f: ldloc.0 + IL_0030: ret + } + + .method public static int32[] f9(int32 start) cil managed + { + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + int32[] V_2, + uint64 V_3, + int32 V_4, + int32 V_5, + native int V_6, + int32[] V_7) + IL_0000: nop + IL_0001: ldc.i4.s 10 + IL_0003: ldarg.0 + IL_0004: bge.s IL_000b + + IL_0006: ldc.i4.0 + IL_0007: conv.i8 + IL_0008: nop + IL_0009: br.s IL_0014 + + IL_000b: ldc.i4.s 10 + IL_000d: ldarg.0 + IL_000e: sub + IL_000f: conv.i8 + IL_0010: ldc.i4.1 + IL_0011: conv.i8 + IL_0012: add + IL_0013: nop + IL_0014: stloc.0 + IL_0015: ldloc.0 + IL_0016: stloc.1 + IL_0017: ldloc.1 + IL_0018: brtrue.s IL_0020 + + IL_001a: call !!0[] [runtime]System.Array::Empty() + IL_001f: ret + + IL_0020: ldloc.1 + IL_0021: conv.ovf.i.un + IL_0022: newarr [runtime]System.Int32 + IL_0027: stloc.2 + IL_0028: ldc.i4.0 + IL_0029: conv.i8 + IL_002a: stloc.3 + IL_002b: ldarg.0 + IL_002c: stloc.s V_4 + IL_002e: br.s IL_004d + + IL_0030: ldloc.s V_4 + IL_0032: stloc.s V_5 + IL_0034: ldloc.2 + IL_0035: ldloc.3 + IL_0036: conv.i + IL_0037: stloc.s V_6 + IL_0039: stloc.s V_7 + IL_003b: ldloc.s V_7 + IL_003d: ldloc.s V_6 + IL_003f: ldloc.s V_5 + IL_0041: stelem.i4 + IL_0042: ldloc.s V_4 + IL_0044: ldc.i4.1 + IL_0045: add + IL_0046: stloc.s V_4 + IL_0048: ldloc.3 + IL_0049: ldc.i4.1 + IL_004a: conv.i8 + IL_004b: add + IL_004c: stloc.3 + IL_004d: ldloc.3 + IL_004e: ldloc.0 + IL_004f: blt.un.s IL_0030 + + IL_0051: ldloc.2 + IL_0052: ret + } + } .class private abstract auto ansi sealed ''.$assembly 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..76907a18ca9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field static assembly initonly class assembly/f33@47 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/f33@47::.ctor() + IL_0005: stsfld class assembly/f33@47 assembly/f33@47::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -58,21 +67,21 @@ IL_0008: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f33@47-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'f33@47-1' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/f33@47::.ctor() - IL_0005: stsfld class assembly/f33@47 assembly/f33@47::@_instance + IL_0000: newobj instance void assembly/'f33@47-1'::.ctor() + IL_0005: stsfld class assembly/'f33@47-1' assembly/'f33@47-1'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f33@47-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'f33@47-1' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -92,21 +101,21 @@ IL_0001: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit f34@48 + 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 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'f33@47-1'::.ctor() - IL_0005: stsfld class assembly/'f33@47-1' assembly/'f33@47-1'::@_instance + IL_0000: newobj instance void assembly/f34@48::.ctor() + IL_0005: stsfld class assembly/f34@48 assembly/f34@48::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f34@48 - 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 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -128,21 +137,21 @@ IL_0008: 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> + { + .field static assembly initonly class assembly/'f34@48-2' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/f34@48::.ctor() - IL_0005: stsfld class assembly/f34@48 assembly/f34@48::@_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-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .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 ) @@ -150,18 +159,26 @@ .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 } + } + + .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-1' @_instance .method private specialname rtspecialname static void .cctor() cil managed { @@ -171,12 +188,6 @@ 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> - { - .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 ) @@ -184,35 +195,33 @@ .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 } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f34@48-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'f34@48-3' @_instance .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-3'::.ctor() + IL_0005: stsfld class assembly/'f34@48-3' assembly/'f34@48-3'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f34@48-3' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'f34@48-3' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -232,21 +241,21 @@ IL_0001: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit f35@49 + 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 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'f34@48-3'::.ctor() - IL_0005: stsfld class assembly/'f34@48-3' assembly/'f34@48-3'::@_instance + IL_0000: newobj instance void assembly/f35@49::.ctor() + IL_0005: stsfld class assembly/f35@49 assembly/f35@49::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f35@49 - 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 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -268,21 +277,21 @@ IL_0008: 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> + { + .field static assembly initonly class assembly/'f35@49-2' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/f35@49::.ctor() - IL_0005: stsfld class assembly/f35@49 assembly/f35@49::@_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-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .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 ) @@ -290,18 +299,26 @@ .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 } + } + + .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-1' @_instance .method private specialname rtspecialname static void .cctor() cil managed { @@ -311,12 +328,6 @@ 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> - { - .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 ) @@ -324,35 +335,33 @@ .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 } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f35@49-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'f35@49-3' @_instance .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-3'::.ctor() + IL_0005: stsfld class assembly/'f35@49-3' assembly/'f35@49-3'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f35@49-3' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'f35@49-3' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -372,15 +381,6 @@ IL_0001: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/'f35@49-3'::.ctor() - IL_0005: stsfld class assembly/'f35@49-3' assembly/'f35@49-3'::@_instance - IL_000a: ret - } - } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f0(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1046,264 +1046,6 @@ IL_002c: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2() cil managed - { - - .maxstack 8 - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0005: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3() cil managed - { - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, - int32 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.1 - IL_0004: stloc.2 - IL_0005: br.s IL_001f - - IL_0007: ldloc.2 - IL_0008: stloc.3 - IL_0009: ldloca.s V_0 - IL_000b: stloc.s V_4 - IL_000d: ldloc.s V_4 - IL_000f: ldloc.3 - IL_0010: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0015: nop - IL_0016: ldloc.2 - IL_0017: ldc.i4.1 - IL_0018: add - IL_0019: stloc.2 - IL_001a: ldloc.1 - IL_001b: ldc.i4.1 - IL_001c: conv.i8 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldc.i4.s 10 - IL_0022: conv.i8 - IL_0023: blt.un.s IL_0007 - - IL_0025: ldloca.s V_0 - IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_002c: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f4() cil managed - { - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, - int32 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.1 - IL_0004: stloc.2 - IL_0005: br.s IL_001f - - IL_0007: ldloc.2 - IL_0008: stloc.3 - IL_0009: ldloca.s V_0 - IL_000b: stloc.s V_4 - IL_000d: ldloc.s V_4 - IL_000f: ldloc.3 - IL_0010: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0015: nop - IL_0016: ldloc.2 - IL_0017: ldc.i4.2 - IL_0018: add - IL_0019: stloc.2 - IL_001a: ldloc.1 - IL_001b: ldc.i4.1 - IL_001c: conv.i8 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldc.i4.5 - IL_0021: conv.i8 - IL_0022: blt.un.s IL_0007 - - IL_0024: ldloca.s V_0 - IL_0026: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_002b: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f5() cil managed - { - - .maxstack 8 - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0005: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f6() cil managed - { - - .maxstack 8 - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0005: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f7() cil managed - { - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, - int32 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.s 10 - IL_0005: stloc.2 - IL_0006: br.s IL_0020 - - IL_0008: ldloc.2 - IL_0009: stloc.3 - IL_000a: ldloca.s V_0 - IL_000c: stloc.s V_4 - IL_000e: ldloc.s V_4 - IL_0010: ldloc.3 - IL_0011: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0016: nop - IL_0017: ldloc.2 - IL_0018: ldc.i4.m1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: conv.i8 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldc.i4.s 10 - IL_0023: conv.i8 - IL_0024: blt.un.s IL_0008 - - IL_0026: ldloca.s V_0 - IL_0028: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_002d: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f8() cil managed - { - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, - int32 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.s 10 - IL_0005: stloc.2 - IL_0006: br.s IL_0021 - - IL_0008: ldloc.2 - IL_0009: stloc.3 - IL_000a: ldloca.s V_0 - IL_000c: stloc.s V_4 - IL_000e: ldloc.s V_4 - IL_0010: ldloc.3 - IL_0011: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0016: nop - IL_0017: ldloc.2 - IL_0018: ldc.i4.s -2 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: add - IL_0020: stloc.1 - IL_0021: ldloc.1 - IL_0022: ldc.i4.5 - IL_0023: conv.i8 - IL_0024: blt.un.s IL_0008 - - IL_0026: ldloca.s V_0 - IL_0028: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_002d: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f9(int32 start) cil managed - { - - .maxstack 4 - .locals init (uint64 V_0, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, - uint64 V_2, - int32 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) - IL_0000: nop - IL_0001: ldc.i4.s 10 - IL_0003: ldarg.0 - IL_0004: bge.s IL_000b - - IL_0006: ldc.i4.0 - IL_0007: conv.i8 - IL_0008: nop - IL_0009: br.s IL_0014 - - IL_000b: ldc.i4.s 10 - IL_000d: ldarg.0 - IL_000e: sub - IL_000f: conv.i8 - IL_0010: ldc.i4.1 - IL_0011: conv.i8 - IL_0012: add - IL_0013: nop - IL_0014: stloc.0 - IL_0015: ldc.i4.0 - IL_0016: conv.i8 - IL_0017: stloc.2 - IL_0018: ldarg.0 - IL_0019: stloc.3 - IL_001a: br.s IL_0036 - - IL_001c: ldloc.3 - IL_001d: stloc.s V_4 - IL_001f: ldloca.s V_1 - IL_0021: stloc.s V_5 - IL_0023: ldloc.s V_5 - IL_0025: ldloc.s V_4 - IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002c: nop - IL_002d: ldloc.3 - IL_002e: ldc.i4.1 - IL_002f: add - IL_0030: stloc.3 - IL_0031: ldloc.2 - IL_0032: ldc.i4.1 - IL_0033: conv.i8 - IL_0034: add - IL_0035: stloc.2 - IL_0036: ldloc.2 - IL_0037: ldloc.0 - IL_0038: blt.un.s IL_001c - - IL_003a: ldloca.s V_1 - IL_003c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0041: ret - } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f10(int32 finish) cil managed { @@ -2121,6 +1863,14 @@ IL_004c: ret } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2() cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0005: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f20(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed { @@ -3041,6 +2791,49 @@ IL_0046: ret } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + uint64 V_1, + int32 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.1 + IL_0004: stloc.2 + IL_0005: br.s IL_001f + + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldloc.3 + IL_0010: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0015: nop + IL_0016: ldloc.2 + IL_0017: ldc.i4.1 + IL_0018: add + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldc.i4.1 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldc.i4.s 10 + IL_0022: conv.i8 + IL_0023: blt.un.s IL_0007 + + IL_0025: ldloca.s V_0 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f30(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -3562,6 +3355,213 @@ IL_00b5: ret } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f4() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + uint64 V_1, + int32 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.1 + IL_0004: stloc.2 + IL_0005: br.s IL_001f + + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldloc.3 + IL_0010: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0015: nop + IL_0016: ldloc.2 + IL_0017: ldc.i4.2 + IL_0018: add + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldc.i4.1 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldc.i4.5 + IL_0021: conv.i8 + IL_0022: blt.un.s IL_0007 + + IL_0024: ldloca.s V_0 + IL_0026: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002b: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f5() cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0005: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f6() cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0005: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f7() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + uint64 V_1, + int32 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.s 10 + IL_0005: stloc.2 + IL_0006: br.s IL_0020 + + IL_0008: ldloc.2 + IL_0009: stloc.3 + IL_000a: ldloca.s V_0 + IL_000c: stloc.s V_4 + IL_000e: ldloc.s V_4 + IL_0010: ldloc.3 + IL_0011: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0016: nop + IL_0017: ldloc.2 + IL_0018: ldc.i4.m1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: conv.i8 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldc.i4.s 10 + IL_0023: conv.i8 + IL_0024: blt.un.s IL_0008 + + IL_0026: ldloca.s V_0 + IL_0028: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002d: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f8() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + uint64 V_1, + int32 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.s 10 + IL_0005: stloc.2 + IL_0006: br.s IL_0021 + + IL_0008: ldloc.2 + IL_0009: stloc.3 + IL_000a: ldloca.s V_0 + IL_000c: stloc.s V_4 + IL_000e: ldloc.s V_4 + IL_0010: ldloc.3 + IL_0011: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0016: nop + IL_0017: ldloc.2 + IL_0018: ldc.i4.s -2 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: conv.i8 + IL_001f: add + IL_0020: stloc.1 + IL_0021: ldloc.1 + IL_0022: ldc.i4.5 + IL_0023: conv.i8 + IL_0024: blt.un.s IL_0008 + + IL_0026: ldloca.s V_0 + IL_0028: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002d: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f9(int32 start) cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, + uint64 V_2, + int32 V_3, + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) + IL_0000: nop + IL_0001: ldc.i4.s 10 + IL_0003: ldarg.0 + IL_0004: bge.s IL_000b + + IL_0006: ldc.i4.0 + IL_0007: conv.i8 + IL_0008: nop + IL_0009: br.s IL_0014 + + IL_000b: ldc.i4.s 10 + IL_000d: ldarg.0 + IL_000e: sub + IL_000f: conv.i8 + IL_0010: ldc.i4.1 + IL_0011: conv.i8 + IL_0012: add + IL_0013: nop + IL_0014: stloc.0 + IL_0015: ldc.i4.0 + IL_0016: conv.i8 + IL_0017: stloc.2 + IL_0018: ldarg.0 + IL_0019: stloc.3 + IL_001a: br.s IL_0036 + + IL_001c: ldloc.3 + IL_001d: stloc.s V_4 + IL_001f: ldloca.s V_1 + IL_0021: stloc.s V_5 + IL_0023: ldloc.s V_5 + IL_0025: ldloc.s V_4 + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloc.3 + IL_002e: ldc.i4.1 + IL_002f: add + IL_0030: stloc.3 + IL_0031: ldloc.2 + IL_0032: ldc.i4.1 + IL_0033: conv.i8 + IL_0034: add + IL_0035: stloc.2 + IL_0036: ldloc.2 + IL_0037: ldloc.0 + IL_0038: blt.un.s IL_001c + + IL_003a: ldloca.s V_1 + IL_003c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0041: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl index 6b454cf88db..3b1df087b80 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/'for _ in Array-groupBy id -||- do ---@28' @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/'for _ in Array-groupBy id -||- do ---@28'::.ctor() + IL_0005: stsfld class assembly/'for _ in Array-groupBy id -||- do ---@28' assembly/'for _ in Array-groupBy id -||- do ---@28'::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -56,21 +65,21 @@ IL_0001: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ | _ in Array-groupBy id -||- do ---@29' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _ | _ in Array-groupBy id -||- do ---@29' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'for _ in Array-groupBy id -||- do ---@28'::.ctor() - IL_0005: stsfld class assembly/'for _ in Array-groupBy id -||- do ---@28' assembly/'for _ in Array-groupBy id -||- do ---@28'::@_instance + IL_0000: newobj instance void assembly/'for _ | _ in Array-groupBy id -||- do ---@29'::.ctor() + IL_0005: stsfld class assembly/'for _ | _ in Array-groupBy id -||- do ---@29' assembly/'for _ | _ in Array-groupBy id -||- do ---@29'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ | _ in Array-groupBy id -||- do ---@29' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'for _ | _ in Array-groupBy id -||- do ---@29' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -90,21 +99,21 @@ IL_0001: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ - _ in Array-groupBy id -||- do ---@30' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _ - _ in Array-groupBy id -||- do ---@30' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'for _ | _ in Array-groupBy id -||- do ---@29'::.ctor() - IL_0005: stsfld class assembly/'for _ | _ in Array-groupBy id -||- do ---@29' assembly/'for _ | _ in Array-groupBy id -||- do ---@29'::@_instance + IL_0000: newobj instance void assembly/'for _ - _ in Array-groupBy id -||- do ---@30'::.ctor() + IL_0005: stsfld class assembly/'for _ - _ in Array-groupBy id -||- do ---@30' assembly/'for _ - _ in Array-groupBy id -||- do ---@30'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ - _ in Array-groupBy id -||- do ---@30' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'for _ - _ in Array-groupBy id -||- do ---@30' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -124,21 +133,21 @@ IL_0001: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _, _group in Array-groupBy id -||- do ---@31' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _, _group in Array-groupBy id -||- do ---@31' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'for _ - _ in Array-groupBy id -||- do ---@30'::.ctor() - IL_0005: stsfld class assembly/'for _ - _ in Array-groupBy id -||- do ---@30' assembly/'for _ - _ in Array-groupBy id -||- do ---@30'::@_instance + IL_0000: newobj instance void assembly/'for _, _group in Array-groupBy id -||- do ---@31'::.ctor() + IL_0005: stsfld class assembly/'for _, _group in Array-groupBy id -||- do ---@31' assembly/'for _, _group in Array-groupBy id -||- do ---@31'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'for _, _group in Array-groupBy id -||- do ---@31' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'for _, _group in Array-groupBy id -||- do ---@31' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -158,21 +167,21 @@ IL_0001: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _, group in Array-groupBy id -||- do ---@32' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _, group in Array-groupBy id -||- do ---@32' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'for _, _group in Array-groupBy id -||- do ---@31'::.ctor() - IL_0005: stsfld class assembly/'for _, _group in Array-groupBy id -||- do ---@31' assembly/'for _, _group in Array-groupBy id -||- do ---@31'::@_instance + IL_0000: newobj instance void assembly/'for _, group in Array-groupBy id -||- do ---@32'::.ctor() + IL_0005: stsfld class assembly/'for _, group in Array-groupBy id -||- do ---@32' assembly/'for _, group in Array-groupBy id -||- do ---@32'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'for _, group in Array-groupBy id -||- do ---@32' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'for _, group in Array-groupBy id -||- do ---@32' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -192,33 +201,24 @@ IL_0001: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/'for _, group in Array-groupBy id -||- do ---@32'::.ctor() - IL_0005: stsfld class assembly/'for _, group in Array-groupBy id -||- do ---@32' assembly/'for _, group in Array-groupBy id -||- do ---@32'::@_instance - IL_000a: ret - } - } - .method public static int32[] f0(int32[] 'array') cil managed + .method public static uint8[] '[|for x in byteArray -> x|]'(uint8[] xs) cil managed { .maxstack 6 - .locals init (int32[] V_0, - int32[] V_1, + .locals init (uint8[] V_0, + uint8[] V_1, int32 V_2, - int32 V_3, + uint8 V_3, int32 V_4, - int32[] V_5) + uint8[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int32 + IL_0005: newarr [runtime]System.Byte IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 @@ -228,14 +228,14 @@ IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.i4 + IL_0013: ldelem.u1 IL_0014: stloc.3 IL_0015: stloc.s V_4 IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 IL_001d: ldloc.3 - IL_001e: stelem.i4 + IL_001e: stelem.i1 IL_001f: ldloc.2 IL_0020: ldc.i4.1 IL_0021: add @@ -250,22 +250,22 @@ IL_002a: ret } - .method public static int32[] f00(int32[] 'array') cil managed + .method public static char[] '[|for x in charArray -> x|]'(char[] xs) cil managed { .maxstack 6 - .locals init (int32[] V_0, - int32[] V_1, + .locals init (char[] V_0, + char[] V_1, int32 V_2, - int32 V_3, + char V_3, int32 V_4, - int32[] V_5) + char[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int32 + IL_0005: newarr [runtime]System.Char IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 @@ -275,14 +275,14 @@ IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.i4 + IL_0013: ldelem.u2 IL_0014: stloc.3 IL_0015: stloc.s V_4 IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 IL_001d: ldloc.3 - IL_001e: stelem.i4 + IL_001e: stelem.i2 IL_001f: ldloc.2 IL_0020: ldc.i4.1 IL_0021: add @@ -297,271 +297,196 @@ IL_002a: ret } - .method public static int32[] f000(int32[] 'array') cil managed + .method public static float32[] '[|for x in float32Array -> x|]'(float32[] xs) cil managed { .maxstack 6 - .locals init (int32[] V_0, - int32[] V_1, + .locals init (float32[] V_0, + float32[] V_1, int32 V_2, - int32 V_3, + float32 V_3, int32 V_4, - int32[] V_5, - int32 V_6, - int32[] V_7) + float32[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int32 + IL_0005: newarr [runtime]System.Single IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_002b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.i4 + IL_0013: ldelem.r4 IL_0014: stloc.3 IL_0015: stloc.s V_4 IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 - IL_001d: stloc.s V_6 - IL_001f: stloc.s V_7 - IL_0021: ldloc.s V_7 - IL_0023: ldloc.s V_6 - IL_0025: ldloc.3 - IL_0026: stelem.i4 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.2 - IL_002b: ldloc.2 - IL_002c: ldloc.1 - IL_002d: ldlen - IL_002e: conv.i4 - IL_002f: blt.s IL_000f + IL_001d: ldloc.3 + IL_001e: stelem.r4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f - IL_0031: ldloc.1 - IL_0032: ret + IL_0029: ldloc.1 + IL_002a: ret } - .method public static int32[] f0000(int32[] 'array') cil managed + .method public static float64[] '[|for x in floatArray -> x|]'(float64[] xs) cil managed { .maxstack 6 - .locals init (int32[] V_0, - int32[] V_1, + .locals init (float64[] V_0, + float64[] V_1, int32 V_2, - int32 V_3, + float64 V_3, int32 V_4, - int32[] V_5, - int32 V_6, - int32[] V_7) + float64[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int32 + IL_0005: newarr [runtime]System.Double IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_002b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.i4 + IL_0013: ldelem.r8 IL_0014: stloc.3 IL_0015: stloc.s V_4 IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 - IL_001d: stloc.s V_6 - IL_001f: stloc.s V_7 - IL_0021: ldloc.s V_7 - IL_0023: ldloc.s V_6 - IL_0025: ldloc.3 - IL_0026: stelem.i4 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.2 - IL_002b: ldloc.2 - IL_002c: ldloc.1 - IL_002d: ldlen - IL_002e: conv.i4 - IL_002f: blt.s IL_000f + IL_001d: ldloc.3 + IL_001e: stelem.r8 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f - IL_0031: ldloc.1 - IL_0032: ret + IL_0029: ldloc.1 + IL_002a: ret } - .method public static int32[] f00000(int32[] 'array', - int32 x, - int32 y) cil managed + .method public static int16[] '[|for x in int16Array -> x|]'(int16[] xs) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) .maxstack 6 - .locals init (int32[] V_0, - int32[] V_1, + .locals init (int16[] V_0, + int16[] V_1, int32 V_2, - int32 V_3, + int16 V_3, int32 V_4, - int32 V_5, - int32[] V_6, - int32 V_7, - int32[] V_8, - int32 V_9, - int32[] V_10) + int16[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int32 + IL_0005: newarr [runtime]System.Int16 IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0043 + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.i4 + IL_0013: ldelem.i2 IL_0014: stloc.3 - IL_0015: stloc.s V_5 - IL_0017: stloc.s V_6 - IL_0019: ldloc.s V_6 - IL_001b: ldloc.s V_5 + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 IL_001d: ldloc.3 - IL_001e: ldarg.1 - IL_001f: add - IL_0020: stloc.s V_4 - IL_0022: stloc.s V_7 - IL_0024: stloc.s V_8 - IL_0026: ldloc.s V_8 - IL_0028: ldloc.s V_7 - IL_002a: ldloc.3 - IL_002b: ldarg.2 - IL_002c: add - IL_002d: stloc.s V_5 - IL_002f: stloc.s V_9 - IL_0031: stloc.s V_10 - IL_0033: ldloc.s V_10 - IL_0035: ldloc.s V_9 - IL_0037: ldloc.3 - IL_0038: ldloc.s V_4 - IL_003a: add - IL_003b: ldloc.s V_5 - IL_003d: add - IL_003e: stelem.i4 - IL_003f: ldloc.2 - IL_0040: ldc.i4.1 - IL_0041: add - IL_0042: stloc.2 - IL_0043: ldloc.2 - IL_0044: ldloc.1 - IL_0045: ldlen - IL_0046: conv.i4 - IL_0047: blt.s IL_000f + IL_001e: stelem.i2 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f - IL_0049: ldloc.1 - IL_004a: ret + IL_0029: ldloc.1 + IL_002a: ret } - .method public static int32[] f000000(int32[] 'array', - int32 x, - int32 y) cil managed + .method public static int64[] '[|for x in int64Array -> x|]'(int64[] xs) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) .maxstack 6 - .locals init (int32[] V_0, - int32[] V_1, + .locals init (int64[] V_0, + int64[] V_1, int32 V_2, - int32 V_3, + int64 V_3, int32 V_4, - int32 V_5, - int32[] V_6, - int32 V_7, - int32[] V_8, - int32 V_9, - int32[] V_10) + int64[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int32 + IL_0005: newarr [runtime]System.Int64 IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0043 + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.i4 + IL_0013: ldelem.i8 IL_0014: stloc.3 - IL_0015: stloc.s V_5 - IL_0017: stloc.s V_6 - IL_0019: ldloc.s V_6 - IL_001b: ldloc.s V_5 + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 IL_001d: ldloc.3 - IL_001e: ldarg.1 - IL_001f: add - IL_0020: stloc.s V_4 - IL_0022: stloc.s V_7 - IL_0024: stloc.s V_8 - IL_0026: ldloc.s V_8 - IL_0028: ldloc.s V_7 - IL_002a: ldloc.3 - IL_002b: ldarg.2 - IL_002c: add - IL_002d: stloc.s V_5 - IL_002f: stloc.s V_9 - IL_0031: stloc.s V_10 - IL_0033: ldloc.s V_10 - IL_0035: ldloc.s V_9 - IL_0037: ldloc.3 - IL_0038: ldloc.s V_4 - IL_003a: add - IL_003b: ldloc.s V_5 - IL_003d: add - IL_003e: stelem.i4 - IL_003f: ldloc.2 - IL_0040: ldc.i4.1 - IL_0041: add - IL_0042: stloc.2 - IL_0043: ldloc.2 - IL_0044: ldloc.1 - IL_0045: ldlen - IL_0046: conv.i4 - IL_0047: blt.s IL_000f + IL_001e: stelem.i8 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f - IL_0049: ldloc.1 - IL_004a: ret + IL_0029: ldloc.1 + IL_002a: ret } - .method public static int32[] f0000000(int32[] 'array', - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - int32 x, - int32 y) cil managed + .method public static int32[] '[|for x in intArray -> x|]'(int32[] xs) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 04 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 01 00 00 00 00 00 ) .maxstack 6 .locals init (int32[] V_0, @@ -569,13 +494,7 @@ int32 V_2, int32 V_3, int32 V_4, - int32[] V_5, - int32 V_6, - int32[] V_7, - int32 V_8, - int32[] V_9, - int32 V_10, - int32[] V_11) + int32[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -585,7 +504,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0053 + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -597,324 +516,179 @@ IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 - IL_001d: ldarg.1 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: pop - IL_0025: stloc.s V_6 - IL_0027: stloc.s V_7 - IL_0029: ldloc.s V_7 - IL_002b: ldloc.s V_6 - IL_002d: ldloc.3 - IL_002e: ldarg.2 - IL_002f: add - IL_0030: stloc.s V_4 - IL_0032: stloc.s V_8 - IL_0034: stloc.s V_9 - IL_0036: ldloc.s V_9 - IL_0038: ldloc.s V_8 - IL_003a: ldloc.3 - IL_003b: ldarg.3 - IL_003c: add - IL_003d: stloc.s V_6 - IL_003f: stloc.s V_10 - IL_0041: stloc.s V_11 - IL_0043: ldloc.s V_11 - IL_0045: ldloc.s V_10 - IL_0047: ldloc.3 - IL_0048: ldloc.s V_4 - IL_004a: add - IL_004b: ldloc.s V_6 - IL_004d: add - IL_004e: stelem.i4 - IL_004f: ldloc.2 - IL_0050: ldc.i4.1 - IL_0051: add - IL_0052: stloc.2 - IL_0053: ldloc.2 - IL_0054: ldloc.1 - IL_0055: ldlen - IL_0056: conv.i4 - IL_0057: blt.s IL_000f + IL_001d: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f - IL_0059: ldloc.1 - IL_005a: ret + IL_0029: ldloc.1 + IL_002a: ret } - .method public static int32[] f00000000(int32[] 'array', - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - int32 x, - int32 y) cil managed + .method public static native int[] '[|for x in nativeintArray -> x|]'(native int[] xs) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 04 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 01 00 00 00 00 00 ) .maxstack 6 - .locals init (int32[] V_0, - int32[] V_1, + .locals init (native int[] V_0, + native int[] V_1, int32 V_2, - int32 V_3, + native int V_3, int32 V_4, - int32 V_5, - int32[] V_6, - int32 V_7, - int32[] V_8, - int32 V_9, - int32[] V_10, - int32 V_11, - int32[] V_12) + native int[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int32 + IL_0005: newarr [runtime]System.IntPtr IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0053 + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.i4 + IL_0013: ldelem.i IL_0014: stloc.3 - IL_0015: stloc.s V_5 - IL_0017: stloc.s V_6 - IL_0019: ldloc.s V_6 - IL_001b: ldloc.s V_5 + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 IL_001d: ldloc.3 - IL_001e: ldarg.2 - IL_001f: add - IL_0020: stloc.s V_4 - IL_0022: stloc.s V_7 - IL_0024: stloc.s V_8 - IL_0026: ldloc.s V_8 - IL_0028: ldloc.s V_7 - IL_002a: ldarg.1 - IL_002b: ldnull - IL_002c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0031: pop - IL_0032: stloc.s V_9 - IL_0034: stloc.s V_10 - IL_0036: ldloc.s V_10 - IL_0038: ldloc.s V_9 - IL_003a: ldloc.3 - IL_003b: ldarg.3 - IL_003c: add - IL_003d: stloc.s V_5 - IL_003f: stloc.s V_11 - IL_0041: stloc.s V_12 - IL_0043: ldloc.s V_12 - IL_0045: ldloc.s V_11 - IL_0047: ldloc.3 - IL_0048: ldloc.s V_4 - IL_004a: add - IL_004b: ldloc.s V_5 - IL_004d: add - IL_004e: stelem.i4 - IL_004f: ldloc.2 - IL_0050: ldc.i4.1 - IL_0051: add - IL_0052: stloc.2 - IL_0053: ldloc.2 - IL_0054: ldloc.1 - IL_0055: ldlen - IL_0056: conv.i4 - IL_0057: blt.s IL_000f - - IL_0059: ldloc.1 - IL_005a: ret + IL_001e: stelem.i + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } - .method public static int32[] f000000000(int32[] 'array', - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - int32 x, - int32 y) cil managed + .method public static int8[] '[|for x in sbyteArray -> x|]'(int8[] xs) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 04 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 01 00 00 00 00 00 ) .maxstack 6 - .locals init (int32[] V_0, - int32[] V_1, + .locals init (int8[] V_0, + int8[] V_1, int32 V_2, - int32 V_3, + int8 V_3, int32 V_4, - int32 V_5, - int32[] V_6, - int32 V_7, - int32[] V_8, - int32 V_9, - int32[] V_10, - int32 V_11, - int32[] V_12) + int8[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int32 + IL_0005: newarr [runtime]System.SByte IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0053 + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.i4 + IL_0013: ldelem.i1 IL_0014: stloc.3 - IL_0015: stloc.s V_5 - IL_0017: stloc.s V_6 - IL_0019: ldloc.s V_6 - IL_001b: ldloc.s V_5 + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 IL_001d: ldloc.3 - IL_001e: ldarg.2 - IL_001f: add - IL_0020: stloc.s V_4 - IL_0022: stloc.s V_7 - IL_0024: stloc.s V_8 - IL_0026: ldloc.s V_8 - IL_0028: ldloc.s V_7 - IL_002a: ldloc.3 - IL_002b: ldarg.3 - IL_002c: add - IL_002d: stloc.s V_5 - IL_002f: stloc.s V_9 - IL_0031: stloc.s V_10 - IL_0033: ldloc.s V_10 - IL_0035: ldloc.s V_9 - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_003e: pop - IL_003f: stloc.s V_11 - IL_0041: stloc.s V_12 - IL_0043: ldloc.s V_12 - IL_0045: ldloc.s V_11 - IL_0047: ldloc.3 - IL_0048: ldloc.s V_4 - IL_004a: add - IL_004b: ldloc.s V_5 - IL_004d: add - IL_004e: stelem.i4 - IL_004f: ldloc.2 - IL_0050: ldc.i4.1 - IL_0051: add - IL_0052: stloc.2 - IL_0053: ldloc.2 - IL_0054: ldloc.1 - IL_0055: ldlen - IL_0056: conv.i4 - IL_0057: blt.s IL_000f + IL_001e: stelem.i1 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f - IL_0059: ldloc.1 - IL_005a: ret + IL_0029: ldloc.1 + IL_002a: ret } - .method public static int32[] f0000000000(int32[] 'array', - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - int32 x, - int32 y) cil managed + .method public static uint16[] '[|for x in uint16Array -> x|]'(uint16[] xs) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 04 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 01 00 00 00 00 00 ) - .maxstack 5 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, + .maxstack 6 + .locals init (uint16[] V_0, + uint16[] V_1, + int32 V_2, + uint16 V_3, int32 V_4, - int32 V_5, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_7, - class [runtime]System.IDisposable V_8) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0007: stloc.1 - .try - { - IL_0008: br.s IL_0041 - - IL_000a: ldloc.1 - IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0010: stloc.3 - IL_0011: ldloc.3 - IL_0012: ldarg.2 - IL_0013: add - IL_0014: stloc.s V_4 - IL_0016: ldloc.3 - IL_0017: ldarg.3 - IL_0018: add - IL_0019: stloc.s V_5 - IL_001b: ldloca.s V_0 - IL_001d: stloc.s V_6 - IL_001f: ldloc.s V_6 - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002d: nop - IL_002e: ldloca.s V_0 - IL_0030: stloc.s V_7 - IL_0032: ldloc.s V_7 - IL_0034: ldloc.3 - IL_0035: ldloc.s V_4 - IL_0037: add - IL_0038: ldloc.s V_5 - IL_003a: add - IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0040: nop - IL_0041: ldloc.1 - IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0047: brtrue.s IL_000a - - IL_0049: ldnull - IL_004a: stloc.2 - IL_004b: leave.s IL_0062 + uint16[] V_5) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.UInt16 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0023 - } - finally - { - IL_004d: ldloc.1 - IL_004e: isinst [runtime]System.IDisposable - IL_0053: stloc.s V_8 - IL_0055: ldloc.s V_8 - IL_0057: brfalse.s IL_0061 + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.u2 + IL_0014: stloc.3 + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i2 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f - IL_0059: ldloc.s V_8 - IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0060: endfinally - IL_0061: endfinally - } - IL_0062: ldloc.2 - IL_0063: pop - IL_0064: ldloca.s V_0 - IL_0066: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_006b: ret + IL_0029: ldloc.1 + IL_002a: ret } - .method public static int32[] f1(int32[] 'array') cil managed + .method public static uint64[] '[|for x in uint64Array -> x|]'(uint64[] xs) cil managed { .maxstack 6 - .locals init (int32[] V_0, - int32[] V_1, + .locals init (uint64[] V_0, + uint64[] V_1, int32 V_2, - int32 V_3, + uint64 V_3, int32 V_4, - int32[] V_5) + uint64[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int32 + IL_0005: newarr [runtime]System.UInt64 IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 @@ -924,14 +698,14 @@ IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.i4 + IL_0013: ldelem.i8 IL_0014: stloc.3 IL_0015: stloc.s V_4 IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 IL_001d: ldloc.3 - IL_001e: stelem.i4 + IL_001e: stelem.i8 IL_001f: ldloc.2 IL_0020: ldc.i4.1 IL_0021: add @@ -946,122 +720,102 @@ IL_002a: ret } - .method public static !!a[] f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - int32[] 'array') cil managed + .method public static uint32[] '[|for x in uintArray -> x|]'(uint32[] xs) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 6 - .locals init (int32[] V_0, - !!a[] V_1, + .locals init (uint32[] V_0, + uint32[] V_1, int32 V_2, - int32 V_3, + uint32 V_3, int32 V_4, - !!a[] V_5) - IL_0000: ldarg.1 + uint32[] V_5) + IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr !!a + IL_0005: newarr [runtime]System.UInt32 IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_002d + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.i4 + IL_0013: ldelem.u4 IL_0014: stloc.3 IL_0015: stloc.s V_4 IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 - IL_001d: ldarg.0 - IL_001e: ldloc.3 - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: stelem !!a - IL_0029: ldloc.2 - IL_002a: ldc.i4.1 - IL_002b: add - IL_002c: stloc.2 - IL_002d: ldloc.2 - IL_002e: ldloc.1 - IL_002f: ldlen - IL_0030: conv.i4 - IL_0031: blt.s IL_000f + IL_001d: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f - IL_0033: ldloc.1 - IL_0034: ret + IL_0029: ldloc.1 + IL_002a: ret } - .method public static int32[] f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - int32[] 'array') cil managed + .method public static native uint[] '[|for x in unativeintArray -> x|]'(native uint[] xs) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 6 - .locals init (int32[] V_0, - int32[] V_1, + .locals init (native uint[] V_0, + native uint[] V_1, int32 V_2, - int32 V_3, + native uint V_3, int32 V_4, - int32[] V_5, - int32 V_6, - int32[] V_7) - IL_0000: ldarg.1 + native uint[] V_5) + IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int32 + IL_0005: newarr [runtime]System.UIntPtr IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0033 + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.i4 + IL_0013: ldelem.i IL_0014: stloc.3 IL_0015: stloc.s V_4 IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 - IL_001d: ldarg.0 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: pop - IL_0025: stloc.s V_6 - IL_0027: stloc.s V_7 - IL_0029: ldloc.s V_7 - IL_002b: ldloc.s V_6 - IL_002d: ldloc.3 - IL_002e: stelem.i4 - IL_002f: ldloc.2 - IL_0030: ldc.i4.1 - IL_0031: add - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: ldloc.1 - IL_0035: ldlen - IL_0036: conv.i4 - IL_0037: blt.s IL_000f + IL_001d: ldloc.3 + IL_001e: stelem.i + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f - IL_0039: ldloc.1 - IL_003a: ret + IL_0029: ldloc.1 + IL_002a: ret } - .method public static int32[] f4(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - int32[] 'array') cil managed + .method public static int32[] f0(int32[] 'array') cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) .maxstack 6 .locals init (int32[] V_0, @@ -1069,12 +823,8 @@ int32 V_2, int32 V_3, int32 V_4, - int32[] V_5, - int32 V_6, - int32[] V_7, - int32 V_8, - int32[] V_9) - IL_0000: ldarg.2 + int32[] V_5) + IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen @@ -1083,7 +833,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0043 + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -1095,39 +845,23 @@ IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 - IL_001d: ldarg.0 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: pop - IL_0025: stloc.s V_6 - IL_0027: stloc.s V_7 - IL_0029: ldloc.s V_7 - IL_002b: ldloc.s V_6 - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0034: pop - IL_0035: stloc.s V_8 - IL_0037: stloc.s V_9 - IL_0039: ldloc.s V_9 - IL_003b: ldloc.s V_8 - IL_003d: ldloc.3 - IL_003e: stelem.i4 - IL_003f: ldloc.2 - IL_0040: ldc.i4.1 - IL_0041: add - IL_0042: stloc.2 - IL_0043: ldloc.2 - IL_0044: ldloc.1 - IL_0045: ldlen - IL_0046: conv.i4 - IL_0047: blt.s IL_000f + IL_001d: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f - IL_0049: ldloc.1 - IL_004a: ret + IL_0029: ldloc.1 + IL_002a: ret } - .method public static int32[] f5(int32[] 'array') cil managed + .method public static int32[] f00(int32[] 'array') cil managed { .maxstack 6 @@ -1174,10 +908,8 @@ IL_002a: ret } - .method public static int32[] f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - int32[] 'array') cil managed + .method public static int32[] f000(int32[] 'array') cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 6 .locals init (int32[] V_0, @@ -1188,7 +920,7 @@ int32[] V_5, int32 V_6, int32[] V_7) - IL_0000: ldarg.1 + IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen @@ -1197,7 +929,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0033 + IL_000d: br.s IL_002b IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -1209,36 +941,28 @@ IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 - IL_001d: ldarg.0 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: pop - IL_0025: stloc.s V_6 - IL_0027: stloc.s V_7 - IL_0029: ldloc.s V_7 - IL_002b: ldloc.s V_6 - IL_002d: ldloc.3 - IL_002e: stelem.i4 - IL_002f: ldloc.2 - IL_0030: ldc.i4.1 - IL_0031: add - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: ldloc.1 - IL_0035: ldlen - IL_0036: conv.i4 - IL_0037: blt.s IL_000f + IL_001d: stloc.s V_6 + IL_001f: stloc.s V_7 + IL_0021: ldloc.s V_7 + IL_0023: ldloc.s V_6 + IL_0025: ldloc.3 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_000f - IL_0039: ldloc.1 - IL_003a: ret + IL_0031: ldloc.1 + IL_0032: ret } - .method public static int32[] f7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - int32[] 'array') cil managed + .method public static int32[] f0000(int32[] 'array') cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) .maxstack 6 .locals init (int32[] V_0, @@ -1248,10 +972,8 @@ int32 V_4, int32[] V_5, int32 V_6, - int32[] V_7, - int32 V_8, - int32[] V_9) - IL_0000: ldarg.2 + int32[] V_7) + IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen @@ -1260,7 +982,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0043 + IL_000d: br.s IL_002b IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -1272,173 +994,185 @@ IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 - IL_001d: ldarg.0 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: pop - IL_0025: stloc.s V_6 - IL_0027: stloc.s V_7 - IL_0029: ldloc.s V_7 - IL_002b: ldloc.s V_6 - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0034: pop - IL_0035: stloc.s V_8 - IL_0037: stloc.s V_9 - IL_0039: ldloc.s V_9 - IL_003b: ldloc.s V_8 - IL_003d: ldloc.3 - IL_003e: stelem.i4 - IL_003f: ldloc.2 - IL_0040: ldc.i4.1 - IL_0041: add - IL_0042: stloc.2 - IL_0043: ldloc.2 - IL_0044: ldloc.1 - IL_0045: ldlen - IL_0046: conv.i4 - IL_0047: blt.s IL_000f + IL_001d: stloc.s V_6 + IL_001f: stloc.s V_7 + IL_0021: ldloc.s V_7 + IL_0023: ldloc.s V_6 + IL_0025: ldloc.3 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_000f - IL_0049: ldloc.1 - IL_004a: ret + IL_0031: ldloc.1 + IL_0032: ret } - .method public static int32[] f8(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - int32[] 'array') cil managed + .method public static int32[] f00000(int32[] 'array', + int32 x, + int32 y) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 6 - .locals init (int32 V_0, - int32 V_1, - int32[] V_2, - int32[] V_3, + .locals init (int32[] V_0, + int32[] V_1, + int32 V_2, + int32 V_3, int32 V_4, int32 V_5, - int32 V_6, - int32[] V_7) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: stloc.0 - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: stloc.1 - IL_0011: ldarg.2 - IL_0012: stloc.2 - IL_0013: ldloc.2 - IL_0014: ldlen - IL_0015: conv.i4 - IL_0016: newarr [runtime]System.Int32 - IL_001b: stloc.3 - IL_001c: ldc.i4.0 - IL_001d: stloc.s V_4 - IL_001f: br.s IL_003f + int32[] V_6, + int32 V_7, + int32[] V_8, + int32 V_9, + int32[] V_10) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0043 - IL_0021: ldloc.3 - IL_0022: ldloc.s V_4 - IL_0024: ldloc.2 - IL_0025: ldloc.s V_4 - IL_0027: ldelem.i4 - IL_0028: stloc.s V_5 - IL_002a: stloc.s V_6 - IL_002c: stloc.s V_7 - IL_002e: ldloc.s V_7 - IL_0030: ldloc.s V_6 - IL_0032: ldloc.s V_5 - IL_0034: ldloc.0 - IL_0035: add - IL_0036: ldloc.1 - IL_0037: add - IL_0038: stelem.i4 - IL_0039: ldloc.s V_4 - IL_003b: ldc.i4.1 - IL_003c: add - IL_003d: stloc.s V_4 - IL_003f: ldloc.s V_4 - IL_0041: ldloc.3 - IL_0042: ldlen - IL_0043: conv.i4 - IL_0044: blt.s IL_0021 + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: stloc.s V_5 + IL_0017: stloc.s V_6 + IL_0019: ldloc.s V_6 + IL_001b: ldloc.s V_5 + IL_001d: ldloc.3 + IL_001e: ldarg.1 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: stloc.s V_7 + IL_0024: stloc.s V_8 + IL_0026: ldloc.s V_8 + IL_0028: ldloc.s V_7 + IL_002a: ldloc.3 + IL_002b: ldarg.2 + IL_002c: add + IL_002d: stloc.s V_5 + IL_002f: stloc.s V_9 + IL_0031: stloc.s V_10 + IL_0033: ldloc.s V_10 + IL_0035: ldloc.s V_9 + IL_0037: ldloc.3 + IL_0038: ldloc.s V_4 + IL_003a: add + IL_003b: ldloc.s V_5 + IL_003d: add + IL_003e: stelem.i4 + IL_003f: ldloc.2 + IL_0040: ldc.i4.1 + IL_0041: add + IL_0042: stloc.2 + IL_0043: ldloc.2 + IL_0044: ldloc.1 + IL_0045: ldlen + IL_0046: conv.i4 + IL_0047: blt.s IL_000f - IL_0046: ldloc.3 - IL_0047: ret + IL_0049: ldloc.1 + IL_004a: ret } - .method public static int32[] f9(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - int32[] 'array') cil managed + .method public static int32[] f000000(int32[] 'array', + int32 x, + int32 y) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 6 - .locals init (int32 V_0, + .locals init (int32[] V_0, int32[] V_1, - int32[] V_2, + int32 V_2, int32 V_3, int32 V_4, int32 V_5, - int32[] V_6) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: stloc.0 - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: pop - IL_0011: ldarg.2 - IL_0012: stloc.1 - IL_0013: ldloc.1 - IL_0014: ldlen - IL_0015: conv.i4 - IL_0016: newarr [runtime]System.Int32 - IL_001b: stloc.2 - IL_001c: ldc.i4.0 - IL_001d: stloc.3 - IL_001e: br.s IL_0038 + int32[] V_6, + int32 V_7, + int32[] V_8, + int32 V_9, + int32[] V_10) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0043 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: ldloc.1 - IL_0023: ldloc.3 - IL_0024: ldelem.i4 - IL_0025: stloc.s V_4 - IL_0027: stloc.s V_5 - IL_0029: stloc.s V_6 - IL_002b: ldloc.s V_6 - IL_002d: ldloc.s V_5 - IL_002f: ldloc.s V_4 - IL_0031: ldloc.0 - IL_0032: add - IL_0033: stelem.i4 - IL_0034: ldloc.3 - IL_0035: ldc.i4.1 - IL_0036: add - IL_0037: stloc.3 - IL_0038: ldloc.3 - IL_0039: ldloc.2 - IL_003a: ldlen - IL_003b: conv.i4 - IL_003c: blt.s IL_0020 + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: stloc.s V_5 + IL_0017: stloc.s V_6 + IL_0019: ldloc.s V_6 + IL_001b: ldloc.s V_5 + IL_001d: ldloc.3 + IL_001e: ldarg.1 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: stloc.s V_7 + IL_0024: stloc.s V_8 + IL_0026: ldloc.s V_8 + IL_0028: ldloc.s V_7 + IL_002a: ldloc.3 + IL_002b: ldarg.2 + IL_002c: add + IL_002d: stloc.s V_5 + IL_002f: stloc.s V_9 + IL_0031: stloc.s V_10 + IL_0033: ldloc.s V_10 + IL_0035: ldloc.s V_9 + IL_0037: ldloc.3 + IL_0038: ldloc.s V_4 + IL_003a: add + IL_003b: ldloc.s V_5 + IL_003d: add + IL_003e: stelem.i4 + IL_003f: ldloc.2 + IL_0040: ldc.i4.1 + IL_0041: add + IL_0042: stloc.2 + IL_0043: ldloc.2 + IL_0044: ldloc.1 + IL_0045: ldlen + IL_0046: conv.i4 + IL_0047: blt.s IL_000f - IL_003e: ldloc.2 - IL_003f: ret + IL_0049: ldloc.1 + IL_004a: ret } - .method public static int32[] f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - int32[] 'array') cil managed + .method public static int32[] f0000000(int32[] 'array', + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + int32 x, + int32 y) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 04 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 01 00 00 00 00 00 ) .maxstack 6 .locals init (int32[] V_0, @@ -1446,120 +1180,172 @@ int32 V_2, int32 V_3, int32 V_4, - int32[] V_5) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: pop - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: pop - IL_0011: ldarg.2 - IL_0012: stloc.0 - IL_0013: ldloc.0 - IL_0014: ldlen - IL_0015: conv.i4 - IL_0016: newarr [runtime]System.Int32 - IL_001b: stloc.1 - IL_001c: ldc.i4.0 - IL_001d: stloc.2 - IL_001e: br.s IL_0034 + int32[] V_5, + int32 V_6, + int32[] V_7, + int32 V_8, + int32[] V_9, + int32 V_10, + int32[] V_11) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0053 - IL_0020: ldloc.1 - IL_0021: ldloc.2 - IL_0022: ldloc.0 - IL_0023: ldloc.2 - IL_0024: ldelem.i4 - IL_0025: stloc.3 - IL_0026: stloc.s V_4 - IL_0028: stloc.s V_5 - IL_002a: ldloc.s V_5 - IL_002c: ldloc.s V_4 - IL_002e: ldloc.3 - IL_002f: stelem.i4 - IL_0030: ldloc.2 - IL_0031: ldc.i4.1 - IL_0032: add - IL_0033: stloc.2 - IL_0034: ldloc.2 - IL_0035: ldloc.1 - IL_0036: ldlen - IL_0037: conv.i4 - IL_0038: blt.s IL_0020 + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: pop + IL_0025: stloc.s V_6 + IL_0027: stloc.s V_7 + IL_0029: ldloc.s V_7 + IL_002b: ldloc.s V_6 + IL_002d: ldloc.3 + IL_002e: ldarg.2 + IL_002f: add + IL_0030: stloc.s V_4 + IL_0032: stloc.s V_8 + IL_0034: stloc.s V_9 + IL_0036: ldloc.s V_9 + IL_0038: ldloc.s V_8 + IL_003a: ldloc.3 + IL_003b: ldarg.3 + IL_003c: add + IL_003d: stloc.s V_6 + IL_003f: stloc.s V_10 + IL_0041: stloc.s V_11 + IL_0043: ldloc.s V_11 + IL_0045: ldloc.s V_10 + IL_0047: ldloc.3 + IL_0048: ldloc.s V_4 + IL_004a: add + IL_004b: ldloc.s V_6 + IL_004d: add + IL_004e: stelem.i4 + IL_004f: ldloc.2 + IL_0050: ldc.i4.1 + IL_0051: add + IL_0052: stloc.2 + IL_0053: ldloc.2 + IL_0054: ldloc.1 + IL_0055: ldlen + IL_0056: conv.i4 + IL_0057: blt.s IL_000f - IL_003a: ldloc.1 - IL_003b: ret + IL_0059: ldloc.1 + IL_005a: ret } - .method public static int32[] f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - int32[] 'array') cil managed + .method public static int32[] f00000000(int32[] 'array', + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + int32 x, + int32 y) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 04 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 01 00 00 00 00 00 ) .maxstack 6 - .locals init (int32 V_0, + .locals init (int32[] V_0, int32[] V_1, - int32[] V_2, + int32 V_2, int32 V_3, int32 V_4, int32 V_5, - int32[] V_6) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: pop - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: stloc.0 - IL_0011: ldarg.2 - IL_0012: stloc.1 - IL_0013: ldloc.1 - IL_0014: ldlen - IL_0015: conv.i4 - IL_0016: newarr [runtime]System.Int32 - IL_001b: stloc.2 - IL_001c: ldc.i4.0 - IL_001d: stloc.3 - IL_001e: br.s IL_0038 + int32[] V_6, + int32 V_7, + int32[] V_8, + int32 V_9, + int32[] V_10, + int32 V_11, + int32[] V_12) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0053 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: ldloc.1 - IL_0023: ldloc.3 - IL_0024: ldelem.i4 - IL_0025: stloc.s V_4 - IL_0027: stloc.s V_5 - IL_0029: stloc.s V_6 - IL_002b: ldloc.s V_6 - IL_002d: ldloc.s V_5 - IL_002f: ldloc.s V_4 - IL_0031: ldloc.0 - IL_0032: add - IL_0033: stelem.i4 - IL_0034: ldloc.3 - IL_0035: ldc.i4.1 - IL_0036: add - IL_0037: stloc.3 - IL_0038: ldloc.3 - IL_0039: ldloc.2 - IL_003a: ldlen - IL_003b: conv.i4 - IL_003c: blt.s IL_0020 + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: stloc.s V_5 + IL_0017: stloc.s V_6 + IL_0019: ldloc.s V_6 + IL_001b: ldloc.s V_5 + IL_001d: ldloc.3 + IL_001e: ldarg.2 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: stloc.s V_7 + IL_0024: stloc.s V_8 + IL_0026: ldloc.s V_8 + IL_0028: ldloc.s V_7 + IL_002a: ldarg.1 + IL_002b: ldnull + IL_002c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0031: pop + IL_0032: stloc.s V_9 + IL_0034: stloc.s V_10 + IL_0036: ldloc.s V_10 + IL_0038: ldloc.s V_9 + IL_003a: ldloc.3 + IL_003b: ldarg.3 + IL_003c: add + IL_003d: stloc.s V_5 + IL_003f: stloc.s V_11 + IL_0041: stloc.s V_12 + IL_0043: ldloc.s V_12 + IL_0045: ldloc.s V_11 + IL_0047: ldloc.3 + IL_0048: ldloc.s V_4 + IL_004a: add + IL_004b: ldloc.s V_5 + IL_004d: add + IL_004e: stelem.i4 + IL_004f: ldloc.2 + IL_0050: ldc.i4.1 + IL_0051: add + IL_0052: stloc.2 + IL_0053: ldloc.2 + IL_0054: ldloc.1 + IL_0055: ldlen + IL_0056: conv.i4 + IL_0057: blt.s IL_000f - IL_003e: ldloc.2 - IL_003f: ret + IL_0059: ldloc.1 + IL_005a: ret } - .method public static int32[] f12(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - int32 y) cil managed + .method public static int32[] f000000000(int32[] 'array', + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + int32 x, + int32 y) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 04 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 01 00 00 00 00 00 ) .maxstack 6 .locals init (int32[] V_0, @@ -1567,286 +1353,216 @@ int32 V_2, int32 V_3, int32 V_4, - int32[] V_5) + int32 V_5, + int32[] V_6, + int32 V_7, + int32[] V_8, + int32 V_9, + int32[] V_10, + int32 V_11, + int32[] V_12) IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldlen - IL_000a: conv.i4 - IL_000b: newarr [runtime]System.Int32 - IL_0010: stloc.1 - IL_0011: ldc.i4.0 - IL_0012: stloc.2 - IL_0013: br.s IL_002b - - IL_0015: ldloc.1 - IL_0016: ldloc.2 - IL_0017: ldloc.0 - IL_0018: ldloc.2 - IL_0019: ldelem.i4 - IL_001a: stloc.3 - IL_001b: stloc.s V_4 - IL_001d: stloc.s V_5 - IL_001f: ldloc.s V_5 - IL_0021: ldloc.s V_4 - IL_0023: ldloc.3 - IL_0024: ldarg.1 - IL_0025: add - IL_0026: stelem.i4 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.2 - IL_002b: ldloc.2 - IL_002c: ldloc.1 - IL_002d: ldlen - IL_002e: conv.i4 - IL_002f: blt.s IL_0015 - - IL_0031: ldloc.1 - IL_0032: ret - } - - .method public static int32[] 'for _ in Array.groupBy id [||] do ...'() cil managed - { - - .maxstack 5 - .locals init (class [runtime]System.Tuple`2[] V_0, - int32[] V_1, - int32 V_2, - int32 V_3, - int32[] V_4) - IL_0000: ldsfld class assembly/'for _ in Array-groupBy id -||- do ---@28' assembly/'for _ in Array-groupBy id -||- do ---@28'::@_instance - IL_0005: call !!0[] [runtime]System.Array::Empty() - IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - !!0[]) - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: ldlen - IL_0012: conv.i4 - IL_0013: newarr [runtime]System.Int32 - IL_0018: stloc.1 - IL_0019: ldc.i4.0 - IL_001a: stloc.2 - IL_001b: br.s IL_002b - - IL_001d: ldloc.1 - IL_001e: ldloc.2 - IL_001f: stloc.3 - IL_0020: stloc.s V_4 - IL_0022: ldloc.s V_4 - IL_0024: ldloc.3 - IL_0025: ldc.i4.0 - IL_0026: stelem.i4 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.2 - IL_002b: ldloc.2 - IL_002c: ldloc.1 - IL_002d: ldlen - IL_002e: conv.i4 - IL_002f: blt.s IL_001d - - IL_0031: ldloc.1 - IL_0032: ret - } - - .method public static int32[] 'for _ | _ in Array.groupBy id [||] do ...'() cil managed - { - - .maxstack 5 - .locals init (class [runtime]System.Tuple`2[] V_0, - int32[] V_1, - int32 V_2, - int32 V_3, - int32[] V_4) - IL_0000: ldsfld class assembly/'for _ | _ in Array-groupBy id -||- do ---@29' assembly/'for _ | _ in Array-groupBy id -||- do ---@29'::@_instance - IL_0005: call !!0[] [runtime]System.Array::Empty() - IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - !!0[]) - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: ldlen - IL_0012: conv.i4 - IL_0013: newarr [runtime]System.Int32 - IL_0018: stloc.1 - IL_0019: ldc.i4.0 - IL_001a: stloc.2 - IL_001b: br.s IL_002b + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0053 - IL_001d: ldloc.1 - IL_001e: ldloc.2 - IL_001f: stloc.3 + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: stloc.s V_5 + IL_0017: stloc.s V_6 + IL_0019: ldloc.s V_6 + IL_001b: ldloc.s V_5 + IL_001d: ldloc.3 + IL_001e: ldarg.2 + IL_001f: add IL_0020: stloc.s V_4 - IL_0022: ldloc.s V_4 - IL_0024: ldloc.3 - IL_0025: ldc.i4.0 - IL_0026: stelem.i4 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.2 - IL_002b: ldloc.2 - IL_002c: ldloc.1 - IL_002d: ldlen - IL_002e: conv.i4 - IL_002f: blt.s IL_001d + IL_0022: stloc.s V_7 + IL_0024: stloc.s V_8 + IL_0026: ldloc.s V_8 + IL_0028: ldloc.s V_7 + IL_002a: ldloc.3 + IL_002b: ldarg.3 + IL_002c: add + IL_002d: stloc.s V_5 + IL_002f: stloc.s V_9 + IL_0031: stloc.s V_10 + IL_0033: ldloc.s V_10 + IL_0035: ldloc.s V_9 + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_003e: pop + IL_003f: stloc.s V_11 + IL_0041: stloc.s V_12 + IL_0043: ldloc.s V_12 + IL_0045: ldloc.s V_11 + IL_0047: ldloc.3 + IL_0048: ldloc.s V_4 + IL_004a: add + IL_004b: ldloc.s V_5 + IL_004d: add + IL_004e: stelem.i4 + IL_004f: ldloc.2 + IL_0050: ldc.i4.1 + IL_0051: add + IL_0052: stloc.2 + IL_0053: ldloc.2 + IL_0054: ldloc.1 + IL_0055: ldlen + IL_0056: conv.i4 + IL_0057: blt.s IL_000f - IL_0031: ldloc.1 - IL_0032: ret + IL_0059: ldloc.1 + IL_005a: ret } - .method public static int32[] 'for _ & _ in Array.groupBy id [||] do ...'() cil managed + .method public static int32[] f0000000000(int32[] 'array', + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + int32 x, + int32 y) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 04 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 01 00 00 00 00 00 ) .maxstack 5 - .locals init (class [runtime]System.Tuple`2[] V_0, - int32[] V_1, - int32 V_2, + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, + class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - int32[] V_4) - IL_0000: ldsfld class assembly/'for _ - _ in Array-groupBy id -||- do ---@30' assembly/'for _ - _ in Array-groupBy id -||- do ---@30'::@_instance - IL_0005: call !!0[] [runtime]System.Array::Empty() - IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - !!0[]) - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: ldlen - IL_0012: conv.i4 - IL_0013: newarr [runtime]System.Int32 - IL_0018: stloc.1 - IL_0019: ldc.i4.0 - IL_001a: stloc.2 - IL_001b: br.s IL_002b - - IL_001d: ldloc.1 - IL_001e: ldloc.2 - IL_001f: stloc.3 - IL_0020: stloc.s V_4 - IL_0022: ldloc.s V_4 - IL_0024: ldloc.3 - IL_0025: ldc.i4.0 - IL_0026: stelem.i4 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.2 - IL_002b: ldloc.2 - IL_002c: ldloc.1 - IL_002d: ldlen - IL_002e: conv.i4 - IL_002f: blt.s IL_001d + int32 V_4, + int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_7, + class [runtime]System.IDisposable V_8) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0007: stloc.1 + .try + { + IL_0008: br.s IL_0041 - IL_0031: ldloc.1 - IL_0032: ret - } + IL_000a: ldloc.1 + IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0010: stloc.3 + IL_0011: ldloc.3 + IL_0012: ldarg.2 + IL_0013: add + IL_0014: stloc.s V_4 + IL_0016: ldloc.3 + IL_0017: ldarg.3 + IL_0018: add + IL_0019: stloc.s V_5 + IL_001b: ldloca.s V_0 + IL_001d: stloc.s V_6 + IL_001f: ldloc.s V_6 + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloca.s V_0 + IL_0030: stloc.s V_7 + IL_0032: ldloc.s V_7 + IL_0034: ldloc.3 + IL_0035: ldloc.s V_4 + IL_0037: add + IL_0038: ldloc.s V_5 + IL_003a: add + IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0040: nop + IL_0041: ldloc.1 + IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0047: brtrue.s IL_000a - .method public static int32[] 'for _, _group in Array.groupBy id [||] do ...'() cil managed - { - - .maxstack 5 - .locals init (class [runtime]System.Tuple`2[] V_0, - int32[] V_1, - int32 V_2, - int32 V_3, - int32[] V_4) - IL_0000: ldsfld class assembly/'for _, _group in Array-groupBy id -||- do ---@31' assembly/'for _, _group in Array-groupBy id -||- do ---@31'::@_instance - IL_0005: call !!0[] [runtime]System.Array::Empty() - IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - !!0[]) - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: ldlen - IL_0012: conv.i4 - IL_0013: newarr [runtime]System.Int32 - IL_0018: stloc.1 - IL_0019: ldc.i4.0 - IL_001a: stloc.2 - IL_001b: br.s IL_002b + IL_0049: ldnull + IL_004a: stloc.2 + IL_004b: leave.s IL_0062 - IL_001d: ldloc.1 - IL_001e: ldloc.2 - IL_001f: stloc.3 - IL_0020: stloc.s V_4 - IL_0022: ldloc.s V_4 - IL_0024: ldloc.3 - IL_0025: ldc.i4.0 - IL_0026: stelem.i4 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.2 - IL_002b: ldloc.2 - IL_002c: ldloc.1 - IL_002d: ldlen - IL_002e: conv.i4 - IL_002f: blt.s IL_001d + } + finally + { + IL_004d: ldloc.1 + IL_004e: isinst [runtime]System.IDisposable + IL_0053: stloc.s V_8 + IL_0055: ldloc.s V_8 + IL_0057: brfalse.s IL_0061 - IL_0031: ldloc.1 - IL_0032: ret + IL_0059: ldloc.s V_8 + IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0060: endfinally + IL_0061: endfinally + } + IL_0062: ldloc.2 + IL_0063: pop + IL_0064: ldloca.s V_0 + IL_0066: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_006b: ret } - .method public static int32[] 'for _, group in Array.groupBy id [||] do ...'() cil managed + .method public static int32[] f1(int32[] 'array') cil managed { .maxstack 6 - .locals init (class [runtime]System.Tuple`2[] V_0, + .locals init (int32[] V_0, int32[] V_1, int32 V_2, - class [runtime]System.Tuple`2 V_3, - object[] V_4, - int32 V_5, - int32[] V_6) - IL_0000: ldsfld class assembly/'for _, group in Array-groupBy id -||- do ---@32' assembly/'for _, group in Array-groupBy id -||- do ---@32'::@_instance - IL_0005: call !!0[] [runtime]System.Array::Empty() - IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - !!0[]) - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: ldlen - IL_0012: conv.i4 - IL_0013: newarr [runtime]System.Int32 - IL_0018: stloc.1 - IL_0019: ldc.i4.0 - IL_001a: stloc.2 - IL_001b: br.s IL_0040 - - IL_001d: ldloc.1 - IL_001e: ldloc.2 - IL_001f: ldloc.0 - IL_0020: ldloc.2 - IL_0021: ldelem class [runtime]System.Tuple`2 - IL_0026: stloc.3 - IL_0027: ldloc.3 - IL_0028: call instance !1 class [runtime]System.Tuple`2::get_Item2() - IL_002d: stloc.s V_4 - IL_002f: stloc.s V_5 - IL_0031: stloc.s V_6 - IL_0033: ldloc.s V_6 - IL_0035: ldloc.s V_5 - IL_0037: ldloc.s V_4 - IL_0039: ldlen - IL_003a: conv.i4 - IL_003b: stelem.i4 - IL_003c: ldloc.2 - IL_003d: ldc.i4.1 - IL_003e: add - IL_003f: stloc.2 - IL_0040: ldloc.2 - IL_0041: ldloc.1 - IL_0042: ldlen - IL_0043: conv.i4 - IL_0044: blt.s IL_001d + int32 V_3, + int32 V_4, + int32[] V_5) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0023 - IL_0046: ldloc.1 - IL_0047: ret + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } - .method public static int32[] 'for 1 | 2 | _ in ...'() cil managed + .method public static int32[] f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + int32[] 'array') cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) .maxstack 6 .locals init (int32[] V_0, @@ -1855,141 +1571,153 @@ int32 V_3, int32 V_4, int32[] V_5) - IL_0000: call !!0[] [runtime]System.Array::Empty() - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldlen - IL_0008: conv.i4 - IL_0009: newarr [runtime]System.Int32 - IL_000e: stloc.1 - IL_000f: ldc.i4.0 - IL_0010: stloc.2 - IL_0011: br.s IL_0038 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: pop + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: pop + IL_0011: ldarg.2 + IL_0012: stloc.0 + IL_0013: ldloc.0 + IL_0014: ldlen + IL_0015: conv.i4 + IL_0016: newarr [runtime]System.Int32 + IL_001b: stloc.1 + IL_001c: ldc.i4.0 + IL_001d: stloc.2 + IL_001e: br.s IL_0034 - IL_0013: ldloc.1 - IL_0014: ldloc.2 - IL_0015: ldloc.0 - IL_0016: ldloc.2 - IL_0017: ldelem.i4 - IL_0018: stloc.3 - IL_0019: ldloc.3 - IL_001a: ldc.i4.1 - IL_001b: sub - IL_001c: switch ( - IL_0029, - IL_0029) - IL_0029: stloc.s V_4 - IL_002b: stloc.s V_5 - IL_002d: ldloc.s V_5 - IL_002f: ldloc.s V_4 - IL_0031: ldc.i4.0 - IL_0032: nop - IL_0033: stelem.i4 + IL_0020: ldloc.1 + IL_0021: ldloc.2 + IL_0022: ldloc.0 + IL_0023: ldloc.2 + IL_0024: ldelem.i4 + IL_0025: stloc.3 + IL_0026: stloc.s V_4 + IL_0028: stloc.s V_5 + IL_002a: ldloc.s V_5 + IL_002c: ldloc.s V_4 + IL_002e: ldloc.3 + IL_002f: stelem.i4 + IL_0030: ldloc.2 + IL_0031: ldc.i4.1 + IL_0032: add + IL_0033: stloc.2 IL_0034: ldloc.2 - IL_0035: ldc.i4.1 - IL_0036: add - IL_0037: stloc.2 - IL_0038: ldloc.2 - IL_0039: ldloc.1 - IL_003a: ldlen - IL_003b: conv.i4 - IL_003c: blt.s IL_0013 + IL_0035: ldloc.1 + IL_0036: ldlen + IL_0037: conv.i4 + IL_0038: blt.s IL_0020 - IL_003e: ldloc.1 - IL_003f: ret + IL_003a: ldloc.1 + IL_003b: ret } - .method public static int32[] 'for Failure _ | _ in ...'() cil managed + .method public static int32[] f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + int32[] 'array') cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) .maxstack 6 - .locals init (class [runtime]System.Exception[] V_0, + .locals init (int32 V_0, int32[] V_1, - int32 V_2, - class [runtime]System.Exception V_3, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4, + int32[] V_2, + int32 V_3, + int32 V_4, int32 V_5, int32[] V_6) - IL_0000: call !!0[] [runtime]System.Array::Empty() - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldlen - IL_0008: conv.i4 - IL_0009: newarr [runtime]System.Int32 - IL_000e: stloc.1 - IL_000f: ldc.i4.0 - IL_0010: stloc.2 - IL_0011: br.s IL_0038 - + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: pop + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: stloc.0 + IL_0011: ldarg.2 + IL_0012: stloc.1 IL_0013: ldloc.1 - IL_0014: ldloc.2 - IL_0015: ldloc.0 - IL_0016: ldloc.2 - IL_0017: ldelem [runtime]System.Exception - IL_001c: stloc.3 - IL_001d: ldloc.3 - IL_001e: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) - IL_0023: stloc.s V_4 - IL_0025: ldloc.s V_4 - IL_0027: brfalse.s IL_0029 + IL_0014: ldlen + IL_0015: conv.i4 + IL_0016: newarr [runtime]System.Int32 + IL_001b: stloc.2 + IL_001c: ldc.i4.0 + IL_001d: stloc.3 + IL_001e: br.s IL_0038 - IL_0029: stloc.s V_5 - IL_002b: stloc.s V_6 - IL_002d: ldloc.s V_6 - IL_002f: ldloc.s V_5 - IL_0031: ldc.i4.0 - IL_0032: nop + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: ldloc.1 + IL_0023: ldloc.3 + IL_0024: ldelem.i4 + IL_0025: stloc.s V_4 + IL_0027: stloc.s V_5 + IL_0029: stloc.s V_6 + IL_002b: ldloc.s V_6 + IL_002d: ldloc.s V_5 + IL_002f: ldloc.s V_4 + IL_0031: ldloc.0 + IL_0032: add IL_0033: stelem.i4 - IL_0034: ldloc.2 + IL_0034: ldloc.3 IL_0035: ldc.i4.1 IL_0036: add - IL_0037: stloc.2 - IL_0038: ldloc.2 - IL_0039: ldloc.1 + IL_0037: stloc.3 + IL_0038: ldloc.3 + IL_0039: ldloc.2 IL_003a: ldlen IL_003b: conv.i4 - IL_003c: blt.s IL_0013 + IL_003c: blt.s IL_0020 - IL_003e: ldloc.1 + IL_003e: ldloc.2 IL_003f: ret } - .method public static int32[] 'for true | false in ...'() cil managed + .method public static int32[] f12(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + int32 y) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 6 - .locals init (bool[] V_0, + .locals init (int32[] V_0, int32[] V_1, int32 V_2, - bool V_3, + int32 V_3, int32 V_4, int32[] V_5) - IL_0000: call !!0[] [runtime]System.Array::Empty() - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldlen - IL_0008: conv.i4 - IL_0009: newarr [runtime]System.Int32 - IL_000e: stloc.1 - IL_000f: ldc.i4.0 - IL_0010: stloc.2 - IL_0011: br.s IL_002b + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldlen + IL_000a: conv.i4 + IL_000b: newarr [runtime]System.Int32 + IL_0010: stloc.1 + IL_0011: ldc.i4.0 + IL_0012: stloc.2 + IL_0013: br.s IL_002b - IL_0013: ldloc.1 - IL_0014: ldloc.2 - IL_0015: ldloc.0 + IL_0015: ldloc.1 IL_0016: ldloc.2 - IL_0017: ldelem.u1 - IL_0018: stloc.3 - IL_0019: ldloc.3 - IL_001a: brfalse.s IL_001c - - IL_001c: stloc.s V_4 - IL_001e: stloc.s V_5 - IL_0020: ldloc.s V_5 - IL_0022: ldloc.s V_4 - IL_0024: ldc.i4.0 - IL_0025: nop + IL_0017: ldloc.0 + IL_0018: ldloc.2 + IL_0019: ldelem.i4 + IL_001a: stloc.3 + IL_001b: stloc.s V_4 + IL_001d: stloc.s V_5 + IL_001f: ldloc.s V_5 + IL_0021: ldloc.s V_4 + IL_0023: ldloc.3 + IL_0024: ldarg.1 + IL_0025: add IL_0026: stelem.i4 IL_0027: ldloc.2 IL_0028: ldc.i4.1 @@ -1999,168 +1727,209 @@ IL_002c: ldloc.1 IL_002d: ldlen IL_002e: conv.i4 - IL_002f: blt.s IL_0013 + IL_002f: blt.s IL_0015 IL_0031: ldloc.1 IL_0032: ret } - .method public static int32[] 'for true | _ in ...'() cil managed + .method public static !!a[] f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + int32[] 'array') cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 6 - .locals init (bool[] V_0, - int32[] V_1, + .locals init (int32[] V_0, + !!a[] V_1, int32 V_2, - bool V_3, + int32 V_3, int32 V_4, - int32[] V_5) - IL_0000: call !!0[] [runtime]System.Array::Empty() - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldlen - IL_0008: conv.i4 - IL_0009: newarr [runtime]System.Int32 - IL_000e: stloc.1 - IL_000f: ldc.i4.0 - IL_0010: stloc.2 - IL_0011: br.s IL_002b - - IL_0013: ldloc.1 - IL_0014: ldloc.2 - IL_0015: ldloc.0 - IL_0016: ldloc.2 - IL_0017: ldelem.u1 - IL_0018: stloc.3 - IL_0019: ldloc.3 - IL_001a: brfalse.s IL_001c + !!a[] V_5) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr !!a + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_002d - IL_001c: stloc.s V_4 - IL_001e: stloc.s V_5 - IL_0020: ldloc.s V_5 - IL_0022: ldloc.s V_4 - IL_0024: ldc.i4.0 - IL_0025: nop - IL_0026: stelem.i4 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.2 - IL_002b: ldloc.2 - IL_002c: ldloc.1 - IL_002d: ldlen - IL_002e: conv.i4 - IL_002f: blt.s IL_0013 + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldarg.0 + IL_001e: ldloc.3 + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: stelem !!a + IL_0029: ldloc.2 + IL_002a: ldc.i4.1 + IL_002b: add + IL_002c: stloc.2 + IL_002d: ldloc.2 + IL_002e: ldloc.1 + IL_002f: ldlen + IL_0030: conv.i4 + IL_0031: blt.s IL_000f - IL_0031: ldloc.1 - IL_0032: ret + IL_0033: ldloc.1 + IL_0034: ret } - .method public static int32[] 'for _ | true in ...'() cil managed + .method public static int32[] f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + int32[] 'array') cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 - .locals init (bool[] V_0, + .maxstack 6 + .locals init (int32[] V_0, int32[] V_1, int32 V_2, int32 V_3, - int32[] V_4) - IL_0000: call !!0[] [runtime]System.Array::Empty() - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldlen - IL_0008: conv.i4 - IL_0009: newarr [runtime]System.Int32 - IL_000e: stloc.1 - IL_000f: ldc.i4.0 - IL_0010: stloc.2 - IL_0011: br.s IL_0021 + int32 V_4, + int32[] V_5, + int32 V_6, + int32[] V_7) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldlen + IL_0004: conv.i4 + IL_0005: newarr [runtime]System.Int32 + IL_000a: stloc.1 + IL_000b: ldc.i4.0 + IL_000c: stloc.2 + IL_000d: br.s IL_0033 - IL_0013: ldloc.1 - IL_0014: ldloc.2 - IL_0015: stloc.3 - IL_0016: stloc.s V_4 - IL_0018: ldloc.s V_4 - IL_001a: ldloc.3 - IL_001b: ldc.i4.0 - IL_001c: stelem.i4 - IL_001d: ldloc.2 - IL_001e: ldc.i4.1 - IL_001f: add - IL_0020: stloc.2 - IL_0021: ldloc.2 - IL_0022: ldloc.1 - IL_0023: ldlen - IL_0024: conv.i4 - IL_0025: blt.s IL_0013 + IL_000f: ldloc.1 + IL_0010: ldloc.2 + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: ldelem.i4 + IL_0014: stloc.3 + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldarg.0 + IL_001e: ldnull + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: pop + IL_0025: stloc.s V_6 + IL_0027: stloc.s V_7 + IL_0029: ldloc.s V_7 + IL_002b: ldloc.s V_6 + IL_002d: ldloc.3 + IL_002e: stelem.i4 + IL_002f: ldloc.2 + IL_0030: ldc.i4.1 + IL_0031: add + IL_0032: stloc.2 + IL_0033: ldloc.2 + IL_0034: ldloc.1 + IL_0035: ldlen + IL_0036: conv.i4 + IL_0037: blt.s IL_000f - IL_0027: ldloc.1 - IL_0028: ret + IL_0039: ldloc.1 + IL_003a: ret } - .method public static int8[] '[|for x in sbyteArray -> x|]'(int8[] xs) cil managed + .method public static int32[] f4(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + int32[] 'array') cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) .maxstack 6 - .locals init (int8[] V_0, - int8[] V_1, + .locals init (int32[] V_0, + int32[] V_1, int32 V_2, - int8 V_3, + int32 V_3, int32 V_4, - int8[] V_5) - IL_0000: ldarg.0 + int32[] V_5, + int32 V_6, + int32[] V_7, + int32 V_8, + int32[] V_9) + IL_0000: ldarg.2 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.SByte + IL_0005: newarr [runtime]System.Int32 IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0023 + IL_000d: br.s IL_0043 IL_000f: ldloc.1 IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.i1 + IL_0013: ldelem.i4 IL_0014: stloc.3 IL_0015: stloc.s V_4 IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 - IL_001d: ldloc.3 - IL_001e: stelem.i1 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_001d: ldarg.0 + IL_001e: ldnull + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: pop + IL_0025: stloc.s V_6 + IL_0027: stloc.s V_7 + IL_0029: ldloc.s V_7 + IL_002b: ldloc.s V_6 + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0034: pop + IL_0035: stloc.s V_8 + IL_0037: stloc.s V_9 + IL_0039: ldloc.s V_9 + IL_003b: ldloc.s V_8 + IL_003d: ldloc.3 + IL_003e: stelem.i4 + IL_003f: ldloc.2 + IL_0040: ldc.i4.1 + IL_0041: add + IL_0042: stloc.2 + IL_0043: ldloc.2 + IL_0044: ldloc.1 + IL_0045: ldlen + IL_0046: conv.i4 + IL_0047: blt.s IL_000f - IL_0029: ldloc.1 - IL_002a: ret + IL_0049: ldloc.1 + IL_004a: ret } - .method public static uint8[] '[|for x in byteArray -> x|]'(uint8[] xs) cil managed + .method public static int32[] f5(int32[] 'array') cil managed { .maxstack 6 - .locals init (uint8[] V_0, - uint8[] V_1, + .locals init (int32[] V_0, + int32[] V_1, int32 V_2, - uint8 V_3, + int32 V_3, int32 V_4, - uint8[] V_5) + int32[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Byte + IL_0005: newarr [runtime]System.Int32 IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 @@ -2170,14 +1939,14 @@ IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.u1 + IL_0013: ldelem.i4 IL_0014: stloc.3 IL_0015: stloc.s V_4 IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 IL_001d: ldloc.3 - IL_001e: stelem.i1 + IL_001e: stelem.i4 IL_001f: ldloc.2 IL_0020: ldc.i4.1 IL_0021: add @@ -2192,521 +1961,752 @@ IL_002a: ret } - .method public static int16[] '[|for x in int16Array -> x|]'(int16[] xs) cil managed + .method public static int32[] f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + int32[] 'array') cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 6 - .locals init (int16[] V_0, - int16[] V_1, + .locals init (int32[] V_0, + int32[] V_1, int32 V_2, - int16 V_3, + int32 V_3, int32 V_4, - int16[] V_5) - IL_0000: ldarg.0 + int32[] V_5, + int32 V_6, + int32[] V_7) + IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int16 + IL_0005: newarr [runtime]System.Int32 IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0023 + IL_000d: br.s IL_0033 IL_000f: ldloc.1 IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.i2 + IL_0013: ldelem.i4 IL_0014: stloc.3 IL_0015: stloc.s V_4 IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 - IL_001d: ldloc.3 - IL_001e: stelem.i2 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_001d: ldarg.0 + IL_001e: ldnull + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: pop + IL_0025: stloc.s V_6 + IL_0027: stloc.s V_7 + IL_0029: ldloc.s V_7 + IL_002b: ldloc.s V_6 + IL_002d: ldloc.3 + IL_002e: stelem.i4 + IL_002f: ldloc.2 + IL_0030: ldc.i4.1 + IL_0031: add + IL_0032: stloc.2 + IL_0033: ldloc.2 + IL_0034: ldloc.1 + IL_0035: ldlen + IL_0036: conv.i4 + IL_0037: blt.s IL_000f - IL_0029: ldloc.1 - IL_002a: ret + IL_0039: ldloc.1 + IL_003a: ret } - .method public static uint16[] '[|for x in uint16Array -> x|]'(uint16[] xs) cil managed + .method public static int32[] f7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + int32[] 'array') cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) .maxstack 6 - .locals init (uint16[] V_0, - uint16[] V_1, + .locals init (int32[] V_0, + int32[] V_1, int32 V_2, - uint16 V_3, + int32 V_3, int32 V_4, - uint16[] V_5) - IL_0000: ldarg.0 + int32[] V_5, + int32 V_6, + int32[] V_7, + int32 V_8, + int32[] V_9) + IL_0000: ldarg.2 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: ldlen IL_0004: conv.i4 - IL_0005: newarr [runtime]System.UInt16 + IL_0005: newarr [runtime]System.Int32 IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0023 + IL_000d: br.s IL_0043 IL_000f: ldloc.1 IL_0010: ldloc.2 IL_0011: ldloc.0 IL_0012: ldloc.2 - IL_0013: ldelem.u2 + IL_0013: ldelem.i4 IL_0014: stloc.3 IL_0015: stloc.s V_4 IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 IL_001b: ldloc.s V_4 - IL_001d: ldloc.3 - IL_001e: stelem.i2 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_001d: ldarg.0 + IL_001e: ldnull + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: pop + IL_0025: stloc.s V_6 + IL_0027: stloc.s V_7 + IL_0029: ldloc.s V_7 + IL_002b: ldloc.s V_6 + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0034: pop + IL_0035: stloc.s V_8 + IL_0037: stloc.s V_9 + IL_0039: ldloc.s V_9 + IL_003b: ldloc.s V_8 + IL_003d: ldloc.3 + IL_003e: stelem.i4 + IL_003f: ldloc.2 + IL_0040: ldc.i4.1 + IL_0041: add + IL_0042: stloc.2 + IL_0043: ldloc.2 + IL_0044: ldloc.1 + IL_0045: ldlen + IL_0046: conv.i4 + IL_0047: blt.s IL_000f - IL_0029: ldloc.1 - IL_002a: ret + IL_0049: ldloc.1 + IL_004a: ret + } + + .method public static int32[] f8(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + int32[] 'array') cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 6 + .locals init (int32 V_0, + int32 V_1, + int32[] V_2, + int32[] V_3, + int32 V_4, + int32 V_5, + int32 V_6, + int32[] V_7) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: stloc.0 + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: stloc.1 + IL_0011: ldarg.2 + IL_0012: stloc.2 + IL_0013: ldloc.2 + IL_0014: ldlen + IL_0015: conv.i4 + IL_0016: newarr [runtime]System.Int32 + IL_001b: stloc.3 + IL_001c: ldc.i4.0 + IL_001d: stloc.s V_4 + IL_001f: br.s IL_003f + + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.2 + IL_0025: ldloc.s V_4 + IL_0027: ldelem.i4 + IL_0028: stloc.s V_5 + IL_002a: stloc.s V_6 + IL_002c: stloc.s V_7 + IL_002e: ldloc.s V_7 + IL_0030: ldloc.s V_6 + IL_0032: ldloc.s V_5 + IL_0034: ldloc.0 + IL_0035: add + IL_0036: ldloc.1 + IL_0037: add + IL_0038: stelem.i4 + IL_0039: ldloc.s V_4 + IL_003b: ldc.i4.1 + IL_003c: add + IL_003d: stloc.s V_4 + IL_003f: ldloc.s V_4 + IL_0041: ldloc.3 + IL_0042: ldlen + IL_0043: conv.i4 + IL_0044: blt.s IL_0021 + + IL_0046: ldloc.3 + IL_0047: ret + } + + .method public static int32[] f9(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + int32[] 'array') cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 6 + .locals init (int32 V_0, + int32[] V_1, + int32[] V_2, + int32 V_3, + int32 V_4, + int32 V_5, + int32[] V_6) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: stloc.0 + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: pop + IL_0011: ldarg.2 + IL_0012: stloc.1 + IL_0013: ldloc.1 + IL_0014: ldlen + IL_0015: conv.i4 + IL_0016: newarr [runtime]System.Int32 + IL_001b: stloc.2 + IL_001c: ldc.i4.0 + IL_001d: stloc.3 + IL_001e: br.s IL_0038 + + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: ldloc.1 + IL_0023: ldloc.3 + IL_0024: ldelem.i4 + IL_0025: stloc.s V_4 + IL_0027: stloc.s V_5 + IL_0029: stloc.s V_6 + IL_002b: ldloc.s V_6 + IL_002d: ldloc.s V_5 + IL_002f: ldloc.s V_4 + IL_0031: ldloc.0 + IL_0032: add + IL_0033: stelem.i4 + IL_0034: ldloc.3 + IL_0035: ldc.i4.1 + IL_0036: add + IL_0037: stloc.3 + IL_0038: ldloc.3 + IL_0039: ldloc.2 + IL_003a: ldlen + IL_003b: conv.i4 + IL_003c: blt.s IL_0020 + + IL_003e: ldloc.2 + IL_003f: ret } - .method public static char[] '[|for x in charArray -> x|]'(char[] xs) cil managed + .method public static int32[] 'for 1 | 2 | _ in ...'() cil managed { .maxstack 6 - .locals init (char[] V_0, - char[] V_1, + .locals init (int32[] V_0, + int32[] V_1, int32 V_2, - char V_3, + int32 V_3, int32 V_4, - char[] V_5) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Char - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_0023 + int32[] V_5) + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldlen + IL_0008: conv.i4 + IL_0009: newarr [runtime]System.Int32 + IL_000e: stloc.1 + IL_000f: ldc.i4.0 + IL_0010: stloc.2 + IL_0011: br.s IL_0038 - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.u2 - IL_0014: stloc.3 - IL_0015: stloc.s V_4 - IL_0017: stloc.s V_5 - IL_0019: ldloc.s V_5 - IL_001b: ldloc.s V_4 - IL_001d: ldloc.3 - IL_001e: stelem.i2 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_0013: ldloc.1 + IL_0014: ldloc.2 + IL_0015: ldloc.0 + IL_0016: ldloc.2 + IL_0017: ldelem.i4 + IL_0018: stloc.3 + IL_0019: ldloc.3 + IL_001a: ldc.i4.1 + IL_001b: sub + IL_001c: switch ( + IL_0029, + IL_0029) + IL_0029: stloc.s V_4 + IL_002b: stloc.s V_5 + IL_002d: ldloc.s V_5 + IL_002f: ldloc.s V_4 + IL_0031: ldc.i4.0 + IL_0032: nop + IL_0033: stelem.i4 + IL_0034: ldloc.2 + IL_0035: ldc.i4.1 + IL_0036: add + IL_0037: stloc.2 + IL_0038: ldloc.2 + IL_0039: ldloc.1 + IL_003a: ldlen + IL_003b: conv.i4 + IL_003c: blt.s IL_0013 - IL_0029: ldloc.1 - IL_002a: ret + IL_003e: ldloc.1 + IL_003f: ret } - .method public static int32[] '[|for x in intArray -> x|]'(int32[] xs) cil managed + .method public static int32[] 'for Failure _ | _ in ...'() cil managed { .maxstack 6 - .locals init (int32[] V_0, + .locals init (class [runtime]System.Exception[] V_0, int32[] V_1, int32 V_2, - int32 V_3, - int32 V_4, - int32[] V_5) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int32 - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_0023 + class [runtime]System.Exception V_3, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4, + int32 V_5, + int32[] V_6) + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldlen + IL_0008: conv.i4 + IL_0009: newarr [runtime]System.Int32 + IL_000e: stloc.1 + IL_000f: ldc.i4.0 + IL_0010: stloc.2 + IL_0011: br.s IL_0038 - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.i4 - IL_0014: stloc.3 - IL_0015: stloc.s V_4 - IL_0017: stloc.s V_5 - IL_0019: ldloc.s V_5 - IL_001b: ldloc.s V_4 + IL_0013: ldloc.1 + IL_0014: ldloc.2 + IL_0015: ldloc.0 + IL_0016: ldloc.2 + IL_0017: ldelem [runtime]System.Exception + IL_001c: stloc.3 IL_001d: ldloc.3 - IL_001e: stelem.i4 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_001e: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) + IL_0023: stloc.s V_4 + IL_0025: ldloc.s V_4 + IL_0027: brfalse.s IL_0029 - IL_0029: ldloc.1 - IL_002a: ret + IL_0029: stloc.s V_5 + IL_002b: stloc.s V_6 + IL_002d: ldloc.s V_6 + IL_002f: ldloc.s V_5 + IL_0031: ldc.i4.0 + IL_0032: nop + IL_0033: stelem.i4 + IL_0034: ldloc.2 + IL_0035: ldc.i4.1 + IL_0036: add + IL_0037: stloc.2 + IL_0038: ldloc.2 + IL_0039: ldloc.1 + IL_003a: ldlen + IL_003b: conv.i4 + IL_003c: blt.s IL_0013 + + IL_003e: ldloc.1 + IL_003f: ret } - .method public static uint32[] '[|for x in uintArray -> x|]'(uint32[] xs) cil managed + .method public static int32[] 'for _ & _ in Array.groupBy id [||] do ...'() cil managed { - .maxstack 6 - .locals init (uint32[] V_0, - uint32[] V_1, + .maxstack 5 + .locals init (class [runtime]System.Tuple`2[] V_0, + int32[] V_1, int32 V_2, - uint32 V_3, - int32 V_4, - uint32[] V_5) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.UInt32 - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_0023 + int32 V_3, + int32[] V_4) + IL_0000: ldsfld class assembly/'for _ - _ in Array-groupBy id -||- do ---@30' assembly/'for _ - _ in Array-groupBy id -||- do ---@30'::@_instance + IL_0005: call !!0[] [runtime]System.Array::Empty() + IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + !!0[]) + IL_000f: stloc.0 + IL_0010: ldloc.0 + IL_0011: ldlen + IL_0012: conv.i4 + IL_0013: newarr [runtime]System.Int32 + IL_0018: stloc.1 + IL_0019: ldc.i4.0 + IL_001a: stloc.2 + IL_001b: br.s IL_002b - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.u4 - IL_0014: stloc.3 - IL_0015: stloc.s V_4 - IL_0017: stloc.s V_5 - IL_0019: ldloc.s V_5 - IL_001b: ldloc.s V_4 - IL_001d: ldloc.3 - IL_001e: stelem.i4 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_001d: ldloc.1 + IL_001e: ldloc.2 + IL_001f: stloc.3 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.3 + IL_0025: ldc.i4.0 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_001d + + IL_0031: ldloc.1 + IL_0032: ret + } + + .method public static int32[] 'for _ in Array.groupBy id [||] do ...'() cil managed + { + + .maxstack 5 + .locals init (class [runtime]System.Tuple`2[] V_0, + int32[] V_1, + int32 V_2, + int32 V_3, + int32[] V_4) + IL_0000: ldsfld class assembly/'for _ in Array-groupBy id -||- do ---@28' assembly/'for _ in Array-groupBy id -||- do ---@28'::@_instance + IL_0005: call !!0[] [runtime]System.Array::Empty() + IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + !!0[]) + IL_000f: stloc.0 + IL_0010: ldloc.0 + IL_0011: ldlen + IL_0012: conv.i4 + IL_0013: newarr [runtime]System.Int32 + IL_0018: stloc.1 + IL_0019: ldc.i4.0 + IL_001a: stloc.2 + IL_001b: br.s IL_002b - IL_0029: ldloc.1 - IL_002a: ret + IL_001d: ldloc.1 + IL_001e: ldloc.2 + IL_001f: stloc.3 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.3 + IL_0025: ldc.i4.0 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_001d + + IL_0031: ldloc.1 + IL_0032: ret } - .method public static int64[] '[|for x in int64Array -> x|]'(int64[] xs) cil managed + .method public static int32[] 'for _ | _ in Array.groupBy id [||] do ...'() cil managed { - .maxstack 6 - .locals init (int64[] V_0, - int64[] V_1, + .maxstack 5 + .locals init (class [runtime]System.Tuple`2[] V_0, + int32[] V_1, int32 V_2, - int64 V_3, - int32 V_4, - int64[] V_5) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Int64 - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_0023 + int32 V_3, + int32[] V_4) + IL_0000: ldsfld class assembly/'for _ | _ in Array-groupBy id -||- do ---@29' assembly/'for _ | _ in Array-groupBy id -||- do ---@29'::@_instance + IL_0005: call !!0[] [runtime]System.Array::Empty() + IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + !!0[]) + IL_000f: stloc.0 + IL_0010: ldloc.0 + IL_0011: ldlen + IL_0012: conv.i4 + IL_0013: newarr [runtime]System.Int32 + IL_0018: stloc.1 + IL_0019: ldc.i4.0 + IL_001a: stloc.2 + IL_001b: br.s IL_002b - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.i8 - IL_0014: stloc.3 - IL_0015: stloc.s V_4 - IL_0017: stloc.s V_5 - IL_0019: ldloc.s V_5 - IL_001b: ldloc.s V_4 - IL_001d: ldloc.3 - IL_001e: stelem.i8 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_001d: ldloc.1 + IL_001e: ldloc.2 + IL_001f: stloc.3 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.3 + IL_0025: ldc.i4.0 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_001d - IL_0029: ldloc.1 - IL_002a: ret + IL_0031: ldloc.1 + IL_0032: ret } - .method public static uint64[] '[|for x in uint64Array -> x|]'(uint64[] xs) cil managed + .method public static int32[] 'for _ | true in ...'() cil managed { - .maxstack 6 - .locals init (uint64[] V_0, - uint64[] V_1, + .maxstack 5 + .locals init (bool[] V_0, + int32[] V_1, int32 V_2, - uint64 V_3, - int32 V_4, - uint64[] V_5) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.UInt64 - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_0023 + int32 V_3, + int32[] V_4) + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldlen + IL_0008: conv.i4 + IL_0009: newarr [runtime]System.Int32 + IL_000e: stloc.1 + IL_000f: ldc.i4.0 + IL_0010: stloc.2 + IL_0011: br.s IL_0021 - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.i8 - IL_0014: stloc.3 - IL_0015: stloc.s V_4 - IL_0017: stloc.s V_5 - IL_0019: ldloc.s V_5 - IL_001b: ldloc.s V_4 - IL_001d: ldloc.3 - IL_001e: stelem.i8 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_0013: ldloc.1 + IL_0014: ldloc.2 + IL_0015: stloc.3 + IL_0016: stloc.s V_4 + IL_0018: ldloc.s V_4 + IL_001a: ldloc.3 + IL_001b: ldc.i4.0 + IL_001c: stelem.i4 + IL_001d: ldloc.2 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: stloc.2 + IL_0021: ldloc.2 + IL_0022: ldloc.1 + IL_0023: ldlen + IL_0024: conv.i4 + IL_0025: blt.s IL_0013 - IL_0029: ldloc.1 - IL_002a: ret + IL_0027: ldloc.1 + IL_0028: ret } - .method public static native int[] '[|for x in nativeintArray -> x|]'(native int[] xs) cil managed + .method public static int32[] 'for _, _group in Array.groupBy id [||] do ...'() cil managed { - .maxstack 6 - .locals init (native int[] V_0, - native int[] V_1, + .maxstack 5 + .locals init (class [runtime]System.Tuple`2[] V_0, + int32[] V_1, int32 V_2, - native int V_3, - int32 V_4, - native int[] V_5) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.IntPtr - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_0023 + int32 V_3, + int32[] V_4) + IL_0000: ldsfld class assembly/'for _, _group in Array-groupBy id -||- do ---@31' assembly/'for _, _group in Array-groupBy id -||- do ---@31'::@_instance + IL_0005: call !!0[] [runtime]System.Array::Empty() + IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + !!0[]) + IL_000f: stloc.0 + IL_0010: ldloc.0 + IL_0011: ldlen + IL_0012: conv.i4 + IL_0013: newarr [runtime]System.Int32 + IL_0018: stloc.1 + IL_0019: ldc.i4.0 + IL_001a: stloc.2 + IL_001b: br.s IL_002b - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.i - IL_0014: stloc.3 - IL_0015: stloc.s V_4 - IL_0017: stloc.s V_5 - IL_0019: ldloc.s V_5 - IL_001b: ldloc.s V_4 - IL_001d: ldloc.3 - IL_001e: stelem.i - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_001d: ldloc.1 + IL_001e: ldloc.2 + IL_001f: stloc.3 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.3 + IL_0025: ldc.i4.0 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_001d - IL_0029: ldloc.1 - IL_002a: ret + IL_0031: ldloc.1 + IL_0032: ret } - .method public static native uint[] '[|for x in unativeintArray -> x|]'(native uint[] xs) cil managed + .method public static int32[] 'for _, group in Array.groupBy id [||] do ...'() cil managed { .maxstack 6 - .locals init (native uint[] V_0, - native uint[] V_1, + .locals init (class [runtime]System.Tuple`2[] V_0, + int32[] V_1, int32 V_2, - native uint V_3, - int32 V_4, - native uint[] V_5) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.UIntPtr - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_0023 + class [runtime]System.Tuple`2 V_3, + object[] V_4, + int32 V_5, + int32[] V_6) + IL_0000: ldsfld class assembly/'for _, group in Array-groupBy id -||- do ---@32' assembly/'for _, group in Array-groupBy id -||- do ---@32'::@_instance + IL_0005: call !!0[] [runtime]System.Array::Empty() + IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + !!0[]) + IL_000f: stloc.0 + IL_0010: ldloc.0 + IL_0011: ldlen + IL_0012: conv.i4 + IL_0013: newarr [runtime]System.Int32 + IL_0018: stloc.1 + IL_0019: ldc.i4.0 + IL_001a: stloc.2 + IL_001b: br.s IL_0040 - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.i - IL_0014: stloc.3 - IL_0015: stloc.s V_4 - IL_0017: stloc.s V_5 - IL_0019: ldloc.s V_5 - IL_001b: ldloc.s V_4 - IL_001d: ldloc.3 - IL_001e: stelem.i - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_001d: ldloc.1 + IL_001e: ldloc.2 + IL_001f: ldloc.0 + IL_0020: ldloc.2 + IL_0021: ldelem class [runtime]System.Tuple`2 + IL_0026: stloc.3 + IL_0027: ldloc.3 + IL_0028: call instance !1 class [runtime]System.Tuple`2::get_Item2() + IL_002d: stloc.s V_4 + IL_002f: stloc.s V_5 + IL_0031: stloc.s V_6 + IL_0033: ldloc.s V_6 + IL_0035: ldloc.s V_5 + IL_0037: ldloc.s V_4 + IL_0039: ldlen + IL_003a: conv.i4 + IL_003b: stelem.i4 + IL_003c: ldloc.2 + IL_003d: ldc.i4.1 + IL_003e: add + IL_003f: stloc.2 + IL_0040: ldloc.2 + IL_0041: ldloc.1 + IL_0042: ldlen + IL_0043: conv.i4 + IL_0044: blt.s IL_001d - IL_0029: ldloc.1 - IL_002a: ret + IL_0046: ldloc.1 + IL_0047: ret } - .method public static float64[] '[|for x in floatArray -> x|]'(float64[] xs) cil managed + .method public static int32[] 'for true | _ in ...'() cil managed { .maxstack 6 - .locals init (float64[] V_0, - float64[] V_1, + .locals init (bool[] V_0, + int32[] V_1, int32 V_2, - float64 V_3, + bool V_3, int32 V_4, - float64[] V_5) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Double - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_0023 + int32[] V_5) + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldlen + IL_0008: conv.i4 + IL_0009: newarr [runtime]System.Int32 + IL_000e: stloc.1 + IL_000f: ldc.i4.0 + IL_0010: stloc.2 + IL_0011: br.s IL_002b - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.r8 - IL_0014: stloc.3 - IL_0015: stloc.s V_4 - IL_0017: stloc.s V_5 - IL_0019: ldloc.s V_5 - IL_001b: ldloc.s V_4 - IL_001d: ldloc.3 - IL_001e: stelem.r8 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_0013: ldloc.1 + IL_0014: ldloc.2 + IL_0015: ldloc.0 + IL_0016: ldloc.2 + IL_0017: ldelem.u1 + IL_0018: stloc.3 + IL_0019: ldloc.3 + IL_001a: brfalse.s IL_001c - IL_0029: ldloc.1 - IL_002a: ret + IL_001c: stloc.s V_4 + IL_001e: stloc.s V_5 + IL_0020: ldloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: ldc.i4.0 + IL_0025: nop + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_0013 + + IL_0031: ldloc.1 + IL_0032: ret } - .method public static float32[] '[|for x in float32Array -> x|]'(float32[] xs) cil managed + .method public static int32[] 'for true | false in ...'() cil managed { .maxstack 6 - .locals init (float32[] V_0, - float32[] V_1, + .locals init (bool[] V_0, + int32[] V_1, int32 V_2, - float32 V_3, + bool V_3, int32 V_4, - float32[] V_5) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldlen - IL_0004: conv.i4 - IL_0005: newarr [runtime]System.Single - IL_000a: stloc.1 - IL_000b: ldc.i4.0 - IL_000c: stloc.2 - IL_000d: br.s IL_0023 + int32[] V_5) + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldlen + IL_0008: conv.i4 + IL_0009: newarr [runtime]System.Int32 + IL_000e: stloc.1 + IL_000f: ldc.i4.0 + IL_0010: stloc.2 + IL_0011: br.s IL_002b - IL_000f: ldloc.1 - IL_0010: ldloc.2 - IL_0011: ldloc.0 - IL_0012: ldloc.2 - IL_0013: ldelem.r4 - IL_0014: stloc.3 - IL_0015: stloc.s V_4 - IL_0017: stloc.s V_5 - IL_0019: ldloc.s V_5 - IL_001b: ldloc.s V_4 - IL_001d: ldloc.3 - IL_001e: stelem.r4 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_0013: ldloc.1 + IL_0014: ldloc.2 + IL_0015: ldloc.0 + IL_0016: ldloc.2 + IL_0017: ldelem.u1 + IL_0018: stloc.3 + IL_0019: ldloc.3 + IL_001a: brfalse.s IL_001c - IL_0029: ldloc.1 - IL_002a: ret + IL_001c: stloc.s V_4 + IL_001e: stloc.s V_5 + IL_0020: ldloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: ldc.i4.0 + IL_0025: nop + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_0013 + + IL_0031: ldloc.1 + IL_0032: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToList.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToList.fs.il.bsl index b2f43a24f6f..e1d0c07cc32 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToList.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToList.fs.il.bsl @@ -783,6 +783,149 @@ IL_0048: ret } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + int32[] 'array') cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, + class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: pop + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: pop + IL_0011: nop + IL_0012: ldarg.2 + IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0018: stloc.1 + .try + { + IL_0019: br.s IL_002f + + IL_001b: ldloc.1 + IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0021: stloc.3 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002e: nop + IL_002f: ldloc.1 + IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0035: brtrue.s IL_001b + + IL_0037: ldnull + IL_0038: stloc.2 + IL_0039: leave.s IL_0050 + + } + finally + { + IL_003b: ldloc.1 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f + + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally + } + IL_0050: ldloc.2 + IL_0051: pop + IL_0052: ldloca.s V_0 + IL_0054: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0059: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + int32[] 'array') cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + int32 V_1, + class [runtime]System.Collections.Generic.IEnumerator`1 V_2, + class [runtime]System.Collections.Generic.IEnumerable`1 V_3, + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: pop + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: stloc.1 + IL_0011: nop + IL_0012: ldarg.2 + IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0018: stloc.2 + .try + { + IL_0019: br.s IL_0033 + + IL_001b: ldloc.2 + IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0021: stloc.s V_4 + IL_0023: ldloca.s V_0 + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloc.2 + IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0039: brtrue.s IL_001b + + IL_003b: ldnull + IL_003c: stloc.3 + IL_003d: leave.s IL_0054 + + } + finally + { + IL_003f: ldloc.2 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally + } + IL_0054: ldloc.3 + IL_0055: pop + IL_0056: ldloca.s V_0 + IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005d: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, int32[] 'array') cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -1310,149 +1453,6 @@ IL_005d: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - int32[] 'array') cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: pop - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: pop - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0018: stloc.1 - .try - { - IL_0019: br.s IL_002f - - IL_001b: ldloc.1 - IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.3 - IL_0022: ldloca.s V_0 - IL_0024: stloc.s V_4 - IL_0026: ldloc.s V_4 - IL_0028: ldloc.3 - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.1 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b - - IL_0037: ldnull - IL_0038: stloc.2 - IL_0039: leave.s IL_0050 - - } - finally - { - IL_003b: ldloc.1 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally - } - IL_0050: ldloc.2 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0059: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - int32[] 'array') cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - int32 V_1, - class [runtime]System.Collections.Generic.IEnumerator`1 V_2, - class [runtime]System.Collections.Generic.IEnumerable`1 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, - class [runtime]System.IDisposable V_6) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: pop - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: stloc.1 - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0018: stloc.2 - .try - { - IL_0019: br.s IL_0033 - - IL_001b: ldloc.2 - IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_4 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_5 - IL_0027: ldloc.s V_5 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.1 - IL_002c: add - IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0032: nop - IL_0033: ldloc.2 - IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0039: brtrue.s IL_001b - - IL_003b: ldnull - IL_003c: stloc.3 - IL_003d: leave.s IL_0054 - - } - finally - { - IL_003f: ldloc.2 - IL_0040: isinst [runtime]System.IDisposable - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_6 - IL_0049: brfalse.s IL_0053 - - IL_004b: ldloc.s V_6 - IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0052: endfinally - IL_0053: endfinally - } - IL_0054: ldloc.3 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005d: ret - } - } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToArray.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToArray.fs.il.bsl index 708696be7ba..eec2e9afd35 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToArray.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToArray.fs.il.bsl @@ -777,6 +777,147 @@ IL_0048: ret } + .method public static int32[] f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, + class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: pop + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: pop + IL_0011: nop + IL_0012: ldarg.2 + IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0018: stloc.1 + .try + { + IL_0019: br.s IL_002f + + IL_001b: ldloc.1 + IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0021: stloc.3 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002e: nop + IL_002f: ldloc.1 + IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0035: brtrue.s IL_001b + + IL_0037: ldnull + IL_0038: stloc.2 + IL_0039: leave.s IL_0050 + + } + finally + { + IL_003b: ldloc.1 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f + + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally + } + IL_0050: ldloc.2 + IL_0051: pop + IL_0052: ldloca.s V_0 + IL_0054: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0059: ret + } + + .method public static int32[] f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, + int32 V_1, + class [runtime]System.Collections.Generic.IEnumerator`1 V_2, + class [runtime]System.Collections.Generic.IEnumerable`1 V_3, + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: pop + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: stloc.1 + IL_0011: nop + IL_0012: ldarg.2 + IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0018: stloc.2 + .try + { + IL_0019: br.s IL_0033 + + IL_001b: ldloc.2 + IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0021: stloc.s V_4 + IL_0023: ldloca.s V_0 + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloc.2 + IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0039: brtrue.s IL_001b + + IL_003b: ldnull + IL_003c: stloc.3 + IL_003d: leave.s IL_0054 + + } + finally + { + IL_003f: ldloc.2 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally + } + IL_0054: ldloc.3 + IL_0055: pop + IL_0056: ldloca.s V_0 + IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005d: ret + } + .method public static !!a[] f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { @@ -1303,147 +1444,6 @@ IL_005d: ret } - .method public static int32[] f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: pop - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: pop - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0018: stloc.1 - .try - { - IL_0019: br.s IL_002f - - IL_001b: ldloc.1 - IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.3 - IL_0022: ldloca.s V_0 - IL_0024: stloc.s V_4 - IL_0026: ldloc.s V_4 - IL_0028: ldloc.3 - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.1 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b - - IL_0037: ldnull - IL_0038: stloc.2 - IL_0039: leave.s IL_0050 - - } - finally - { - IL_003b: ldloc.1 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally - } - IL_0050: ldloc.2 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0059: ret - } - - .method public static int32[] f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, - int32 V_1, - class [runtime]System.Collections.Generic.IEnumerator`1 V_2, - class [runtime]System.Collections.Generic.IEnumerable`1 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, - class [runtime]System.IDisposable V_6) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: pop - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: stloc.1 - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0018: stloc.2 - .try - { - IL_0019: br.s IL_0033 - - IL_001b: ldloc.2 - IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_4 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_5 - IL_0027: ldloc.s V_5 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.1 - IL_002c: add - IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0032: nop - IL_0033: ldloc.2 - IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0039: brtrue.s IL_001b - - IL_003b: ldnull - IL_003c: stloc.3 - IL_003d: leave.s IL_0054 - - } - finally - { - IL_003f: ldloc.2 - IL_0040: isinst [runtime]System.IDisposable - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_6 - IL_0049: brfalse.s IL_0053 - - IL_004b: ldloc.s V_6 - IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0052: endfinally - IL_0053: endfinally - } - IL_0054: ldloc.3 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005d: ret - } - } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl index ba4eb8a3c95..edd26843066 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/'for _ in List-groupBy id -- do ---@28' @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/'for _ in List-groupBy id -- do ---@28'::.ctor() + IL_0005: stsfld class assembly/'for _ in List-groupBy id -- do ---@28' assembly/'for _ in List-groupBy id -- do ---@28'::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -56,21 +65,21 @@ IL_0001: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ | _ in List-groupBy id -- do ---@29' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _ | _ in List-groupBy id -- do ---@29' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'for _ in List-groupBy id -- do ---@28'::.ctor() - IL_0005: stsfld class assembly/'for _ in List-groupBy id -- do ---@28' assembly/'for _ in List-groupBy id -- do ---@28'::@_instance + IL_0000: newobj instance void assembly/'for _ | _ in List-groupBy id -- do ---@29'::.ctor() + IL_0005: stsfld class assembly/'for _ | _ in List-groupBy id -- do ---@29' assembly/'for _ | _ in List-groupBy id -- do ---@29'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ | _ in List-groupBy id -- do ---@29' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'for _ | _ in List-groupBy id -- do ---@29' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -90,21 +99,21 @@ IL_0001: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ - _ in List-groupBy id -- do ---@30' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _ - _ in List-groupBy id -- do ---@30' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'for _ | _ in List-groupBy id -- do ---@29'::.ctor() - IL_0005: stsfld class assembly/'for _ | _ in List-groupBy id -- do ---@29' assembly/'for _ | _ in List-groupBy id -- do ---@29'::@_instance + IL_0000: newobj instance void assembly/'for _ - _ in List-groupBy id -- do ---@30'::.ctor() + IL_0005: stsfld class assembly/'for _ - _ in List-groupBy id -- do ---@30' assembly/'for _ - _ in List-groupBy id -- do ---@30'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'for _ - _ in List-groupBy id -- do ---@30' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'for _ - _ in List-groupBy id -- do ---@30' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -124,21 +133,21 @@ IL_0001: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _, _group in List-groupBy id -- do ---@31' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _, _group in List-groupBy id -- do ---@31' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'for _ - _ in List-groupBy id -- do ---@30'::.ctor() - IL_0005: stsfld class assembly/'for _ - _ in List-groupBy id -- do ---@30' assembly/'for _ - _ in List-groupBy id -- do ---@30'::@_instance + IL_0000: newobj instance void assembly/'for _, _group in List-groupBy id -- do ---@31'::.ctor() + IL_0005: stsfld class assembly/'for _, _group in List-groupBy id -- do ---@31' assembly/'for _, _group in List-groupBy id -- do ---@31'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'for _, _group in List-groupBy id -- do ---@31' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'for _, _group in List-groupBy id -- do ---@31' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -158,21 +167,21 @@ IL_0001: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'for _, group in List-groupBy id -- do ---@32' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'for _, group in List-groupBy id -- do ---@32' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'for _, _group in List-groupBy id -- do ---@31'::.ctor() - IL_0005: stsfld class assembly/'for _, _group in List-groupBy id -- do ---@31' assembly/'for _, _group in List-groupBy id -- do ---@31'::@_instance + IL_0000: newobj instance void assembly/'for _, group in List-groupBy id -- do ---@32'::.ctor() + IL_0005: stsfld class assembly/'for _, group in List-groupBy id -- do ---@32' assembly/'for _, group in List-groupBy id -- do ---@32'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'for _, group in List-groupBy id -- do ---@32' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'for _, group in List-groupBy id -- do ---@32' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -192,15 +201,6 @@ IL_0001: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/'for _, group in List-groupBy id -- do ---@32'::.ctor() - IL_0005: stsfld class assembly/'for _, group in List-groupBy id -- do ---@32' assembly/'for _, group in List-groupBy id -- do ---@32'::@_instance - IL_000a: ret - } - } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f0(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -821,6 +821,159 @@ IL_0033: ret } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: pop + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: pop + IL_0011: nop + IL_0012: ldarg.2 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: br.s IL_003a + + IL_001d: ldloc.1 + IL_001e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0023: stloc.3 + IL_0024: ldloca.s V_0 + IL_0026: stloc.s V_4 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.3 + IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0030: nop + IL_0031: ldloc.2 + IL_0032: stloc.1 + IL_0033: ldloc.1 + IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0039: stloc.2 + IL_003a: ldloc.2 + IL_003b: brtrue.s IL_001d + + IL_003d: ldloca.s V_0 + IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0044: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_3, + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: pop + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: stloc.0 + IL_0011: nop + IL_0012: ldarg.2 + IL_0013: stloc.2 + IL_0014: ldloc.2 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.3 + IL_001b: br.s IL_003e + + IL_001d: ldloc.2 + IL_001e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0023: stloc.s V_4 + IL_0025: ldloca.s V_1 + IL_0027: stloc.s V_5 + IL_0029: ldloc.s V_5 + IL_002b: ldloc.s V_4 + IL_002d: ldloc.0 + IL_002e: add + IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0034: nop + IL_0035: ldloc.3 + IL_0036: stloc.2 + IL_0037: ldloc.2 + IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003d: stloc.3 + IL_003e: ldloc.3 + IL_003f: brtrue.s IL_001d + + IL_0041: ldloca.s V_1 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f12(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> f, int32 y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::Invoke(!0) + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_000f: stloc.2 + IL_0010: br.s IL_0031 + + IL_0012: ldloc.1 + IL_0013: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0018: stloc.3 + IL_0019: ldloca.s V_0 + IL_001b: stloc.s V_4 + IL_001d: ldloc.s V_4 + IL_001f: ldloc.3 + IL_0020: ldarg.1 + IL_0021: add + IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0027: nop + IL_0028: ldloc.2 + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0030: stloc.2 + IL_0031: ldloc.2 + IL_0032: brtrue.s IL_0012 + + IL_0034: ldloca.s V_0 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003b: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -1227,160 +1380,100 @@ IL_0048: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for 1 | 2 | _ in ...'() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - .maxstack 4 + .maxstack 5 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, int32 V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: pop - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: pop - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.2 - IL_001b: br.s IL_003a - - IL_001d: ldloc.1 - IL_001e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0023: stloc.3 - IL_0024: ldloca.s V_0 - IL_0026: stloc.s V_4 - IL_0028: ldloc.s V_4 - IL_002a: ldloc.3 - IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0030: nop - IL_0031: ldloc.2 - IL_0032: stloc.1 - IL_0033: ldloc.1 - IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: brtrue.s IL_001d - - IL_003d: ldloca.s V_0 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (int32 V_0, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: pop - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: stloc.0 - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001a: stloc.3 - IL_001b: br.s IL_003e + IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0006: stloc.1 + IL_0007: ldloc.1 + IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_000d: stloc.2 + IL_000e: br.s IL_003e - IL_001d: ldloc.2 - IL_001e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0023: stloc.s V_4 - IL_0025: ldloca.s V_1 - IL_0027: stloc.s V_5 - IL_0029: ldloc.s V_5 + IL_0010: ldloc.1 + IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0016: stloc.3 + IL_0017: ldloca.s V_0 + IL_0019: ldloc.3 + IL_001a: ldc.i4.1 + IL_001b: sub + IL_001c: switch ( + IL_0029, + IL_0029) + IL_0029: stloc.s V_4 IL_002b: ldloc.s V_4 - IL_002d: ldloc.0 - IL_002e: add + IL_002d: ldc.i4.0 + IL_002e: nop IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0034: nop - IL_0035: ldloc.3 - IL_0036: stloc.2 - IL_0037: ldloc.2 + IL_0035: ldloc.2 + IL_0036: stloc.1 + IL_0037: ldloc.1 IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003d: stloc.3 - IL_003e: ldloc.3 - IL_003f: brtrue.s IL_001d + IL_003d: stloc.2 + IL_003e: ldloc.2 + IL_003f: brtrue.s IL_0010 - IL_0041: ldloca.s V_1 + IL_0041: ldloca.s V_0 IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() IL_0048: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f12(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> f, int32 y) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for Failure _ | _ in ...'() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 + .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + class [runtime]System.Exception V_3, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::Invoke(!0) - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_000f: stloc.2 - IL_0010: br.s IL_0031 + IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0006: stloc.1 + IL_0007: ldloc.1 + IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_000d: stloc.2 + IL_000e: br.s IL_003a - IL_0012: ldloc.1 - IL_0013: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0018: stloc.3 - IL_0019: ldloca.s V_0 - IL_001b: stloc.s V_4 - IL_001d: ldloc.s V_4 - IL_001f: ldloc.3 - IL_0020: ldarg.1 - IL_0021: add - IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0027: nop - IL_0028: ldloc.2 - IL_0029: stloc.1 - IL_002a: ldloc.1 - IL_002b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0030: stloc.2 + IL_0010: ldloc.1 + IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0016: stloc.3 + IL_0017: ldloca.s V_0 + IL_0019: ldloc.3 + IL_001a: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) + IL_001f: stloc.s V_4 + IL_0021: ldloc.s V_4 + IL_0023: brfalse.s IL_0025 + + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldc.i4.0 + IL_002a: nop + IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0030: nop IL_0031: ldloc.2 - IL_0032: brtrue.s IL_0012 + IL_0032: stloc.1 + IL_0033: ldloc.1 + IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0039: stloc.2 + IL_003a: ldloc.2 + IL_003b: brtrue.s IL_0010 - IL_0034: ldloca.s V_0 - IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003b: ret + IL_003d: ldloca.s V_0 + IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0044: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ in List.groupBy id [] do ...'() cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ & _ in List.groupBy id [] do ...'() cil managed { .maxstack 4 @@ -1390,7 +1483,7 @@ class [runtime]System.Tuple`2> V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop - IL_0001: ldsfld class assembly/'for _ in List-groupBy id -- do ---@28' assembly/'for _ in List-groupBy id -- do ---@28'::@_instance + IL_0001: ldsfld class assembly/'for _ - _ in List-groupBy id -- do ---@30' assembly/'for _ - _ in List-groupBy id -- do ---@30'::@_instance IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) @@ -1422,7 +1515,7 @@ IL_0041: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ | _ in List.groupBy id [] do ...'() cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ in List.groupBy id [] do ...'() cil managed { .maxstack 4 @@ -1432,7 +1525,7 @@ class [runtime]System.Tuple`2> V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop - IL_0001: ldsfld class assembly/'for _ | _ in List-groupBy id -- do ---@29' assembly/'for _ | _ in List-groupBy id -- do ---@29'::@_instance + IL_0001: ldsfld class assembly/'for _ in List-groupBy id -- do ---@28' assembly/'for _ in List-groupBy id -- do ---@28'::@_instance IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) @@ -1464,7 +1557,7 @@ IL_0041: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ & _ in List.groupBy id [] do ...'() cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ | _ in List.groupBy id [] do ...'() cil managed { .maxstack 4 @@ -1474,7 +1567,7 @@ class [runtime]System.Tuple`2> V_3, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop - IL_0001: ldsfld class assembly/'for _ - _ in List-groupBy id -- do ---@30' assembly/'for _ - _ in List-groupBy id -- do ---@30'::@_instance + IL_0001: ldsfld class assembly/'for _ | _ in List-groupBy id -- do ---@29' assembly/'for _ | _ in List-groupBy id -- do ---@29'::@_instance IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) @@ -1506,6 +1599,45 @@ IL_0041: ret } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ | true in ...'() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + bool V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) + IL_0000: nop + IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0006: stloc.1 + IL_0007: ldloc.1 + IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_000d: stloc.2 + IL_000e: br.s IL_002d + + IL_0010: ldloc.1 + IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0016: stloc.3 + IL_0017: ldloca.s V_0 + IL_0019: stloc.s V_4 + IL_001b: ldloc.s V_4 + IL_001d: ldc.i4.0 + IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0023: nop + IL_0024: ldloc.2 + IL_0025: stloc.1 + IL_0026: ldloc.1 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002c: stloc.2 + IL_002d: ldloc.2 + IL_002e: brtrue.s IL_0010 + + IL_0030: ldloca.s V_0 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0037: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _, _group in List.groupBy id [] do ...'() cil managed { @@ -1595,100 +1727,7 @@ IL_004f: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for 1 | 2 | _ in ...'() cil managed - { - - .maxstack 5 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) - IL_0000: nop - IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0006: stloc.1 - IL_0007: ldloc.1 - IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_000d: stloc.2 - IL_000e: br.s IL_003e - - IL_0010: ldloc.1 - IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0016: stloc.3 - IL_0017: ldloca.s V_0 - IL_0019: ldloc.3 - IL_001a: ldc.i4.1 - IL_001b: sub - IL_001c: switch ( - IL_0029, - IL_0029) - IL_0029: stloc.s V_4 - IL_002b: ldloc.s V_4 - IL_002d: ldc.i4.0 - IL_002e: nop - IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0034: nop - IL_0035: ldloc.2 - IL_0036: stloc.1 - IL_0037: ldloc.1 - IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003d: stloc.2 - IL_003e: ldloc.2 - IL_003f: brtrue.s IL_0010 - - IL_0041: ldloca.s V_0 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for Failure _ | _ in ...'() cil managed - { - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - class [runtime]System.Exception V_3, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) - IL_0000: nop - IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0006: stloc.1 - IL_0007: ldloc.1 - IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_000d: stloc.2 - IL_000e: br.s IL_003a - - IL_0010: ldloc.1 - IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0016: stloc.3 - IL_0017: ldloca.s V_0 - IL_0019: ldloc.3 - IL_001a: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) - IL_001f: stloc.s V_4 - IL_0021: ldloc.s V_4 - IL_0023: brfalse.s IL_0025 - - IL_0025: stloc.s V_5 - IL_0027: ldloc.s V_5 - IL_0029: ldc.i4.0 - IL_002a: nop - IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0030: nop - IL_0031: ldloc.2 - IL_0032: stloc.1 - IL_0033: ldloc.1 - IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: brtrue.s IL_0010 - - IL_003d: ldloca.s V_0 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for true | false in ...'() cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for true | _ in ...'() cil managed { .maxstack 4 @@ -1731,7 +1770,7 @@ IL_003b: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for true | _ in ...'() cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for true | false in ...'() cil managed { .maxstack 4 @@ -1774,45 +1813,6 @@ IL_003b: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ | true in ...'() cil managed - { - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - bool V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) - IL_0000: nop - IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0006: stloc.1 - IL_0007: ldloc.1 - IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_000d: stloc.2 - IL_000e: br.s IL_002d - - IL_0010: ldloc.1 - IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0016: stloc.3 - IL_0017: ldloca.s V_0 - IL_0019: stloc.s V_4 - IL_001b: ldloc.s V_4 - IL_001d: ldc.i4.0 - IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0023: nop - IL_0024: ldloc.2 - IL_0025: stloc.1 - IL_0026: ldloc.1 - IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002c: stloc.2 - IL_002d: ldloc.2 - IL_002e: brtrue.s IL_0010 - - IL_0030: ldloca.s V_0 - IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0037: ret - } - } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToArray.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToArray.fs.il.bsl index fecbdcdcacd..0c9d98c468e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToArray.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToArray.fs.il.bsl @@ -777,6 +777,147 @@ IL_0048: ret } + .method public static int32[] f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, + class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: pop + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: pop + IL_0011: nop + IL_0012: ldarg.2 + IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0018: stloc.1 + .try + { + IL_0019: br.s IL_002f + + IL_001b: ldloc.1 + IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0021: stloc.3 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002e: nop + IL_002f: ldloc.1 + IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0035: brtrue.s IL_001b + + IL_0037: ldnull + IL_0038: stloc.2 + IL_0039: leave.s IL_0050 + + } + finally + { + IL_003b: ldloc.1 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f + + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally + } + IL_0050: ldloc.2 + IL_0051: pop + IL_0052: ldloca.s V_0 + IL_0054: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0059: ret + } + + .method public static int32[] f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, + int32 V_1, + class [runtime]System.Collections.Generic.IEnumerator`1 V_2, + class [runtime]System.Collections.Generic.IEnumerable`1 V_3, + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: pop + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: stloc.1 + IL_0011: nop + IL_0012: ldarg.2 + IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0018: stloc.2 + .try + { + IL_0019: br.s IL_0033 + + IL_001b: ldloc.2 + IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0021: stloc.s V_4 + IL_0023: ldloca.s V_0 + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloc.2 + IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0039: brtrue.s IL_001b + + IL_003b: ldnull + IL_003c: stloc.3 + IL_003d: leave.s IL_0054 + + } + finally + { + IL_003f: ldloc.2 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally + } + IL_0054: ldloc.3 + IL_0055: pop + IL_0056: ldloca.s V_0 + IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005d: ret + } + .method public static !!a[] f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed { @@ -1303,147 +1444,6 @@ IL_005d: ret } - .method public static int32[] f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, - class [runtime]System.IDisposable V_5) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: pop - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: pop - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0018: stloc.1 - .try - { - IL_0019: br.s IL_002f - - IL_001b: ldloc.1 - IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.3 - IL_0022: ldloca.s V_0 - IL_0024: stloc.s V_4 - IL_0026: ldloc.s V_4 - IL_0028: ldloc.3 - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.1 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b - - IL_0037: ldnull - IL_0038: stloc.2 - IL_0039: leave.s IL_0050 - - } - finally - { - IL_003b: ldloc.1 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally - } - IL_0050: ldloc.2 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0059: ret - } - - .method public static int32[] f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1 V_0, - int32 V_1, - class [runtime]System.Collections.Generic.IEnumerator`1 V_2, - class [runtime]System.Collections.Generic.IEnumerable`1 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, - class [runtime]System.IDisposable V_6) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: pop - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: stloc.1 - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0018: stloc.2 - .try - { - IL_0019: br.s IL_0033 - - IL_001b: ldloc.2 - IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_4 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_5 - IL_0027: ldloc.s V_5 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.1 - IL_002c: add - IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0032: nop - IL_0033: ldloc.2 - IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0039: brtrue.s IL_001b - - IL_003b: ldnull - IL_003c: stloc.3 - IL_003d: leave.s IL_0054 - - } - finally - { - IL_003f: ldloc.2 - IL_0040: isinst [runtime]System.IDisposable - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_6 - IL_0049: brfalse.s IL_0053 - - IL_004b: ldloc.s V_6 - IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0052: endfinally - IL_0053: endfinally - } - IL_0054: ldloc.3 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005d: ret - } - } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToList.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToList.fs.il.bsl index e71d241c1bc..8eab2c89e35 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToList.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToList.fs.il.bsl @@ -783,6 +783,149 @@ IL_0048: ret } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, + class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: pop + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: pop + IL_0011: nop + IL_0012: ldarg.2 + IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0018: stloc.1 + .try + { + IL_0019: br.s IL_002f + + IL_001b: ldloc.1 + IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0021: stloc.3 + IL_0022: ldloca.s V_0 + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002e: nop + IL_002f: ldloc.1 + IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0035: brtrue.s IL_001b + + IL_0037: ldnull + IL_0038: stloc.2 + IL_0039: leave.s IL_0050 + + } + finally + { + IL_003b: ldloc.1 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f + + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally + } + IL_0050: ldloc.2 + IL_0051: pop + IL_0052: ldloca.s V_0 + IL_0054: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0059: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + int32 V_1, + class [runtime]System.Collections.Generic.IEnumerator`1 V_2, + class [runtime]System.Collections.Generic.IEnumerable`1 V_3, + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0008: pop + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0010: stloc.1 + IL_0011: nop + IL_0012: ldarg.2 + IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0018: stloc.2 + .try + { + IL_0019: br.s IL_0033 + + IL_001b: ldloc.2 + IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0021: stloc.s V_4 + IL_0023: ldloca.s V_0 + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloc.2 + IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0039: brtrue.s IL_001b + + IL_003b: ldnull + IL_003c: stloc.3 + IL_003d: leave.s IL_0054 + + } + finally + { + IL_003f: ldloc.2 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally + } + IL_0054: ldloc.3 + IL_0055: pop + IL_0056: ldloca.s V_0 + IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005d: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -1310,149 +1453,6 @@ IL_005d: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - class [runtime]System.IDisposable V_5) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: pop - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: pop - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0018: stloc.1 - .try - { - IL_0019: br.s IL_002f - - IL_001b: ldloc.1 - IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.3 - IL_0022: ldloca.s V_0 - IL_0024: stloc.s V_4 - IL_0026: ldloc.s V_4 - IL_0028: ldloc.3 - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.1 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b - - IL_0037: ldnull - IL_0038: stloc.2 - IL_0039: leave.s IL_0050 - - } - finally - { - IL_003b: ldloc.1 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally - } - IL_0050: ldloc.2 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0059: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - int32 V_1, - class [runtime]System.Collections.Generic.IEnumerator`1 V_2, - class [runtime]System.Collections.Generic.IEnumerable`1 V_3, - int32 V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, - class [runtime]System.IDisposable V_6) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0008: pop - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0010: stloc.1 - IL_0011: nop - IL_0012: ldarg.2 - IL_0013: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0018: stloc.2 - .try - { - IL_0019: br.s IL_0033 - - IL_001b: ldloc.2 - IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0021: stloc.s V_4 - IL_0023: ldloca.s V_0 - IL_0025: stloc.s V_5 - IL_0027: ldloc.s V_5 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.1 - IL_002c: add - IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0032: nop - IL_0033: ldloc.2 - IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0039: brtrue.s IL_001b - - IL_003b: ldnull - IL_003c: stloc.3 - IL_003d: leave.s IL_0054 - - } - finally - { - IL_003f: ldloc.2 - IL_0040: isinst [runtime]System.IDisposable - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_6 - IL_0049: brfalse.s IL_0053 - - IL_004b: ldloc.s V_6 - IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0052: endfinally - IL_0053: endfinally - } - IL_0054: ldloc.3 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005d: ret - } - } .class private abstract auto ansi sealed ''.$assembly 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..d050e4c6d45 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeArrays.fs.il.bsl @@ -75,267 +75,6 @@ IL_0026: ret } - .method public static int32[] f2() cil managed - { - - .maxstack 8 - IL_0000: call !!0[] [runtime]System.Array::Empty() - IL_0005: ret - } - - .method public static int32[] f3() cil managed - { - - .maxstack 5 - .locals init (int32[] V_0, - uint64 V_1, - int32 V_2) - IL_0000: ldc.i4.s 10 - IL_0002: conv.i8 - IL_0003: conv.ovf.i.un - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: conv.i8 - IL_000c: stloc.1 - IL_000d: ldc.i4.1 - IL_000e: stloc.2 - IL_000f: br.s IL_001f - - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stelem.i4 - IL_0016: ldloc.2 - IL_0017: ldc.i4.1 - IL_0018: add - IL_0019: stloc.2 - IL_001a: ldloc.1 - IL_001b: ldc.i4.1 - IL_001c: conv.i8 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldc.i4.s 10 - IL_0022: conv.i8 - IL_0023: blt.un.s IL_0011 - - IL_0025: ldloc.0 - IL_0026: ret - } - - .method public static int32[] f4() cil managed - { - - .maxstack 5 - .locals init (int32[] V_0, - uint64 V_1, - int32 V_2) - IL_0000: ldc.i4.5 - IL_0001: conv.i8 - IL_0002: conv.ovf.i.un - IL_0003: newarr [runtime]System.Int32 - IL_0008: stloc.0 - IL_0009: ldc.i4.0 - IL_000a: conv.i8 - IL_000b: stloc.1 - IL_000c: ldc.i4.1 - IL_000d: stloc.2 - IL_000e: br.s IL_001e - - IL_0010: ldloc.0 - IL_0011: ldloc.1 - IL_0012: conv.i - IL_0013: ldloc.2 - IL_0014: stelem.i4 - IL_0015: ldloc.2 - IL_0016: ldc.i4.2 - IL_0017: add - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldc.i4.1 - IL_001b: conv.i8 - IL_001c: add - IL_001d: stloc.1 - IL_001e: ldloc.1 - IL_001f: ldc.i4.5 - IL_0020: conv.i8 - IL_0021: blt.un.s IL_0010 - - IL_0023: ldloc.0 - IL_0024: ret - } - - .method public static int32[] f5() cil managed - { - - .maxstack 8 - IL_0000: call !!0[] [runtime]System.Array::Empty() - IL_0005: ret - } - - .method public static int32[] f6() cil managed - { - - .maxstack 8 - IL_0000: call !!0[] [runtime]System.Array::Empty() - IL_0005: ret - } - - .method public static int32[] f7() cil managed - { - - .maxstack 5 - .locals init (int32[] V_0, - uint64 V_1, - int32 V_2) - IL_0000: ldc.i4.s 10 - IL_0002: conv.i8 - IL_0003: conv.ovf.i.un - IL_0004: newarr [runtime]System.Int32 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: conv.i8 - IL_000c: stloc.1 - IL_000d: ldc.i4.s 10 - IL_000f: stloc.2 - IL_0010: br.s IL_0020 - - IL_0012: ldloc.0 - IL_0013: ldloc.1 - IL_0014: conv.i - IL_0015: ldloc.2 - IL_0016: stelem.i4 - IL_0017: ldloc.2 - IL_0018: ldc.i4.m1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: conv.i8 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldc.i4.s 10 - IL_0023: conv.i8 - IL_0024: blt.un.s IL_0012 - - IL_0026: ldloc.0 - IL_0027: ret - } - - .method public static int32[] f8() cil managed - { - - .maxstack 5 - .locals init (int32[] V_0, - uint64 V_1, - int32 V_2) - IL_0000: ldc.i4.5 - IL_0001: conv.i8 - IL_0002: conv.ovf.i.un - IL_0003: newarr [runtime]System.Int32 - IL_0008: stloc.0 - IL_0009: ldc.i4.0 - IL_000a: conv.i8 - IL_000b: stloc.1 - IL_000c: ldc.i4.s 10 - IL_000e: stloc.2 - IL_000f: br.s IL_0020 - - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stelem.i4 - IL_0016: ldloc.2 - IL_0017: ldc.i4.s -2 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: conv.i8 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldc.i4.5 - IL_0022: conv.i8 - IL_0023: blt.un.s IL_0011 - - IL_0025: ldloc.0 - IL_0026: ret - } - - .method public static int32[] f9(int32 start) cil managed - { - - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - int32[] V_2, - uint64 V_3, - int32 V_4) - IL_0000: nop - IL_0001: ldc.i4.s 10 - IL_0003: ldarg.0 - IL_0004: bge.s IL_000b - - IL_0006: ldc.i4.0 - IL_0007: conv.i8 - IL_0008: nop - IL_0009: br.s IL_0014 - - IL_000b: ldc.i4.s 10 - IL_000d: ldarg.0 - IL_000e: sub - IL_000f: conv.i8 - IL_0010: ldc.i4.1 - IL_0011: conv.i8 - IL_0012: add - IL_0013: nop - IL_0014: stloc.0 - IL_0015: ldloc.0 - IL_0016: stloc.1 - IL_0017: ldloc.1 - IL_0018: brtrue.s IL_0020 - - IL_001a: call !!0[] [runtime]System.Array::Empty() - IL_001f: ret - - IL_0020: ldloc.1 - IL_0021: conv.ovf.i.un - IL_0022: newarr [runtime]System.Int32 - IL_0027: stloc.2 - IL_0028: ldc.i4.0 - IL_0029: conv.i8 - IL_002a: stloc.3 - IL_002b: ldarg.0 - IL_002c: stloc.s V_4 - IL_002e: br.s IL_0041 - - IL_0030: ldloc.2 - IL_0031: ldloc.3 - IL_0032: conv.i - IL_0033: ldloc.s V_4 - IL_0035: stelem.i4 - IL_0036: ldloc.s V_4 - IL_0038: ldc.i4.1 - IL_0039: add - IL_003a: stloc.s V_4 - IL_003c: ldloc.3 - IL_003d: ldc.i4.1 - IL_003e: conv.i8 - IL_003f: add - IL_0040: stloc.3 - IL_0041: ldloc.3 - IL_0042: ldloc.0 - IL_0043: blt.un.s IL_0030 - - IL_0045: ldloc.2 - IL_0046: ret - } - .method public static int32[] f10(int32 finish) cil managed { @@ -1226,6 +965,14 @@ IL_0052: ret } + .method public static int32[] f2() cil managed + { + + .maxstack 8 + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: ret + } + .method public static int32[] f20(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed { @@ -1777,6 +1524,259 @@ IL_0096: ret } + .method public static int32[] f3() cil managed + { + + .maxstack 5 + .locals init (int32[] V_0, + uint64 V_1, + int32 V_2) + IL_0000: ldc.i4.s 10 + IL_0002: conv.i8 + IL_0003: conv.ovf.i.un + IL_0004: newarr [runtime]System.Int32 + IL_0009: stloc.0 + IL_000a: ldc.i4.0 + IL_000b: conv.i8 + IL_000c: stloc.1 + IL_000d: ldc.i4.1 + IL_000e: stloc.2 + IL_000f: br.s IL_001f + + IL_0011: ldloc.0 + IL_0012: ldloc.1 + IL_0013: conv.i + IL_0014: ldloc.2 + IL_0015: stelem.i4 + IL_0016: ldloc.2 + IL_0017: ldc.i4.1 + IL_0018: add + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldc.i4.1 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldc.i4.s 10 + IL_0022: conv.i8 + IL_0023: blt.un.s IL_0011 + + IL_0025: ldloc.0 + IL_0026: ret + } + + .method public static int32[] f4() cil managed + { + + .maxstack 5 + .locals init (int32[] V_0, + uint64 V_1, + int32 V_2) + IL_0000: ldc.i4.5 + IL_0001: conv.i8 + IL_0002: conv.ovf.i.un + IL_0003: newarr [runtime]System.Int32 + IL_0008: stloc.0 + IL_0009: ldc.i4.0 + IL_000a: conv.i8 + IL_000b: stloc.1 + IL_000c: ldc.i4.1 + IL_000d: stloc.2 + IL_000e: br.s IL_001e + + IL_0010: ldloc.0 + IL_0011: ldloc.1 + IL_0012: conv.i + IL_0013: ldloc.2 + IL_0014: stelem.i4 + IL_0015: ldloc.2 + IL_0016: ldc.i4.2 + IL_0017: add + IL_0018: stloc.2 + IL_0019: ldloc.1 + IL_001a: ldc.i4.1 + IL_001b: conv.i8 + IL_001c: add + IL_001d: stloc.1 + IL_001e: ldloc.1 + IL_001f: ldc.i4.5 + IL_0020: conv.i8 + IL_0021: blt.un.s IL_0010 + + IL_0023: ldloc.0 + IL_0024: ret + } + + .method public static int32[] f5() cil managed + { + + .maxstack 8 + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: ret + } + + .method public static int32[] f6() cil managed + { + + .maxstack 8 + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: ret + } + + .method public static int32[] f7() cil managed + { + + .maxstack 5 + .locals init (int32[] V_0, + uint64 V_1, + int32 V_2) + IL_0000: ldc.i4.s 10 + IL_0002: conv.i8 + IL_0003: conv.ovf.i.un + IL_0004: newarr [runtime]System.Int32 + IL_0009: stloc.0 + IL_000a: ldc.i4.0 + IL_000b: conv.i8 + IL_000c: stloc.1 + IL_000d: ldc.i4.s 10 + IL_000f: stloc.2 + IL_0010: br.s IL_0020 + + IL_0012: ldloc.0 + IL_0013: ldloc.1 + IL_0014: conv.i + IL_0015: ldloc.2 + IL_0016: stelem.i4 + IL_0017: ldloc.2 + IL_0018: ldc.i4.m1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: conv.i8 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldc.i4.s 10 + IL_0023: conv.i8 + IL_0024: blt.un.s IL_0012 + + IL_0026: ldloc.0 + IL_0027: ret + } + + .method public static int32[] f8() cil managed + { + + .maxstack 5 + .locals init (int32[] V_0, + uint64 V_1, + int32 V_2) + IL_0000: ldc.i4.5 + IL_0001: conv.i8 + IL_0002: conv.ovf.i.un + IL_0003: newarr [runtime]System.Int32 + IL_0008: stloc.0 + IL_0009: ldc.i4.0 + IL_000a: conv.i8 + IL_000b: stloc.1 + IL_000c: ldc.i4.s 10 + IL_000e: stloc.2 + IL_000f: br.s IL_0020 + + IL_0011: ldloc.0 + IL_0012: ldloc.1 + IL_0013: conv.i + IL_0014: ldloc.2 + IL_0015: stelem.i4 + IL_0016: ldloc.2 + IL_0017: ldc.i4.s -2 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: conv.i8 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldc.i4.5 + IL_0022: conv.i8 + IL_0023: blt.un.s IL_0011 + + IL_0025: ldloc.0 + IL_0026: ret + } + + .method public static int32[] f9(int32 start) cil managed + { + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + int32[] V_2, + uint64 V_3, + int32 V_4) + IL_0000: nop + IL_0001: ldc.i4.s 10 + IL_0003: ldarg.0 + IL_0004: bge.s IL_000b + + IL_0006: ldc.i4.0 + IL_0007: conv.i8 + IL_0008: nop + IL_0009: br.s IL_0014 + + IL_000b: ldc.i4.s 10 + IL_000d: ldarg.0 + IL_000e: sub + IL_000f: conv.i8 + IL_0010: ldc.i4.1 + IL_0011: conv.i8 + IL_0012: add + IL_0013: nop + IL_0014: stloc.0 + IL_0015: ldloc.0 + IL_0016: stloc.1 + IL_0017: ldloc.1 + IL_0018: brtrue.s IL_0020 + + IL_001a: call !!0[] [runtime]System.Array::Empty() + IL_001f: ret + + IL_0020: ldloc.1 + IL_0021: conv.ovf.i.un + IL_0022: newarr [runtime]System.Int32 + IL_0027: stloc.2 + IL_0028: ldc.i4.0 + IL_0029: conv.i8 + IL_002a: stloc.3 + IL_002b: ldarg.0 + IL_002c: stloc.s V_4 + IL_002e: br.s IL_0041 + + IL_0030: ldloc.2 + IL_0031: ldloc.3 + IL_0032: conv.i + IL_0033: ldloc.s V_4 + IL_0035: stelem.i4 + IL_0036: ldloc.s V_4 + IL_0038: ldc.i4.1 + IL_0039: add + IL_003a: stloc.s V_4 + IL_003c: ldloc.3 + IL_003d: ldc.i4.1 + IL_003e: conv.i8 + IL_003f: add + IL_0040: stloc.3 + IL_0041: ldloc.3 + IL_0042: ldloc.0 + IL_0043: blt.un.s IL_0030 + + IL_0045: ldloc.2 + IL_0046: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -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..d995b29aafc 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeLists.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeLists.fs.il.bsl @@ -70,234 +70,6 @@ IL_0026: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2() cil managed - { - - .maxstack 8 - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0005: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3() cil managed - { - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, - int32 V_2) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.1 - IL_0004: stloc.2 - IL_0005: br.s IL_0019 - - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_000f: nop - IL_0010: ldloc.2 - IL_0011: ldc.i4.1 - IL_0012: add - IL_0013: stloc.2 - IL_0014: ldloc.1 - IL_0015: ldc.i4.1 - IL_0016: conv.i8 - IL_0017: add - IL_0018: stloc.1 - IL_0019: ldloc.1 - IL_001a: ldc.i4.s 10 - IL_001c: conv.i8 - IL_001d: blt.un.s IL_0007 - - IL_001f: ldloca.s V_0 - IL_0021: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0026: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f4() cil managed - { - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, - int32 V_2) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.1 - IL_0004: stloc.2 - IL_0005: br.s IL_0019 - - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_000f: nop - IL_0010: ldloc.2 - IL_0011: ldc.i4.2 - IL_0012: add - IL_0013: stloc.2 - IL_0014: ldloc.1 - IL_0015: ldc.i4.1 - IL_0016: conv.i8 - IL_0017: add - IL_0018: stloc.1 - IL_0019: ldloc.1 - IL_001a: ldc.i4.5 - IL_001b: conv.i8 - IL_001c: blt.un.s IL_0007 - - IL_001e: ldloca.s V_0 - IL_0020: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0025: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f5() cil managed - { - - .maxstack 8 - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0005: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f6() cil managed - { - - .maxstack 8 - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0005: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f7() cil managed - { - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, - int32 V_2) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.s 10 - IL_0005: stloc.2 - IL_0006: br.s IL_001a - - IL_0008: ldloca.s V_0 - IL_000a: ldloc.2 - IL_000b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0010: nop - IL_0011: ldloc.2 - IL_0012: ldc.i4.m1 - IL_0013: add - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: add - IL_0019: stloc.1 - IL_001a: ldloc.1 - IL_001b: ldc.i4.s 10 - IL_001d: conv.i8 - IL_001e: blt.un.s IL_0008 - - IL_0020: ldloca.s V_0 - IL_0022: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0027: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f8() cil managed - { - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, - int32 V_2) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.s 10 - IL_0005: stloc.2 - IL_0006: br.s IL_001b - - IL_0008: ldloca.s V_0 - IL_000a: ldloc.2 - IL_000b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0010: nop - IL_0011: ldloc.2 - IL_0012: ldc.i4.s -2 - IL_0014: add - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldc.i4.1 - IL_0018: conv.i8 - IL_0019: add - IL_001a: stloc.1 - IL_001b: ldloc.1 - IL_001c: ldc.i4.5 - IL_001d: conv.i8 - IL_001e: blt.un.s IL_0008 - - IL_0020: ldloca.s V_0 - IL_0022: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0027: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f9(int32 start) cil managed - { - - .maxstack 4 - .locals init (uint64 V_0, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, - uint64 V_2, - int32 V_3) - IL_0000: nop - IL_0001: ldc.i4.s 10 - IL_0003: ldarg.0 - IL_0004: bge.s IL_000b - - IL_0006: ldc.i4.0 - IL_0007: conv.i8 - IL_0008: nop - IL_0009: br.s IL_0014 - - IL_000b: ldc.i4.s 10 - IL_000d: ldarg.0 - IL_000e: sub - IL_000f: conv.i8 - IL_0010: ldc.i4.1 - IL_0011: conv.i8 - IL_0012: add - IL_0013: nop - IL_0014: stloc.0 - IL_0015: ldc.i4.0 - IL_0016: conv.i8 - IL_0017: stloc.2 - IL_0018: ldarg.0 - IL_0019: stloc.3 - IL_001a: br.s IL_002e - - IL_001c: ldloca.s V_1 - IL_001e: ldloc.3 - IL_001f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0024: nop - IL_0025: ldloc.3 - IL_0026: ldc.i4.1 - IL_0027: add - IL_0028: stloc.3 - IL_0029: ldloc.2 - IL_002a: ldc.i4.1 - IL_002b: conv.i8 - IL_002c: add - IL_002d: stloc.2 - IL_002e: ldloc.2 - IL_002f: ldloc.0 - IL_0030: blt.un.s IL_001c - - IL_0032: ldloca.s V_1 - IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0039: ret - } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f10(int32 finish) cil managed { @@ -1055,6 +827,14 @@ IL_0044: ret } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2() cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0005: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f20(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed { @@ -1528,6 +1308,226 @@ IL_0086: ret } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + uint64 V_1, + int32 V_2) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.1 + IL_0004: stloc.2 + IL_0005: br.s IL_0019 + + IL_0007: ldloca.s V_0 + IL_0009: ldloc.2 + IL_000a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_000f: nop + IL_0010: ldloc.2 + IL_0011: ldc.i4.1 + IL_0012: add + IL_0013: stloc.2 + IL_0014: ldloc.1 + IL_0015: ldc.i4.1 + IL_0016: conv.i8 + IL_0017: add + IL_0018: stloc.1 + IL_0019: ldloc.1 + IL_001a: ldc.i4.s 10 + IL_001c: conv.i8 + IL_001d: blt.un.s IL_0007 + + IL_001f: ldloca.s V_0 + IL_0021: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0026: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f4() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + uint64 V_1, + int32 V_2) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.1 + IL_0004: stloc.2 + IL_0005: br.s IL_0019 + + IL_0007: ldloca.s V_0 + IL_0009: ldloc.2 + IL_000a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_000f: nop + IL_0010: ldloc.2 + IL_0011: ldc.i4.2 + IL_0012: add + IL_0013: stloc.2 + IL_0014: ldloc.1 + IL_0015: ldc.i4.1 + IL_0016: conv.i8 + IL_0017: add + IL_0018: stloc.1 + IL_0019: ldloc.1 + IL_001a: ldc.i4.5 + IL_001b: conv.i8 + IL_001c: blt.un.s IL_0007 + + IL_001e: ldloca.s V_0 + IL_0020: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0025: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f5() cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0005: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f6() cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0005: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f7() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + uint64 V_1, + int32 V_2) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.s 10 + IL_0005: stloc.2 + IL_0006: br.s IL_001a + + IL_0008: ldloca.s V_0 + IL_000a: ldloc.2 + IL_000b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0010: nop + IL_0011: ldloc.2 + IL_0012: ldc.i4.m1 + IL_0013: add + IL_0014: stloc.2 + IL_0015: ldloc.1 + IL_0016: ldc.i4.1 + IL_0017: conv.i8 + IL_0018: add + IL_0019: stloc.1 + IL_001a: ldloc.1 + IL_001b: ldc.i4.s 10 + IL_001d: conv.i8 + IL_001e: blt.un.s IL_0008 + + IL_0020: ldloca.s V_0 + IL_0022: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0027: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f8() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + uint64 V_1, + int32 V_2) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.s 10 + IL_0005: stloc.2 + IL_0006: br.s IL_001b + + IL_0008: ldloca.s V_0 + IL_000a: ldloc.2 + IL_000b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0010: nop + IL_0011: ldloc.2 + IL_0012: ldc.i4.s -2 + IL_0014: add + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldc.i4.1 + IL_0018: conv.i8 + IL_0019: add + IL_001a: stloc.1 + IL_001b: ldloc.1 + IL_001c: ldc.i4.5 + IL_001d: conv.i8 + IL_001e: blt.un.s IL_0008 + + IL_0020: ldloca.s V_0 + IL_0022: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0027: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f9(int32 start) cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, + uint64 V_2, + int32 V_3) + IL_0000: nop + IL_0001: ldc.i4.s 10 + IL_0003: ldarg.0 + IL_0004: bge.s IL_000b + + IL_0006: ldc.i4.0 + IL_0007: conv.i8 + IL_0008: nop + IL_0009: br.s IL_0014 + + IL_000b: ldc.i4.s 10 + IL_000d: ldarg.0 + IL_000e: sub + IL_000f: conv.i8 + IL_0010: ldc.i4.1 + IL_0011: conv.i8 + IL_0012: add + IL_0013: nop + IL_0014: stloc.0 + IL_0015: ldc.i4.0 + IL_0016: conv.i8 + IL_0017: stloc.2 + IL_0018: ldarg.0 + IL_0019: stloc.3 + IL_001a: br.s IL_002e + + IL_001c: ldloca.s V_1 + IL_001e: ldloc.3 + IL_001f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0024: nop + IL_0025: ldloc.3 + IL_0026: ldc.i4.1 + IL_0027: add + IL_0028: stloc.3 + IL_0029: ldloc.2 + IL_002a: ldc.i4.1 + IL_002b: conv.i8 + IL_002c: add + IL_002d: stloc.2 + IL_002e: ldloc.2 + IL_002f: ldloc.0 + IL_0030: blt.un.s IL_001c + + IL_0032: ldloca.s V_1 + IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0039: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -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..8ba8f6ad0a3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeArrays.fs.il.bsl @@ -77,111 +77,7 @@ IL_0028: ret } - .method public static uint64[] f2() cil managed - { - - .maxstack 8 - IL_0000: call !!0[] [runtime]System.Array::Empty() - IL_0005: ret - } - - .method public static uint64[] f3() cil managed - { - - .maxstack 5 - .locals init (uint64[] V_0, - uint64 V_1, - uint64 V_2) - IL_0000: ldc.i4.s 10 - IL_0002: conv.i8 - IL_0003: conv.ovf.i.un - IL_0004: newarr [runtime]System.UInt64 - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: conv.i8 - IL_000c: stloc.1 - IL_000d: ldc.i4.1 - IL_000e: conv.i8 - IL_000f: stloc.2 - IL_0010: br.s IL_0021 - - IL_0012: ldloc.0 - IL_0013: ldloc.1 - IL_0014: conv.i - IL_0015: ldloc.2 - IL_0016: stelem.i8 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: conv.i8 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: add - IL_0020: stloc.1 - IL_0021: ldloc.1 - IL_0022: ldc.i4.s 10 - IL_0024: conv.i8 - IL_0025: blt.un.s IL_0012 - - IL_0027: ldloc.0 - IL_0028: ret - } - - .method public static uint64[] f4() cil managed - { - - .maxstack 5 - .locals init (uint64[] V_0, - uint64 V_1, - uint64 V_2) - IL_0000: ldc.i4.5 - IL_0001: conv.i8 - IL_0002: conv.ovf.i.un - IL_0003: newarr [runtime]System.UInt64 - IL_0008: stloc.0 - IL_0009: ldc.i4.0 - IL_000a: conv.i8 - IL_000b: stloc.1 - IL_000c: ldc.i4.1 - IL_000d: conv.i8 - IL_000e: stloc.2 - IL_000f: br.s IL_0020 - - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stelem.i8 - IL_0016: ldloc.2 - IL_0017: ldc.i4.2 - IL_0018: conv.i8 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: conv.i8 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldc.i4.5 - IL_0022: conv.i8 - IL_0023: blt.un.s IL_0011 - - IL_0025: ldloc.0 - IL_0026: ret - } - - .method public static uint64[] f5() cil managed - { - - .maxstack 8 - IL_0000: call !!0[] [runtime]System.Array::Empty() - IL_0005: ret - } - - .method public static uint64[] f6(uint64 start) cil managed + .method public static uint64[] f10(uint64 step) cil managed { .maxstack 5 @@ -191,68 +87,88 @@ uint64 V_3, uint64 V_4) IL_0000: nop - IL_0001: ldc.i4.s 10 - IL_0003: conv.i8 - IL_0004: ldarg.0 - IL_0005: bge.un.s IL_000c + IL_0001: ldarg.0 + IL_0002: brtrue.s IL_0013 - IL_0007: ldc.i4.0 - IL_0008: conv.i8 - IL_0009: nop - IL_000a: br.s IL_0015 + IL_0004: ldc.i4.1 + IL_0005: conv.i8 + IL_0006: ldarg.0 + IL_0007: ldc.i4.s 10 + IL_0009: conv.i8 + IL_000a: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_000f: pop + IL_0010: nop + IL_0011: br.s IL_0014 - IL_000c: ldc.i4.s 10 - IL_000e: conv.i8 - IL_000f: ldarg.0 - IL_0010: sub - IL_0011: ldc.i4.1 - IL_0012: conv.i8 - IL_0013: add.ovf.un - IL_0014: nop - IL_0015: stloc.0 - IL_0016: ldloc.0 - IL_0017: stloc.1 - IL_0018: ldloc.1 - IL_0019: brtrue.s IL_0021 + IL_0013: nop + IL_0014: ldc.i4.s 10 + IL_0016: conv.i8 + IL_0017: ldc.i4.1 + IL_0018: conv.i8 + IL_0019: bge.un.s IL_0020 - IL_001b: call !!0[] [runtime]System.Array::Empty() - IL_0020: ret + IL_001b: ldc.i4.0 + IL_001c: conv.i8 + IL_001d: nop + IL_001e: br.s IL_002c - IL_0021: ldloc.1 - IL_0022: conv.ovf.i.un - IL_0023: newarr [runtime]System.UInt64 - IL_0028: stloc.2 - IL_0029: ldc.i4.0 - IL_002a: conv.i8 - IL_002b: stloc.3 - IL_002c: ldarg.0 - IL_002d: stloc.s V_4 - IL_002f: br.s IL_0043 + IL_0020: ldc.i4.s 10 + IL_0022: conv.i8 + IL_0023: ldc.i4.1 + IL_0024: conv.i8 + IL_0025: sub + IL_0026: ldarg.0 + IL_0027: div.un + IL_0028: ldc.i4.1 + IL_0029: conv.i8 + IL_002a: add.ovf.un + IL_002b: nop + IL_002c: stloc.0 + IL_002d: ldloc.0 + IL_002e: stloc.1 + IL_002f: ldloc.1 + IL_0030: brtrue.s IL_0038 - IL_0031: ldloc.2 - IL_0032: ldloc.3 - IL_0033: conv.i - IL_0034: ldloc.s V_4 - IL_0036: stelem.i8 - IL_0037: ldloc.s V_4 - IL_0039: ldc.i4.1 - IL_003a: conv.i8 - IL_003b: add - IL_003c: stloc.s V_4 - IL_003e: ldloc.3 - IL_003f: ldc.i4.1 - IL_0040: conv.i8 - IL_0041: add + IL_0032: call !!0[] [runtime]System.Array::Empty() + IL_0037: ret + + IL_0038: ldloc.1 + IL_0039: conv.ovf.i.un + IL_003a: newarr [runtime]System.UInt64 + IL_003f: stloc.2 + IL_0040: ldc.i4.0 + IL_0041: conv.i8 IL_0042: stloc.3 - IL_0043: ldloc.3 - IL_0044: ldloc.0 - IL_0045: blt.un.s IL_0031 + IL_0043: ldc.i4.1 + IL_0044: conv.i8 + IL_0045: stloc.s V_4 + IL_0047: br.s IL_005a - IL_0047: ldloc.2 - IL_0048: ret + IL_0049: ldloc.2 + IL_004a: ldloc.3 + IL_004b: conv.i + IL_004c: ldloc.s V_4 + IL_004e: stelem.i8 + IL_004f: ldloc.s V_4 + IL_0051: ldarg.0 + IL_0052: add + IL_0053: stloc.s V_4 + IL_0055: ldloc.3 + IL_0056: ldc.i4.1 + IL_0057: conv.i8 + IL_0058: add + IL_0059: stloc.3 + IL_005a: ldloc.3 + IL_005b: ldloc.0 + IL_005c: blt.un.s IL_0049 + + IL_005e: ldloc.2 + IL_005f: ret } - .method public static uint64[] f7(uint64 finish) cil managed + .method public static uint64[] f11(uint64 finish) cil managed { .maxstack 5 @@ -324,31 +240,120 @@ IL_0047: ret } - .method public static uint64[] f8(uint64 start, - uint64 finish) cil managed + .method public static uint64[] f12(uint64 start, + uint64 step) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 5 .locals init (uint64 V_0, - bool V_1, - uint64 V_2, - uint64[] V_3, - bool V_4, - uint64 V_5, - uint64 V_6, - uint64 V_7) + uint64 V_1, + uint64[] V_2, + uint64 V_3, + uint64 V_4) IL_0000: nop IL_0001: ldarg.1 - IL_0002: ldarg.0 - IL_0003: bge.un.s IL_000a - - IL_0005: ldc.i4.0 - IL_0006: conv.i8 - IL_0007: nop - IL_0008: br.s IL_000e + IL_0002: brtrue.s IL_0012 - IL_000a: ldarg.1 + IL_0004: ldarg.0 + IL_0005: ldarg.1 + IL_0006: ldc.i4.s 10 + IL_0008: conv.i8 + IL_0009: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_000e: pop + IL_000f: nop + IL_0010: br.s IL_0013 + + IL_0012: nop + IL_0013: ldc.i4.s 10 + IL_0015: conv.i8 + IL_0016: ldarg.0 + IL_0017: bge.un.s IL_001e + + IL_0019: ldc.i4.0 + IL_001a: conv.i8 + IL_001b: nop + IL_001c: br.s IL_0029 + + IL_001e: ldc.i4.s 10 + IL_0020: conv.i8 + IL_0021: ldarg.0 + IL_0022: sub + IL_0023: ldarg.1 + IL_0024: div.un + IL_0025: ldc.i4.1 + IL_0026: conv.i8 + IL_0027: add.ovf.un + IL_0028: nop + IL_0029: stloc.0 + IL_002a: ldloc.0 + IL_002b: stloc.1 + IL_002c: ldloc.1 + IL_002d: brtrue.s IL_0035 + + IL_002f: call !!0[] [runtime]System.Array::Empty() + IL_0034: ret + + IL_0035: ldloc.1 + IL_0036: conv.ovf.i.un + IL_0037: newarr [runtime]System.UInt64 + IL_003c: stloc.2 + IL_003d: ldc.i4.0 + IL_003e: conv.i8 + IL_003f: stloc.3 + IL_0040: ldarg.0 + IL_0041: stloc.s V_4 + IL_0043: br.s IL_0056 + + IL_0045: ldloc.2 + IL_0046: ldloc.3 + IL_0047: conv.i + IL_0048: ldloc.s V_4 + IL_004a: stelem.i8 + IL_004b: ldloc.s V_4 + IL_004d: ldarg.1 + IL_004e: add + IL_004f: stloc.s V_4 + IL_0051: ldloc.3 + IL_0052: ldc.i4.1 + IL_0053: conv.i8 + IL_0054: add + IL_0055: stloc.3 + IL_0056: ldloc.3 + IL_0057: ldloc.0 + IL_0058: blt.un.s IL_0045 + + IL_005a: ldloc.2 + IL_005b: ret + } + + .method public static uint64[] f13(uint64 start, + uint64 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (uint64 V_0, + bool V_1, + uint64 V_2, + uint64[] V_3, + bool V_4, + uint64 V_5, + uint64 V_6, + uint64 V_7) + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: ldarg.0 + IL_0003: bge.un.s IL_000a + + IL_0005: ldc.i4.0 + IL_0006: conv.i8 + IL_0007: nop + IL_0008: br.s IL_000e + + IL_000a: ldarg.1 IL_000b: ldarg.0 IL_000c: sub IL_000d: nop @@ -471,8 +476,10 @@ IL_00a2: ret } - .method public static uint64[] f9(uint64 start) cil managed + .method public static uint64[] f14(uint64 step, + uint64 finish) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 5 .locals init (uint64 V_0, @@ -481,724 +488,559 @@ uint64 V_3, uint64 V_4) IL_0000: nop - IL_0001: ldc.i4.s 10 - IL_0003: conv.i8 - IL_0004: ldarg.0 - IL_0005: bge.un.s IL_000c + IL_0001: ldarg.0 + IL_0002: brtrue.s IL_0011 - IL_0007: ldc.i4.0 - IL_0008: conv.i8 - IL_0009: nop - IL_000a: br.s IL_0015 + IL_0004: ldc.i4.1 + IL_0005: conv.i8 + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_000d: pop + IL_000e: nop + IL_000f: br.s IL_0012 - IL_000c: ldc.i4.s 10 - IL_000e: conv.i8 - IL_000f: ldarg.0 - IL_0010: sub - IL_0011: ldc.i4.1 - IL_0012: conv.i8 - IL_0013: add.ovf.un - IL_0014: nop - IL_0015: stloc.0 - IL_0016: ldloc.0 - IL_0017: stloc.1 - IL_0018: ldloc.1 - IL_0019: brtrue.s IL_0021 + IL_0011: nop + IL_0012: ldarg.1 + IL_0013: ldc.i4.1 + IL_0014: conv.i8 + IL_0015: bge.un.s IL_001c - IL_001b: call !!0[] [runtime]System.Array::Empty() - IL_0020: ret + IL_0017: ldc.i4.0 + IL_0018: conv.i8 + IL_0019: nop + IL_001a: br.s IL_0026 - IL_0021: ldloc.1 - IL_0022: conv.ovf.i.un - IL_0023: newarr [runtime]System.UInt64 - IL_0028: stloc.2 - IL_0029: ldc.i4.0 - IL_002a: conv.i8 - IL_002b: stloc.3 - IL_002c: ldarg.0 - IL_002d: stloc.s V_4 - IL_002f: br.s IL_0043 + IL_001c: ldarg.1 + IL_001d: ldc.i4.1 + IL_001e: conv.i8 + IL_001f: sub + IL_0020: ldarg.0 + IL_0021: div.un + IL_0022: ldc.i4.1 + IL_0023: conv.i8 + IL_0024: add.ovf.un + IL_0025: nop + IL_0026: stloc.0 + IL_0027: ldloc.0 + IL_0028: stloc.1 + IL_0029: ldloc.1 + IL_002a: brtrue.s IL_0032 - IL_0031: ldloc.2 - IL_0032: ldloc.3 - IL_0033: conv.i - IL_0034: ldloc.s V_4 - IL_0036: stelem.i8 - IL_0037: ldloc.s V_4 - IL_0039: ldc.i4.1 - IL_003a: conv.i8 - IL_003b: add - IL_003c: stloc.s V_4 - IL_003e: ldloc.3 - IL_003f: ldc.i4.1 - IL_0040: conv.i8 - IL_0041: add - IL_0042: stloc.3 - IL_0043: ldloc.3 - IL_0044: ldloc.0 - IL_0045: blt.un.s IL_0031 + IL_002c: call !!0[] [runtime]System.Array::Empty() + IL_0031: ret - IL_0047: ldloc.2 - IL_0048: ret + IL_0032: ldloc.1 + IL_0033: conv.ovf.i.un + IL_0034: newarr [runtime]System.UInt64 + IL_0039: stloc.2 + IL_003a: ldc.i4.0 + IL_003b: conv.i8 + IL_003c: stloc.3 + IL_003d: ldc.i4.1 + IL_003e: conv.i8 + IL_003f: stloc.s V_4 + IL_0041: br.s IL_0054 + + IL_0043: ldloc.2 + IL_0044: ldloc.3 + IL_0045: conv.i + IL_0046: ldloc.s V_4 + IL_0048: stelem.i8 + IL_0049: ldloc.s V_4 + IL_004b: ldarg.0 + IL_004c: add + IL_004d: stloc.s V_4 + IL_004f: ldloc.3 + IL_0050: ldc.i4.1 + IL_0051: conv.i8 + IL_0052: add + IL_0053: stloc.3 + IL_0054: ldloc.3 + IL_0055: ldloc.0 + IL_0056: blt.un.s IL_0043 + + IL_0058: ldloc.2 + IL_0059: ret } - .method public static uint64[] f10(uint64 step) cil managed + .method public static uint64[] f15(uint64 start, + uint64 step, + uint64 finish) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) .maxstack 5 .locals init (uint64 V_0, - uint64 V_1, - uint64[] V_2, - uint64 V_3, - uint64 V_4) + bool V_1, + uint64 V_2, + uint64[] V_3, + bool V_4, + uint64 V_5, + uint64 V_6, + uint64 V_7) IL_0000: nop - IL_0001: ldarg.0 - IL_0002: brtrue.s IL_0013 + IL_0001: ldarg.1 + IL_0002: brtrue.s IL_0010 + + IL_0004: ldarg.0 + IL_0005: ldarg.1 + IL_0006: ldarg.2 + IL_0007: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_000c: pop + IL_000d: nop + IL_000e: br.s IL_0011 - IL_0004: ldc.i4.1 - IL_0005: conv.i8 - IL_0006: ldarg.0 - IL_0007: ldc.i4.s 10 - IL_0009: conv.i8 - IL_000a: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_000f: pop IL_0010: nop - IL_0011: br.s IL_0014 + IL_0011: ldarg.2 + IL_0012: ldarg.0 + IL_0013: bge.un.s IL_001a - IL_0013: nop - IL_0014: ldc.i4.s 10 + IL_0015: ldc.i4.0 IL_0016: conv.i8 - IL_0017: ldc.i4.1 - IL_0018: conv.i8 - IL_0019: bge.un.s IL_0020 + IL_0017: nop + IL_0018: br.s IL_0020 - IL_001b: ldc.i4.0 - IL_001c: conv.i8 - IL_001d: nop - IL_001e: br.s IL_002c + IL_001a: ldarg.2 + IL_001b: ldarg.0 + IL_001c: sub + IL_001d: ldarg.1 + IL_001e: div.un + IL_001f: nop + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ldc.i4.m1 + IL_0023: conv.i8 + IL_0024: ceq + IL_0026: stloc.1 + IL_0027: ldarg.2 + IL_0028: ldarg.0 + IL_0029: bge.un.s IL_0030 - IL_0020: ldc.i4.s 10 - IL_0022: conv.i8 - IL_0023: ldc.i4.1 - IL_0024: conv.i8 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: div.un - IL_0028: ldc.i4.1 - IL_0029: conv.i8 - IL_002a: add.ovf.un - IL_002b: nop - IL_002c: stloc.0 - IL_002d: ldloc.0 - IL_002e: stloc.1 - IL_002f: ldloc.1 - IL_0030: brtrue.s IL_0038 + IL_002b: ldc.i4.0 + IL_002c: conv.i8 + IL_002d: nop + IL_002e: br.s IL_0039 - IL_0032: call !!0[] [runtime]System.Array::Empty() - IL_0037: ret + IL_0030: ldarg.2 + IL_0031: ldarg.0 + IL_0032: sub + IL_0033: ldarg.1 + IL_0034: div.un + IL_0035: ldc.i4.1 + IL_0036: conv.i8 + IL_0037: add.ovf.un + IL_0038: nop + IL_0039: stloc.2 + IL_003a: ldloc.2 + IL_003b: brtrue.s IL_0043 - IL_0038: ldloc.1 - IL_0039: conv.ovf.i.un - IL_003a: newarr [runtime]System.UInt64 - IL_003f: stloc.2 - IL_0040: ldc.i4.0 - IL_0041: conv.i8 - IL_0042: stloc.3 - IL_0043: ldc.i4.1 - IL_0044: conv.i8 - IL_0045: stloc.s V_4 - IL_0047: br.s IL_005a + IL_003d: call !!0[] [runtime]System.Array::Empty() + IL_0042: ret - IL_0049: ldloc.2 - IL_004a: ldloc.3 - IL_004b: conv.i - IL_004c: ldloc.s V_4 - IL_004e: stelem.i8 - IL_004f: ldloc.s V_4 - IL_0051: ldarg.0 - IL_0052: add - IL_0053: stloc.s V_4 - IL_0055: ldloc.3 - IL_0056: ldc.i4.1 - IL_0057: conv.i8 - IL_0058: add - IL_0059: stloc.3 - IL_005a: ldloc.3 - IL_005b: ldloc.0 - IL_005c: blt.un.s IL_0049 + IL_0043: ldloc.2 + IL_0044: conv.ovf.i.un + IL_0045: newarr [runtime]System.UInt64 + IL_004a: stloc.3 + IL_004b: ldloc.1 + IL_004c: brfalse.s IL_007d - IL_005e: ldloc.2 - IL_005f: ret - } + IL_004e: ldc.i4.1 + IL_004f: stloc.s V_4 + IL_0051: ldc.i4.0 + IL_0052: conv.i8 + IL_0053: stloc.s V_5 + IL_0055: ldarg.0 + IL_0056: stloc.s V_6 + IL_0058: br.s IL_0076 - .method public static uint64[] f11(uint64 finish) cil managed - { - - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - uint64[] V_2, - uint64 V_3, - uint64 V_4) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: conv.i8 - IL_0004: bge.un.s IL_000b + IL_005a: ldloc.3 + IL_005b: ldloc.s V_5 + IL_005d: conv.i + IL_005e: ldloc.s V_6 + IL_0060: stelem.i8 + IL_0061: ldloc.s V_6 + IL_0063: ldarg.1 + IL_0064: add + IL_0065: stloc.s V_6 + IL_0067: ldloc.s V_5 + IL_0069: ldc.i4.1 + IL_006a: conv.i8 + IL_006b: add + IL_006c: stloc.s V_5 + IL_006e: ldloc.s V_5 + IL_0070: ldc.i4.0 + IL_0071: conv.i8 + IL_0072: cgt.un + IL_0074: stloc.s V_4 + IL_0076: ldloc.s V_4 + IL_0078: brtrue.s IL_005a - IL_0006: ldc.i4.0 - IL_0007: conv.i8 - IL_0008: nop - IL_0009: br.s IL_0013 + IL_007a: nop + IL_007b: br.s IL_00b5 - IL_000b: ldarg.0 - IL_000c: ldc.i4.1 - IL_000d: conv.i8 - IL_000e: sub - IL_000f: ldc.i4.1 - IL_0010: conv.i8 - IL_0011: add.ovf.un - IL_0012: nop - IL_0013: stloc.0 - IL_0014: ldloc.0 - IL_0015: stloc.1 - IL_0016: ldloc.1 - IL_0017: brtrue.s IL_001f + IL_007d: ldarg.2 + IL_007e: ldarg.0 + IL_007f: bge.un.s IL_0086 - IL_0019: call !!0[] [runtime]System.Array::Empty() - IL_001e: ret + IL_0081: ldc.i4.0 + IL_0082: conv.i8 + IL_0083: nop + IL_0084: br.s IL_008f - IL_001f: ldloc.1 - IL_0020: conv.ovf.i.un - IL_0021: newarr [runtime]System.UInt64 - IL_0026: stloc.2 - IL_0027: ldc.i4.0 - IL_0028: conv.i8 - IL_0029: stloc.3 - IL_002a: ldc.i4.1 - IL_002b: conv.i8 - IL_002c: stloc.s V_4 - IL_002e: br.s IL_0042 + IL_0086: ldarg.2 + IL_0087: ldarg.0 + IL_0088: sub + IL_0089: ldarg.1 + IL_008a: div.un + IL_008b: ldc.i4.1 + IL_008c: conv.i8 + IL_008d: add.ovf.un + IL_008e: nop + IL_008f: stloc.s V_5 + IL_0091: ldc.i4.0 + IL_0092: conv.i8 + IL_0093: stloc.s V_6 + IL_0095: ldarg.0 + IL_0096: stloc.s V_7 + IL_0098: br.s IL_00ae - IL_0030: ldloc.2 - IL_0031: ldloc.3 - IL_0032: conv.i - IL_0033: ldloc.s V_4 - IL_0035: stelem.i8 - IL_0036: ldloc.s V_4 - IL_0038: ldc.i4.1 - IL_0039: conv.i8 - IL_003a: add - IL_003b: stloc.s V_4 - IL_003d: ldloc.3 - IL_003e: ldc.i4.1 - IL_003f: conv.i8 - IL_0040: add - IL_0041: stloc.3 - IL_0042: ldloc.3 - IL_0043: ldloc.0 - IL_0044: blt.un.s IL_0030 + IL_009a: ldloc.3 + IL_009b: ldloc.s V_6 + IL_009d: conv.i + IL_009e: ldloc.s V_7 + IL_00a0: stelem.i8 + IL_00a1: ldloc.s V_7 + IL_00a3: ldarg.1 + IL_00a4: add + IL_00a5: stloc.s V_7 + IL_00a7: ldloc.s V_6 + IL_00a9: ldc.i4.1 + IL_00aa: conv.i8 + IL_00ab: add + IL_00ac: stloc.s V_6 + IL_00ae: ldloc.s V_6 + IL_00b0: ldloc.s V_5 + IL_00b2: blt.un.s IL_009a - IL_0046: ldloc.2 - IL_0047: ret + IL_00b4: nop + IL_00b5: ldloc.3 + IL_00b6: ret } - .method public static uint64[] f12(uint64 start, - uint64 step) cil managed + .method public static uint64[] f16(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 5 .locals init (uint64 V_0, uint64 V_1, - uint64[] V_2, - uint64 V_3, - uint64 V_4) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: brtrue.s IL_0012 - - IL_0004: ldarg.0 - IL_0005: ldarg.1 - IL_0006: ldc.i4.s 10 - IL_0008: conv.i8 - IL_0009: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_000e: pop - IL_000f: nop - IL_0010: br.s IL_0013 - - IL_0012: nop - IL_0013: ldc.i4.s 10 - IL_0015: conv.i8 - IL_0016: ldarg.0 - IL_0017: bge.un.s IL_001e - - IL_0019: ldc.i4.0 - IL_001a: conv.i8 - IL_001b: nop - IL_001c: br.s IL_0029 - - IL_001e: ldc.i4.s 10 - IL_0020: conv.i8 - IL_0021: ldarg.0 - IL_0022: sub - IL_0023: ldarg.1 - IL_0024: div.un - IL_0025: ldc.i4.1 - IL_0026: conv.i8 - IL_0027: add.ovf.un - IL_0028: nop - IL_0029: stloc.0 - IL_002a: ldloc.0 - IL_002b: stloc.1 - IL_002c: ldloc.1 - IL_002d: brtrue.s IL_0035 - - IL_002f: call !!0[] [runtime]System.Array::Empty() - IL_0034: ret - - IL_0035: ldloc.1 - IL_0036: conv.ovf.i.un - IL_0037: newarr [runtime]System.UInt64 - IL_003c: stloc.2 - IL_003d: ldc.i4.0 - IL_003e: conv.i8 - IL_003f: stloc.3 - IL_0040: ldarg.0 - IL_0041: stloc.s V_4 - IL_0043: br.s IL_0056 - - IL_0045: ldloc.2 - IL_0046: ldloc.3 - IL_0047: conv.i - IL_0048: ldloc.s V_4 - IL_004a: stelem.i8 - IL_004b: ldloc.s V_4 - IL_004d: ldarg.1 - IL_004e: add - IL_004f: stloc.s V_4 - IL_0051: ldloc.3 - IL_0052: ldc.i4.1 - IL_0053: conv.i8 - IL_0054: add - IL_0055: stloc.3 - IL_0056: ldloc.3 - IL_0057: ldloc.0 - IL_0058: blt.un.s IL_0045 - - IL_005a: ldloc.2 - IL_005b: ret - } - - .method public static uint64[] f13(uint64 start, - uint64 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 5 - .locals init (uint64 V_0, - bool V_1, uint64 V_2, uint64[] V_3, - bool V_4, - uint64 V_5, - uint64 V_6, - uint64 V_7) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: ldarg.0 - IL_0003: bge.un.s IL_000a - - IL_0005: ldc.i4.0 - IL_0006: conv.i8 - IL_0007: nop - IL_0008: br.s IL_000e + uint64 V_4, + uint64 V_5) + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: stloc.0 + IL_0008: ldc.i4.s 10 + IL_000a: conv.i8 + IL_000b: ldloc.0 + IL_000c: bge.un.s IL_0013 - IL_000a: ldarg.1 - IL_000b: ldarg.0 - IL_000c: sub - IL_000d: nop - IL_000e: stloc.0 - IL_000f: ldloc.0 - IL_0010: ldc.i4.m1 - IL_0011: conv.i8 - IL_0012: ceq - IL_0014: stloc.1 - IL_0015: ldarg.1 - IL_0016: ldarg.0 - IL_0017: bge.un.s IL_001e + IL_000e: ldc.i4.0 + IL_000f: conv.i8 + IL_0010: nop + IL_0011: br.s IL_001c - IL_0019: ldc.i4.0 - IL_001a: conv.i8 + IL_0013: ldc.i4.s 10 + IL_0015: conv.i8 + IL_0016: ldloc.0 + IL_0017: sub + IL_0018: ldc.i4.1 + IL_0019: conv.i8 + IL_001a: add.ovf.un IL_001b: nop - IL_001c: br.s IL_0025 - - IL_001e: ldarg.1 - IL_001f: ldarg.0 - IL_0020: sub - IL_0021: ldc.i4.1 - IL_0022: conv.i8 - IL_0023: add.ovf.un - IL_0024: nop - IL_0025: stloc.2 - IL_0026: ldloc.2 - IL_0027: brtrue.s IL_002f - - IL_0029: call !!0[] [runtime]System.Array::Empty() - IL_002e: ret - - IL_002f: ldloc.2 - IL_0030: conv.ovf.i.un - IL_0031: newarr [runtime]System.UInt64 - IL_0036: stloc.3 - IL_0037: ldloc.1 - IL_0038: brfalse.s IL_006a - - IL_003a: ldc.i4.1 - IL_003b: stloc.s V_4 - IL_003d: ldc.i4.0 - IL_003e: conv.i8 - IL_003f: stloc.s V_5 - IL_0041: ldarg.0 - IL_0042: stloc.s V_6 - IL_0044: br.s IL_0063 - - IL_0046: ldloc.3 - IL_0047: ldloc.s V_5 - IL_0049: conv.i - IL_004a: ldloc.s V_6 - IL_004c: stelem.i8 - IL_004d: ldloc.s V_6 - IL_004f: ldc.i4.1 - IL_0050: conv.i8 - IL_0051: add - IL_0052: stloc.s V_6 - IL_0054: ldloc.s V_5 - IL_0056: ldc.i4.1 - IL_0057: conv.i8 - IL_0058: add - IL_0059: stloc.s V_5 - IL_005b: ldloc.s V_5 - IL_005d: ldc.i4.0 - IL_005e: conv.i8 - IL_005f: cgt.un - IL_0061: stloc.s V_4 - IL_0063: ldloc.s V_4 - IL_0065: brtrue.s IL_0046 - - IL_0067: nop - IL_0068: br.s IL_00a1 - - IL_006a: ldarg.1 - IL_006b: ldarg.0 - IL_006c: bge.un.s IL_0073 + IL_001c: stloc.1 + IL_001d: ldloc.1 + IL_001e: stloc.2 + IL_001f: ldloc.2 + IL_0020: brtrue.s IL_0028 - IL_006e: ldc.i4.0 - IL_006f: conv.i8 - IL_0070: nop - IL_0071: br.s IL_007a + IL_0022: call !!0[] [runtime]System.Array::Empty() + IL_0027: ret - IL_0073: ldarg.1 - IL_0074: ldarg.0 - IL_0075: sub - IL_0076: ldc.i4.1 - IL_0077: conv.i8 - IL_0078: add.ovf.un - IL_0079: nop - IL_007a: stloc.s V_5 - IL_007c: ldc.i4.0 - IL_007d: conv.i8 - IL_007e: stloc.s V_6 - IL_0080: ldarg.0 - IL_0081: stloc.s V_7 - IL_0083: br.s IL_009a + IL_0028: ldloc.2 + IL_0029: conv.ovf.i.un + IL_002a: newarr [runtime]System.UInt64 + IL_002f: stloc.3 + IL_0030: ldc.i4.0 + IL_0031: conv.i8 + IL_0032: stloc.s V_4 + IL_0034: ldloc.0 + IL_0035: stloc.s V_5 + IL_0037: br.s IL_004e - IL_0085: ldloc.3 - IL_0086: ldloc.s V_6 - IL_0088: conv.i - IL_0089: ldloc.s V_7 - IL_008b: stelem.i8 - IL_008c: ldloc.s V_7 - IL_008e: ldc.i4.1 - IL_008f: conv.i8 - IL_0090: add - IL_0091: stloc.s V_7 - IL_0093: ldloc.s V_6 - IL_0095: ldc.i4.1 - IL_0096: conv.i8 - IL_0097: add - IL_0098: stloc.s V_6 - IL_009a: ldloc.s V_6 - IL_009c: ldloc.s V_5 - IL_009e: blt.un.s IL_0085 + IL_0039: ldloc.3 + IL_003a: ldloc.s V_4 + IL_003c: conv.i + IL_003d: ldloc.s V_5 + IL_003f: stelem.i8 + IL_0040: ldloc.s V_5 + IL_0042: ldc.i4.1 + IL_0043: conv.i8 + IL_0044: add + IL_0045: stloc.s V_5 + IL_0047: ldloc.s V_4 + IL_0049: ldc.i4.1 + IL_004a: conv.i8 + IL_004b: add + IL_004c: stloc.s V_4 + IL_004e: ldloc.s V_4 + IL_0050: ldloc.1 + IL_0051: blt.un.s IL_0039 - IL_00a0: nop - IL_00a1: ldloc.3 - IL_00a2: ret + IL_0053: ldloc.3 + IL_0054: ret } - .method public static uint64[] f14(uint64 step, - uint64 finish) cil managed + .method public static uint64[] f17(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 5 .locals init (uint64 V_0, uint64 V_1, - uint64[] V_2, - uint64 V_3, - uint64 V_4) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: brtrue.s IL_0011 + uint64 V_2, + uint64[] V_3, + uint64 V_4, + uint64 V_5) + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldc.i4.1 + IL_000a: conv.i8 + IL_000b: bge.un.s IL_0012 - IL_0004: ldc.i4.1 - IL_0005: conv.i8 - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_000d: pop - IL_000e: nop - IL_000f: br.s IL_0012 + IL_000d: ldc.i4.0 + IL_000e: conv.i8 + IL_000f: nop + IL_0010: br.s IL_001a - IL_0011: nop - IL_0012: ldarg.1 + IL_0012: ldloc.0 IL_0013: ldc.i4.1 IL_0014: conv.i8 - IL_0015: bge.un.s IL_001c - - IL_0017: ldc.i4.0 - IL_0018: conv.i8 + IL_0015: sub + IL_0016: ldc.i4.1 + IL_0017: conv.i8 + IL_0018: add.ovf.un IL_0019: nop - IL_001a: br.s IL_0026 - - IL_001c: ldarg.1 - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: sub - IL_0020: ldarg.0 - IL_0021: div.un - IL_0022: ldc.i4.1 - IL_0023: conv.i8 - IL_0024: add.ovf.un - IL_0025: nop - IL_0026: stloc.0 - IL_0027: ldloc.0 - IL_0028: stloc.1 - IL_0029: ldloc.1 - IL_002a: brtrue.s IL_0032 + IL_001a: stloc.1 + IL_001b: ldloc.1 + IL_001c: stloc.2 + IL_001d: ldloc.2 + IL_001e: brtrue.s IL_0026 - IL_002c: call !!0[] [runtime]System.Array::Empty() - IL_0031: ret + IL_0020: call !!0[] [runtime]System.Array::Empty() + IL_0025: ret - IL_0032: ldloc.1 - IL_0033: conv.ovf.i.un - IL_0034: newarr [runtime]System.UInt64 - IL_0039: stloc.2 - IL_003a: ldc.i4.0 - IL_003b: conv.i8 - IL_003c: stloc.3 - IL_003d: ldc.i4.1 - IL_003e: conv.i8 - IL_003f: stloc.s V_4 - IL_0041: br.s IL_0054 + IL_0026: ldloc.2 + IL_0027: conv.ovf.i.un + IL_0028: newarr [runtime]System.UInt64 + IL_002d: stloc.3 + IL_002e: ldc.i4.0 + IL_002f: conv.i8 + IL_0030: stloc.s V_4 + IL_0032: ldc.i4.1 + IL_0033: conv.i8 + IL_0034: stloc.s V_5 + IL_0036: br.s IL_004d - IL_0043: ldloc.2 - IL_0044: ldloc.3 - IL_0045: conv.i + IL_0038: ldloc.3 + IL_0039: ldloc.s V_4 + IL_003b: conv.i + IL_003c: ldloc.s V_5 + IL_003e: stelem.i8 + IL_003f: ldloc.s V_5 + IL_0041: ldc.i4.1 + IL_0042: conv.i8 + IL_0043: add + IL_0044: stloc.s V_5 IL_0046: ldloc.s V_4 - IL_0048: stelem.i8 - IL_0049: ldloc.s V_4 - IL_004b: ldarg.0 - IL_004c: add - IL_004d: stloc.s V_4 - IL_004f: ldloc.3 - IL_0050: ldc.i4.1 - IL_0051: conv.i8 - IL_0052: add - IL_0053: stloc.3 - IL_0054: ldloc.3 - IL_0055: ldloc.0 - IL_0056: blt.un.s IL_0043 + IL_0048: ldc.i4.1 + IL_0049: conv.i8 + IL_004a: add + IL_004b: stloc.s V_4 + IL_004d: ldloc.s V_4 + IL_004f: ldloc.1 + IL_0050: blt.un.s IL_0038 - IL_0058: ldloc.2 - IL_0059: ret + IL_0052: ldloc.3 + IL_0053: ret } - .method public static uint64[] f15(uint64 start, - uint64 step, - uint64 finish) cil managed + .method public static uint64[] f18(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 5 .locals init (uint64 V_0, - bool V_1, + uint64 V_1, uint64 V_2, - uint64[] V_3, - bool V_4, - uint64 V_5, - uint64 V_6, - uint64 V_7) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: brtrue.s IL_0010 - - IL_0004: ldarg.0 - IL_0005: ldarg.1 - IL_0006: ldarg.2 - IL_0007: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_000c: pop - IL_000d: nop - IL_000e: br.s IL_0011 - - IL_0010: nop - IL_0011: ldarg.2 - IL_0012: ldarg.0 - IL_0013: bge.un.s IL_001a - - IL_0015: ldc.i4.0 - IL_0016: conv.i8 - IL_0017: nop - IL_0018: br.s IL_0020 + bool V_3, + uint64 V_4, + uint64[] V_5, + bool V_6, + uint64 V_7, + uint64 V_8, + uint64 V_9) + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: stloc.0 + IL_0008: ldarg.1 + IL_0009: ldnull + IL_000a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_000f: stloc.1 + IL_0010: ldloc.1 + IL_0011: ldloc.0 + IL_0012: bge.un.s IL_0019 - IL_001a: ldarg.2 - IL_001b: ldarg.0 - IL_001c: sub - IL_001d: ldarg.1 - IL_001e: div.un - IL_001f: nop - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ldc.i4.m1 - IL_0023: conv.i8 - IL_0024: ceq - IL_0026: stloc.1 - IL_0027: ldarg.2 - IL_0028: ldarg.0 - IL_0029: bge.un.s IL_0030 + IL_0014: ldc.i4.0 + IL_0015: conv.i8 + IL_0016: nop + IL_0017: br.s IL_001d - IL_002b: ldc.i4.0 - IL_002c: conv.i8 - IL_002d: nop - IL_002e: br.s IL_0039 + IL_0019: ldloc.1 + IL_001a: ldloc.0 + IL_001b: sub + IL_001c: nop + IL_001d: stloc.2 + IL_001e: ldloc.2 + IL_001f: ldc.i4.m1 + IL_0020: conv.i8 + IL_0021: ceq + IL_0023: stloc.3 + IL_0024: ldloc.1 + IL_0025: ldloc.0 + IL_0026: bge.un.s IL_002d - IL_0030: ldarg.2 - IL_0031: ldarg.0 - IL_0032: sub - IL_0033: ldarg.1 - IL_0034: div.un - IL_0035: ldc.i4.1 - IL_0036: conv.i8 - IL_0037: add.ovf.un - IL_0038: nop - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: brtrue.s IL_0043 + IL_0028: ldc.i4.0 + IL_0029: conv.i8 + IL_002a: nop + IL_002b: br.s IL_0034 - IL_003d: call !!0[] [runtime]System.Array::Empty() - IL_0042: ret + IL_002d: ldloc.1 + IL_002e: ldloc.0 + IL_002f: sub + IL_0030: ldc.i4.1 + IL_0031: conv.i8 + IL_0032: add.ovf.un + IL_0033: nop + IL_0034: stloc.s V_4 + IL_0036: ldloc.s V_4 + IL_0038: brtrue.s IL_0040 - IL_0043: ldloc.2 - IL_0044: conv.ovf.i.un - IL_0045: newarr [runtime]System.UInt64 - IL_004a: stloc.3 - IL_004b: ldloc.1 - IL_004c: brfalse.s IL_007d + IL_003a: call !!0[] [runtime]System.Array::Empty() + IL_003f: ret - IL_004e: ldc.i4.1 - IL_004f: stloc.s V_4 - IL_0051: ldc.i4.0 - IL_0052: conv.i8 - IL_0053: stloc.s V_5 - IL_0055: ldarg.0 - IL_0056: stloc.s V_6 - IL_0058: br.s IL_0076 + IL_0040: ldloc.s V_4 + IL_0042: conv.ovf.i.un + IL_0043: newarr [runtime]System.UInt64 + IL_0048: stloc.s V_5 + IL_004a: ldloc.3 + IL_004b: brfalse.s IL_007e - IL_005a: ldloc.3 - IL_005b: ldloc.s V_5 + IL_004d: ldc.i4.1 + IL_004e: stloc.s V_6 + IL_0050: ldc.i4.0 + IL_0051: conv.i8 + IL_0052: stloc.s V_7 + IL_0054: ldloc.0 + IL_0055: stloc.s V_8 + IL_0057: br.s IL_0077 + + IL_0059: ldloc.s V_5 + IL_005b: ldloc.s V_7 IL_005d: conv.i - IL_005e: ldloc.s V_6 + IL_005e: ldloc.s V_8 IL_0060: stelem.i8 - IL_0061: ldloc.s V_6 - IL_0063: ldarg.1 - IL_0064: add - IL_0065: stloc.s V_6 - IL_0067: ldloc.s V_5 - IL_0069: ldc.i4.1 - IL_006a: conv.i8 - IL_006b: add - IL_006c: stloc.s V_5 - IL_006e: ldloc.s V_5 - IL_0070: ldc.i4.0 - IL_0071: conv.i8 - IL_0072: cgt.un - IL_0074: stloc.s V_4 - IL_0076: ldloc.s V_4 - IL_0078: brtrue.s IL_005a + IL_0061: ldloc.s V_8 + IL_0063: ldc.i4.1 + IL_0064: conv.i8 + IL_0065: add + IL_0066: stloc.s V_8 + IL_0068: ldloc.s V_7 + IL_006a: ldc.i4.1 + IL_006b: conv.i8 + IL_006c: add + IL_006d: stloc.s V_7 + IL_006f: ldloc.s V_7 + IL_0071: ldc.i4.0 + IL_0072: conv.i8 + IL_0073: cgt.un + IL_0075: stloc.s V_6 + IL_0077: ldloc.s V_6 + IL_0079: brtrue.s IL_0059 - IL_007a: nop - IL_007b: br.s IL_00b5 + IL_007b: nop + IL_007c: br.s IL_00b6 - IL_007d: ldarg.2 - IL_007e: ldarg.0 - IL_007f: bge.un.s IL_0086 + IL_007e: ldloc.1 + IL_007f: ldloc.0 + IL_0080: bge.un.s IL_0087 - IL_0081: ldc.i4.0 - IL_0082: conv.i8 - IL_0083: nop - IL_0084: br.s IL_008f + IL_0082: ldc.i4.0 + IL_0083: conv.i8 + IL_0084: nop + IL_0085: br.s IL_008e - IL_0086: ldarg.2 - IL_0087: ldarg.0 - IL_0088: sub - IL_0089: ldarg.1 - IL_008a: div.un - IL_008b: ldc.i4.1 - IL_008c: conv.i8 - IL_008d: add.ovf.un - IL_008e: nop - IL_008f: stloc.s V_5 - IL_0091: ldc.i4.0 - IL_0092: conv.i8 - IL_0093: stloc.s V_6 - IL_0095: ldarg.0 - IL_0096: stloc.s V_7 - IL_0098: br.s IL_00ae + IL_0087: ldloc.1 + IL_0088: ldloc.0 + IL_0089: sub + IL_008a: ldc.i4.1 + IL_008b: conv.i8 + IL_008c: add.ovf.un + IL_008d: nop + IL_008e: stloc.s V_7 + IL_0090: ldc.i4.0 + IL_0091: conv.i8 + IL_0092: stloc.s V_8 + IL_0094: ldloc.0 + IL_0095: stloc.s V_9 + IL_0097: br.s IL_00af - IL_009a: ldloc.3 - IL_009b: ldloc.s V_6 + IL_0099: ldloc.s V_5 + IL_009b: ldloc.s V_8 IL_009d: conv.i - IL_009e: ldloc.s V_7 + IL_009e: ldloc.s V_9 IL_00a0: stelem.i8 - IL_00a1: ldloc.s V_7 - IL_00a3: ldarg.1 - IL_00a4: add - IL_00a5: stloc.s V_7 - IL_00a7: ldloc.s V_6 - IL_00a9: ldc.i4.1 - IL_00aa: conv.i8 - IL_00ab: add - IL_00ac: stloc.s V_6 - IL_00ae: ldloc.s V_6 - IL_00b0: ldloc.s V_5 - IL_00b2: blt.un.s IL_009a + IL_00a1: ldloc.s V_9 + IL_00a3: ldc.i4.1 + IL_00a4: conv.i8 + IL_00a5: add + IL_00a6: stloc.s V_9 + IL_00a8: ldloc.s V_8 + IL_00aa: ldc.i4.1 + IL_00ab: conv.i8 + IL_00ac: add + IL_00ad: stloc.s V_8 + IL_00af: ldloc.s V_8 + IL_00b1: ldloc.s V_7 + IL_00b3: blt.un.s IL_0099 - IL_00b4: nop - IL_00b5: ldloc.3 - IL_00b6: ret + IL_00b5: nop + IL_00b6: ldloc.s V_5 + IL_00b8: ret } - .method public static uint64[] f16(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + .method public static uint64[] f19(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed { .maxstack 5 @@ -1273,7 +1115,110 @@ IL_0054: ret } - .method public static uint64[] f17(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + .method public static uint64[] f2() cil managed + { + + .maxstack 8 + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: ret + } + + .method public static uint64[] f20(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + { + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + uint64 V_2, + uint64[] V_3, + uint64 V_4, + uint64 V_5) + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: brtrue.s IL_001a + + IL_000b: ldc.i4.1 + IL_000c: conv.i8 + IL_000d: ldloc.0 + IL_000e: ldc.i4.s 10 + IL_0010: conv.i8 + IL_0011: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_0016: pop + IL_0017: nop + IL_0018: br.s IL_001b + + IL_001a: nop + IL_001b: ldc.i4.s 10 + IL_001d: conv.i8 + IL_001e: ldc.i4.1 + IL_001f: conv.i8 + IL_0020: bge.un.s IL_0027 + + IL_0022: ldc.i4.0 + IL_0023: conv.i8 + IL_0024: nop + IL_0025: br.s IL_0033 + + IL_0027: ldc.i4.s 10 + IL_0029: conv.i8 + IL_002a: ldc.i4.1 + IL_002b: conv.i8 + IL_002c: sub + IL_002d: ldloc.0 + IL_002e: div.un + IL_002f: ldc.i4.1 + IL_0030: conv.i8 + IL_0031: add.ovf.un + IL_0032: nop + IL_0033: stloc.1 + IL_0034: ldloc.1 + IL_0035: stloc.2 + IL_0036: ldloc.2 + IL_0037: brtrue.s IL_003f + + IL_0039: call !!0[] [runtime]System.Array::Empty() + IL_003e: ret + + IL_003f: ldloc.2 + IL_0040: conv.ovf.i.un + IL_0041: newarr [runtime]System.UInt64 + IL_0046: stloc.3 + IL_0047: ldc.i4.0 + IL_0048: conv.i8 + IL_0049: stloc.s V_4 + IL_004b: ldc.i4.1 + IL_004c: conv.i8 + IL_004d: stloc.s V_5 + IL_004f: br.s IL_0065 + + IL_0051: ldloc.3 + IL_0052: ldloc.s V_4 + IL_0054: conv.i + IL_0055: ldloc.s V_5 + IL_0057: stelem.i8 + IL_0058: ldloc.s V_5 + IL_005a: ldloc.0 + IL_005b: add + IL_005c: stloc.s V_5 + IL_005e: ldloc.s V_4 + IL_0060: ldc.i4.1 + IL_0061: conv.i8 + IL_0062: add + IL_0063: stloc.s V_4 + IL_0065: ldloc.s V_4 + IL_0067: ldloc.1 + IL_0068: blt.un.s IL_0051 + + IL_006a: ldloc.3 + IL_006b: ret + } + + .method public static uint64[] f21(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed { .maxstack 5 @@ -1349,22 +1294,25 @@ IL_0053: ret } - .method public static uint64[] f18(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed + .method public static uint64[] f22(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 h) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) .maxstack 5 .locals init (uint64 V_0, uint64 V_1, uint64 V_2, - bool V_3, - uint64 V_4, - uint64[] V_5, - bool V_6, - uint64 V_7, + uint64 V_3, + bool V_4, + uint64 V_5, + uint64[] V_6, + bool V_7, uint64 V_8, - uint64 V_9) + uint64 V_9, + uint64 V_10) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -1373,563 +1321,615 @@ IL_0009: ldnull IL_000a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_000f: stloc.1 - IL_0010: ldloc.1 - IL_0011: ldloc.0 - IL_0012: bge.un.s IL_0019 - - IL_0014: ldc.i4.0 - IL_0015: conv.i8 - IL_0016: nop - IL_0017: br.s IL_001d + IL_0010: ldarg.2 + IL_0011: ldnull + IL_0012: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: brtrue.s IL_0027 - IL_0019: ldloc.1 - IL_001a: ldloc.0 - IL_001b: sub - IL_001c: nop - IL_001d: stloc.2 - IL_001e: ldloc.2 - IL_001f: ldc.i4.m1 - IL_0020: conv.i8 - IL_0021: ceq - IL_0023: stloc.3 - IL_0024: ldloc.1 - IL_0025: ldloc.0 - IL_0026: bge.un.s IL_002d + IL_001b: ldloc.0 + IL_001c: ldloc.1 + IL_001d: ldloc.2 + IL_001e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_0023: pop + IL_0024: nop + IL_0025: br.s IL_0028 - IL_0028: ldc.i4.0 - IL_0029: conv.i8 - IL_002a: nop - IL_002b: br.s IL_0034 + IL_0027: nop + IL_0028: ldloc.2 + IL_0029: ldloc.0 + IL_002a: bge.un.s IL_0031 - IL_002d: ldloc.1 - IL_002e: ldloc.0 - IL_002f: sub - IL_0030: ldc.i4.1 - IL_0031: conv.i8 - IL_0032: add.ovf.un - IL_0033: nop - IL_0034: stloc.s V_4 - IL_0036: ldloc.s V_4 - IL_0038: brtrue.s IL_0040 + IL_002c: ldc.i4.0 + IL_002d: conv.i8 + IL_002e: nop + IL_002f: br.s IL_0037 - IL_003a: call !!0[] [runtime]System.Array::Empty() - IL_003f: ret + IL_0031: ldloc.2 + IL_0032: ldloc.0 + IL_0033: sub + IL_0034: ldloc.1 + IL_0035: div.un + IL_0036: nop + IL_0037: stloc.3 + IL_0038: ldloc.3 + IL_0039: ldc.i4.m1 + IL_003a: conv.i8 + IL_003b: ceq + IL_003d: stloc.s V_4 + IL_003f: ldloc.2 + IL_0040: ldloc.0 + IL_0041: bge.un.s IL_0048 - IL_0040: ldloc.s V_4 - IL_0042: conv.ovf.i.un - IL_0043: newarr [runtime]System.UInt64 - IL_0048: stloc.s V_5 - IL_004a: ldloc.3 - IL_004b: brfalse.s IL_007e + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: nop + IL_0046: br.s IL_0051 + IL_0048: ldloc.2 + IL_0049: ldloc.0 + IL_004a: sub + IL_004b: ldloc.1 + IL_004c: div.un IL_004d: ldc.i4.1 - IL_004e: stloc.s V_6 - IL_0050: ldc.i4.0 - IL_0051: conv.i8 - IL_0052: stloc.s V_7 - IL_0054: ldloc.0 - IL_0055: stloc.s V_8 - IL_0057: br.s IL_0077 + IL_004e: conv.i8 + IL_004f: add.ovf.un + IL_0050: nop + IL_0051: stloc.s V_5 + IL_0053: ldloc.s V_5 + IL_0055: brtrue.s IL_005d - IL_0059: ldloc.s V_5 - IL_005b: ldloc.s V_7 - IL_005d: conv.i - IL_005e: ldloc.s V_8 - IL_0060: stelem.i8 - IL_0061: ldloc.s V_8 - IL_0063: ldc.i4.1 - IL_0064: conv.i8 - IL_0065: add - IL_0066: stloc.s V_8 - IL_0068: ldloc.s V_7 - IL_006a: ldc.i4.1 - IL_006b: conv.i8 - IL_006c: add - IL_006d: stloc.s V_7 - IL_006f: ldloc.s V_7 - IL_0071: ldc.i4.0 - IL_0072: conv.i8 - IL_0073: cgt.un - IL_0075: stloc.s V_6 - IL_0077: ldloc.s V_6 - IL_0079: brtrue.s IL_0059 + IL_0057: call !!0[] [runtime]System.Array::Empty() + IL_005c: ret - IL_007b: nop - IL_007c: br.s IL_00b6 + IL_005d: ldloc.s V_5 + IL_005f: conv.ovf.i.un + IL_0060: newarr [runtime]System.UInt64 + IL_0065: stloc.s V_6 + IL_0067: ldloc.s V_4 + IL_0069: brfalse.s IL_009b - IL_007e: ldloc.1 - IL_007f: ldloc.0 - IL_0080: bge.un.s IL_0087 + IL_006b: ldc.i4.1 + IL_006c: stloc.s V_7 + IL_006e: ldc.i4.0 + IL_006f: conv.i8 + IL_0070: stloc.s V_8 + IL_0072: ldloc.0 + IL_0073: stloc.s V_9 + IL_0075: br.s IL_0094 - IL_0082: ldc.i4.0 - IL_0083: conv.i8 - IL_0084: nop - IL_0085: br.s IL_008e + IL_0077: ldloc.s V_6 + IL_0079: ldloc.s V_8 + IL_007b: conv.i + IL_007c: ldloc.s V_9 + IL_007e: stelem.i8 + IL_007f: ldloc.s V_9 + IL_0081: ldloc.1 + IL_0082: add + IL_0083: stloc.s V_9 + IL_0085: ldloc.s V_8 + IL_0087: ldc.i4.1 + IL_0088: conv.i8 + IL_0089: add + IL_008a: stloc.s V_8 + IL_008c: ldloc.s V_8 + IL_008e: ldc.i4.0 + IL_008f: conv.i8 + IL_0090: cgt.un + IL_0092: stloc.s V_7 + IL_0094: ldloc.s V_7 + IL_0096: brtrue.s IL_0077 - IL_0087: ldloc.1 - IL_0088: ldloc.0 - IL_0089: sub - IL_008a: ldc.i4.1 - IL_008b: conv.i8 - IL_008c: add.ovf.un - IL_008d: nop - IL_008e: stloc.s V_7 - IL_0090: ldc.i4.0 - IL_0091: conv.i8 - IL_0092: stloc.s V_8 - IL_0094: ldloc.0 - IL_0095: stloc.s V_9 - IL_0097: br.s IL_00af + IL_0098: nop + IL_0099: br.s IL_00d4 - IL_0099: ldloc.s V_5 - IL_009b: ldloc.s V_8 - IL_009d: conv.i - IL_009e: ldloc.s V_9 - IL_00a0: stelem.i8 - IL_00a1: ldloc.s V_9 - IL_00a3: ldc.i4.1 - IL_00a4: conv.i8 - IL_00a5: add - IL_00a6: stloc.s V_9 - IL_00a8: ldloc.s V_8 - IL_00aa: ldc.i4.1 - IL_00ab: conv.i8 - IL_00ac: add + IL_009b: ldloc.2 + IL_009c: ldloc.0 + IL_009d: bge.un.s IL_00a4 + + IL_009f: ldc.i4.0 + IL_00a0: conv.i8 + IL_00a1: nop + IL_00a2: br.s IL_00ad + + IL_00a4: ldloc.2 + IL_00a5: ldloc.0 + IL_00a6: sub + IL_00a7: ldloc.1 + IL_00a8: div.un + IL_00a9: ldc.i4.1 + IL_00aa: conv.i8 + IL_00ab: add.ovf.un + IL_00ac: nop IL_00ad: stloc.s V_8 - IL_00af: ldloc.s V_8 - IL_00b1: ldloc.s V_7 - IL_00b3: blt.un.s IL_0099 + IL_00af: ldc.i4.0 + IL_00b0: conv.i8 + IL_00b1: stloc.s V_9 + IL_00b3: ldloc.0 + IL_00b4: stloc.s V_10 + IL_00b6: br.s IL_00cd + + IL_00b8: ldloc.s V_6 + IL_00ba: ldloc.s V_9 + IL_00bc: conv.i + IL_00bd: ldloc.s V_10 + IL_00bf: stelem.i8 + IL_00c0: ldloc.s V_10 + IL_00c2: ldloc.1 + IL_00c3: add + IL_00c4: stloc.s V_10 + IL_00c6: ldloc.s V_9 + IL_00c8: ldc.i4.1 + IL_00c9: conv.i8 + IL_00ca: add + IL_00cb: stloc.s V_9 + IL_00cd: ldloc.s V_9 + IL_00cf: ldloc.s V_8 + IL_00d1: blt.un.s IL_00b8 - IL_00b5: nop - IL_00b6: ldloc.s V_5 - IL_00b8: ret + IL_00d3: nop + IL_00d4: ldloc.s V_6 + IL_00d6: ret } - .method public static uint64[] f19(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + .method public static uint64[] f3() cil managed { .maxstack 5 - .locals init (uint64 V_0, + .locals init (uint64[] V_0, uint64 V_1, - uint64 V_2, - uint64[] V_3, - uint64 V_4, - uint64 V_5) - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0007: stloc.0 - IL_0008: ldc.i4.s 10 - IL_000a: conv.i8 - IL_000b: ldloc.0 - IL_000c: bge.un.s IL_0013 - - IL_000e: ldc.i4.0 - IL_000f: conv.i8 - IL_0010: nop - IL_0011: br.s IL_001c + uint64 V_2) + IL_0000: ldc.i4.s 10 + IL_0002: conv.i8 + IL_0003: conv.ovf.i.un + IL_0004: newarr [runtime]System.UInt64 + IL_0009: stloc.0 + IL_000a: ldc.i4.0 + IL_000b: conv.i8 + IL_000c: stloc.1 + IL_000d: ldc.i4.1 + IL_000e: conv.i8 + IL_000f: stloc.2 + IL_0010: br.s IL_0021 - IL_0013: ldc.i4.s 10 - IL_0015: conv.i8 - IL_0016: ldloc.0 - IL_0017: sub + IL_0012: ldloc.0 + IL_0013: ldloc.1 + IL_0014: conv.i + IL_0015: ldloc.2 + IL_0016: stelem.i8 + IL_0017: ldloc.2 IL_0018: ldc.i4.1 IL_0019: conv.i8 - IL_001a: add.ovf.un - IL_001b: nop - IL_001c: stloc.1 - IL_001d: ldloc.1 - IL_001e: stloc.2 - IL_001f: ldloc.2 - IL_0020: brtrue.s IL_0028 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: conv.i8 + IL_001f: add + IL_0020: stloc.1 + IL_0021: ldloc.1 + IL_0022: ldc.i4.s 10 + IL_0024: conv.i8 + IL_0025: blt.un.s IL_0012 - IL_0022: call !!0[] [runtime]System.Array::Empty() - IL_0027: ret + IL_0027: ldloc.0 + IL_0028: ret + } - IL_0028: ldloc.2 - IL_0029: conv.ovf.i.un - IL_002a: newarr [runtime]System.UInt64 - IL_002f: stloc.3 - IL_0030: ldc.i4.0 - IL_0031: conv.i8 - IL_0032: stloc.s V_4 - IL_0034: ldloc.0 - IL_0035: stloc.s V_5 - IL_0037: br.s IL_004e + .method public static uint64[] f4() cil managed + { + + .maxstack 5 + .locals init (uint64[] V_0, + uint64 V_1, + uint64 V_2) + IL_0000: ldc.i4.5 + IL_0001: conv.i8 + IL_0002: conv.ovf.i.un + IL_0003: newarr [runtime]System.UInt64 + IL_0008: stloc.0 + IL_0009: ldc.i4.0 + IL_000a: conv.i8 + IL_000b: stloc.1 + IL_000c: ldc.i4.1 + IL_000d: conv.i8 + IL_000e: stloc.2 + IL_000f: br.s IL_0020 - IL_0039: ldloc.3 - IL_003a: ldloc.s V_4 - IL_003c: conv.i - IL_003d: ldloc.s V_5 - IL_003f: stelem.i8 - IL_0040: ldloc.s V_5 - IL_0042: ldc.i4.1 - IL_0043: conv.i8 - IL_0044: add - IL_0045: stloc.s V_5 - IL_0047: ldloc.s V_4 - IL_0049: ldc.i4.1 - IL_004a: conv.i8 - IL_004b: add - IL_004c: stloc.s V_4 - IL_004e: ldloc.s V_4 - IL_0050: ldloc.1 - IL_0051: blt.un.s IL_0039 + IL_0011: ldloc.0 + IL_0012: ldloc.1 + IL_0013: conv.i + IL_0014: ldloc.2 + IL_0015: stelem.i8 + IL_0016: ldloc.2 + IL_0017: ldc.i4.2 + IL_0018: conv.i8 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: conv.i8 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldc.i4.5 + IL_0022: conv.i8 + IL_0023: blt.un.s IL_0011 - IL_0053: ldloc.3 - IL_0054: ret + IL_0025: ldloc.0 + IL_0026: ret } - .method public static uint64[] f20(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + .method public static uint64[] f5() cil managed + { + + .maxstack 8 + IL_0000: call !!0[] [runtime]System.Array::Empty() + IL_0005: ret + } + + .method public static uint64[] f6(uint64 start) cil managed { .maxstack 5 .locals init (uint64 V_0, uint64 V_1, - uint64 V_2, - uint64[] V_3, - uint64 V_4, - uint64 V_5) - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: brtrue.s IL_001a - - IL_000b: ldc.i4.1 - IL_000c: conv.i8 - IL_000d: ldloc.0 - IL_000e: ldc.i4.s 10 - IL_0010: conv.i8 - IL_0011: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_0016: pop - IL_0017: nop - IL_0018: br.s IL_001b - - IL_001a: nop - IL_001b: ldc.i4.s 10 - IL_001d: conv.i8 - IL_001e: ldc.i4.1 - IL_001f: conv.i8 - IL_0020: bge.un.s IL_0027 + uint64[] V_2, + uint64 V_3, + uint64 V_4) + IL_0000: nop + IL_0001: ldc.i4.s 10 + IL_0003: conv.i8 + IL_0004: ldarg.0 + IL_0005: bge.un.s IL_000c - IL_0022: ldc.i4.0 - IL_0023: conv.i8 - IL_0024: nop - IL_0025: br.s IL_0033 + IL_0007: ldc.i4.0 + IL_0008: conv.i8 + IL_0009: nop + IL_000a: br.s IL_0015 - IL_0027: ldc.i4.s 10 - IL_0029: conv.i8 - IL_002a: ldc.i4.1 - IL_002b: conv.i8 - IL_002c: sub - IL_002d: ldloc.0 - IL_002e: div.un - IL_002f: ldc.i4.1 - IL_0030: conv.i8 - IL_0031: add.ovf.un - IL_0032: nop - IL_0033: stloc.1 - IL_0034: ldloc.1 - IL_0035: stloc.2 - IL_0036: ldloc.2 - IL_0037: brtrue.s IL_003f + IL_000c: ldc.i4.s 10 + IL_000e: conv.i8 + IL_000f: ldarg.0 + IL_0010: sub + IL_0011: ldc.i4.1 + IL_0012: conv.i8 + IL_0013: add.ovf.un + IL_0014: nop + IL_0015: stloc.0 + IL_0016: ldloc.0 + IL_0017: stloc.1 + IL_0018: ldloc.1 + IL_0019: brtrue.s IL_0021 - IL_0039: call !!0[] [runtime]System.Array::Empty() - IL_003e: ret + IL_001b: call !!0[] [runtime]System.Array::Empty() + IL_0020: ret - IL_003f: ldloc.2 - IL_0040: conv.ovf.i.un - IL_0041: newarr [runtime]System.UInt64 - IL_0046: stloc.3 - IL_0047: ldc.i4.0 - IL_0048: conv.i8 - IL_0049: stloc.s V_4 - IL_004b: ldc.i4.1 - IL_004c: conv.i8 - IL_004d: stloc.s V_5 - IL_004f: br.s IL_0065 + IL_0021: ldloc.1 + IL_0022: conv.ovf.i.un + IL_0023: newarr [runtime]System.UInt64 + IL_0028: stloc.2 + IL_0029: ldc.i4.0 + IL_002a: conv.i8 + IL_002b: stloc.3 + IL_002c: ldarg.0 + IL_002d: stloc.s V_4 + IL_002f: br.s IL_0043 - IL_0051: ldloc.3 - IL_0052: ldloc.s V_4 - IL_0054: conv.i - IL_0055: ldloc.s V_5 - IL_0057: stelem.i8 - IL_0058: ldloc.s V_5 - IL_005a: ldloc.0 - IL_005b: add - IL_005c: stloc.s V_5 - IL_005e: ldloc.s V_4 - IL_0060: ldc.i4.1 - IL_0061: conv.i8 - IL_0062: add - IL_0063: stloc.s V_4 - IL_0065: ldloc.s V_4 - IL_0067: ldloc.1 - IL_0068: blt.un.s IL_0051 + IL_0031: ldloc.2 + IL_0032: ldloc.3 + IL_0033: conv.i + IL_0034: ldloc.s V_4 + IL_0036: stelem.i8 + IL_0037: ldloc.s V_4 + IL_0039: ldc.i4.1 + IL_003a: conv.i8 + IL_003b: add + IL_003c: stloc.s V_4 + IL_003e: ldloc.3 + IL_003f: ldc.i4.1 + IL_0040: conv.i8 + IL_0041: add + IL_0042: stloc.3 + IL_0043: ldloc.3 + IL_0044: ldloc.0 + IL_0045: blt.un.s IL_0031 - IL_006a: ldloc.3 - IL_006b: ret + IL_0047: ldloc.2 + IL_0048: ret } - .method public static uint64[] f21(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + .method public static uint64[] f7(uint64 finish) cil managed { .maxstack 5 .locals init (uint64 V_0, uint64 V_1, - uint64 V_2, - uint64[] V_3, - uint64 V_4, - uint64 V_5) - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldc.i4.1 - IL_000a: conv.i8 - IL_000b: bge.un.s IL_0012 + uint64[] V_2, + uint64 V_3, + uint64 V_4) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldc.i4.1 + IL_0003: conv.i8 + IL_0004: bge.un.s IL_000b - IL_000d: ldc.i4.0 - IL_000e: conv.i8 - IL_000f: nop - IL_0010: br.s IL_001a + IL_0006: ldc.i4.0 + IL_0007: conv.i8 + IL_0008: nop + IL_0009: br.s IL_0013 - IL_0012: ldloc.0 - IL_0013: ldc.i4.1 - IL_0014: conv.i8 - IL_0015: sub - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: add.ovf.un - IL_0019: nop - IL_001a: stloc.1 - IL_001b: ldloc.1 - IL_001c: stloc.2 - IL_001d: ldloc.2 - IL_001e: brtrue.s IL_0026 + IL_000b: ldarg.0 + IL_000c: ldc.i4.1 + IL_000d: conv.i8 + IL_000e: sub + IL_000f: ldc.i4.1 + IL_0010: conv.i8 + IL_0011: add.ovf.un + IL_0012: nop + IL_0013: stloc.0 + IL_0014: ldloc.0 + IL_0015: stloc.1 + IL_0016: ldloc.1 + IL_0017: brtrue.s IL_001f - IL_0020: call !!0[] [runtime]System.Array::Empty() - IL_0025: ret + IL_0019: call !!0[] [runtime]System.Array::Empty() + IL_001e: ret - IL_0026: ldloc.2 - IL_0027: conv.ovf.i.un - IL_0028: newarr [runtime]System.UInt64 - IL_002d: stloc.3 - IL_002e: ldc.i4.0 - IL_002f: conv.i8 - IL_0030: stloc.s V_4 - IL_0032: ldc.i4.1 - IL_0033: conv.i8 - IL_0034: stloc.s V_5 - IL_0036: br.s IL_004d + IL_001f: ldloc.1 + IL_0020: conv.ovf.i.un + IL_0021: newarr [runtime]System.UInt64 + IL_0026: stloc.2 + IL_0027: ldc.i4.0 + IL_0028: conv.i8 + IL_0029: stloc.3 + IL_002a: ldc.i4.1 + IL_002b: conv.i8 + IL_002c: stloc.s V_4 + IL_002e: br.s IL_0042 - IL_0038: ldloc.3 - IL_0039: ldloc.s V_4 - IL_003b: conv.i - IL_003c: ldloc.s V_5 - IL_003e: stelem.i8 - IL_003f: ldloc.s V_5 - IL_0041: ldc.i4.1 - IL_0042: conv.i8 - IL_0043: add - IL_0044: stloc.s V_5 - IL_0046: ldloc.s V_4 - IL_0048: ldc.i4.1 - IL_0049: conv.i8 - IL_004a: add - IL_004b: stloc.s V_4 - IL_004d: ldloc.s V_4 - IL_004f: ldloc.1 - IL_0050: blt.un.s IL_0038 + IL_0030: ldloc.2 + IL_0031: ldloc.3 + IL_0032: conv.i + IL_0033: ldloc.s V_4 + IL_0035: stelem.i8 + IL_0036: ldloc.s V_4 + IL_0038: ldc.i4.1 + IL_0039: conv.i8 + IL_003a: add + IL_003b: stloc.s V_4 + IL_003d: ldloc.3 + IL_003e: ldc.i4.1 + IL_003f: conv.i8 + IL_0040: add + IL_0041: stloc.3 + IL_0042: ldloc.3 + IL_0043: ldloc.0 + IL_0044: blt.un.s IL_0030 - IL_0052: ldloc.3 - IL_0053: ret + IL_0046: ldloc.2 + IL_0047: ret } - .method public static uint64[] f22(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 h) cil managed + .method public static uint64[] f8(uint64 start, + uint64 finish) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 5 .locals init (uint64 V_0, - uint64 V_1, + bool V_1, uint64 V_2, - uint64 V_3, + uint64[] V_3, bool V_4, uint64 V_5, - uint64[] V_6, - bool V_7, - uint64 V_8, - uint64 V_9, - uint64 V_10) - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0007: stloc.0 - IL_0008: ldarg.1 - IL_0009: ldnull - IL_000a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_000f: stloc.1 - IL_0010: ldarg.2 - IL_0011: ldnull - IL_0012: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0017: stloc.2 - IL_0018: ldloc.1 - IL_0019: brtrue.s IL_0027 + uint64 V_6, + uint64 V_7) + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: ldarg.0 + IL_0003: bge.un.s IL_000a - IL_001b: ldloc.0 - IL_001c: ldloc.1 - IL_001d: ldloc.2 - IL_001e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_0023: pop - IL_0024: nop - IL_0025: br.s IL_0028 + IL_0005: ldc.i4.0 + IL_0006: conv.i8 + IL_0007: nop + IL_0008: br.s IL_000e - IL_0027: nop - IL_0028: ldloc.2 - IL_0029: ldloc.0 - IL_002a: bge.un.s IL_0031 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: sub + IL_000d: nop + IL_000e: stloc.0 + IL_000f: ldloc.0 + IL_0010: ldc.i4.m1 + IL_0011: conv.i8 + IL_0012: ceq + IL_0014: stloc.1 + IL_0015: ldarg.1 + IL_0016: ldarg.0 + IL_0017: bge.un.s IL_001e - IL_002c: ldc.i4.0 - IL_002d: conv.i8 - IL_002e: nop - IL_002f: br.s IL_0037 + IL_0019: ldc.i4.0 + IL_001a: conv.i8 + IL_001b: nop + IL_001c: br.s IL_0025 + + IL_001e: ldarg.1 + IL_001f: ldarg.0 + IL_0020: sub + IL_0021: ldc.i4.1 + IL_0022: conv.i8 + IL_0023: add.ovf.un + IL_0024: nop + IL_0025: stloc.2 + IL_0026: ldloc.2 + IL_0027: brtrue.s IL_002f + + IL_0029: call !!0[] [runtime]System.Array::Empty() + IL_002e: ret - IL_0031: ldloc.2 - IL_0032: ldloc.0 - IL_0033: sub - IL_0034: ldloc.1 - IL_0035: div.un - IL_0036: nop - IL_0037: stloc.3 - IL_0038: ldloc.3 - IL_0039: ldc.i4.m1 - IL_003a: conv.i8 - IL_003b: ceq - IL_003d: stloc.s V_4 - IL_003f: ldloc.2 - IL_0040: ldloc.0 - IL_0041: bge.un.s IL_0048 + IL_002f: ldloc.2 + IL_0030: conv.ovf.i.un + IL_0031: newarr [runtime]System.UInt64 + IL_0036: stloc.3 + IL_0037: ldloc.1 + IL_0038: brfalse.s IL_006a - IL_0043: ldc.i4.0 - IL_0044: conv.i8 - IL_0045: nop - IL_0046: br.s IL_0051 + IL_003a: ldc.i4.1 + IL_003b: stloc.s V_4 + IL_003d: ldc.i4.0 + IL_003e: conv.i8 + IL_003f: stloc.s V_5 + IL_0041: ldarg.0 + IL_0042: stloc.s V_6 + IL_0044: br.s IL_0063 - IL_0048: ldloc.2 - IL_0049: ldloc.0 - IL_004a: sub - IL_004b: ldloc.1 - IL_004c: div.un - IL_004d: ldc.i4.1 - IL_004e: conv.i8 - IL_004f: add.ovf.un - IL_0050: nop - IL_0051: stloc.s V_5 - IL_0053: ldloc.s V_5 - IL_0055: brtrue.s IL_005d + IL_0046: ldloc.3 + IL_0047: ldloc.s V_5 + IL_0049: conv.i + IL_004a: ldloc.s V_6 + IL_004c: stelem.i8 + IL_004d: ldloc.s V_6 + IL_004f: ldc.i4.1 + IL_0050: conv.i8 + IL_0051: add + IL_0052: stloc.s V_6 + IL_0054: ldloc.s V_5 + IL_0056: ldc.i4.1 + IL_0057: conv.i8 + IL_0058: add + IL_0059: stloc.s V_5 + IL_005b: ldloc.s V_5 + IL_005d: ldc.i4.0 + IL_005e: conv.i8 + IL_005f: cgt.un + IL_0061: stloc.s V_4 + IL_0063: ldloc.s V_4 + IL_0065: brtrue.s IL_0046 - IL_0057: call !!0[] [runtime]System.Array::Empty() - IL_005c: ret + IL_0067: nop + IL_0068: br.s IL_00a1 - IL_005d: ldloc.s V_5 - IL_005f: conv.ovf.i.un - IL_0060: newarr [runtime]System.UInt64 - IL_0065: stloc.s V_6 - IL_0067: ldloc.s V_4 - IL_0069: brfalse.s IL_009b + IL_006a: ldarg.1 + IL_006b: ldarg.0 + IL_006c: bge.un.s IL_0073 - IL_006b: ldc.i4.1 - IL_006c: stloc.s V_7 IL_006e: ldc.i4.0 IL_006f: conv.i8 - IL_0070: stloc.s V_8 - IL_0072: ldloc.0 - IL_0073: stloc.s V_9 - IL_0075: br.s IL_0094 + IL_0070: nop + IL_0071: br.s IL_007a - IL_0077: ldloc.s V_6 - IL_0079: ldloc.s V_8 - IL_007b: conv.i - IL_007c: ldloc.s V_9 - IL_007e: stelem.i8 - IL_007f: ldloc.s V_9 - IL_0081: ldloc.1 - IL_0082: add - IL_0083: stloc.s V_9 - IL_0085: ldloc.s V_8 - IL_0087: ldc.i4.1 - IL_0088: conv.i8 - IL_0089: add - IL_008a: stloc.s V_8 - IL_008c: ldloc.s V_8 - IL_008e: ldc.i4.0 + IL_0073: ldarg.1 + IL_0074: ldarg.0 + IL_0075: sub + IL_0076: ldc.i4.1 + IL_0077: conv.i8 + IL_0078: add.ovf.un + IL_0079: nop + IL_007a: stloc.s V_5 + IL_007c: ldc.i4.0 + IL_007d: conv.i8 + IL_007e: stloc.s V_6 + IL_0080: ldarg.0 + IL_0081: stloc.s V_7 + IL_0083: br.s IL_009a + + IL_0085: ldloc.3 + IL_0086: ldloc.s V_6 + IL_0088: conv.i + IL_0089: ldloc.s V_7 + IL_008b: stelem.i8 + IL_008c: ldloc.s V_7 + IL_008e: ldc.i4.1 IL_008f: conv.i8 - IL_0090: cgt.un - IL_0092: stloc.s V_7 - IL_0094: ldloc.s V_7 - IL_0096: brtrue.s IL_0077 + IL_0090: add + IL_0091: stloc.s V_7 + IL_0093: ldloc.s V_6 + IL_0095: ldc.i4.1 + IL_0096: conv.i8 + IL_0097: add + IL_0098: stloc.s V_6 + IL_009a: ldloc.s V_6 + IL_009c: ldloc.s V_5 + IL_009e: blt.un.s IL_0085 - IL_0098: nop - IL_0099: br.s IL_00d4 + IL_00a0: nop + IL_00a1: ldloc.3 + IL_00a2: ret + } - IL_009b: ldloc.2 - IL_009c: ldloc.0 - IL_009d: bge.un.s IL_00a4 + .method public static uint64[] f9(uint64 start) cil managed + { + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + uint64[] V_2, + uint64 V_3, + uint64 V_4) + IL_0000: nop + IL_0001: ldc.i4.s 10 + IL_0003: conv.i8 + IL_0004: ldarg.0 + IL_0005: bge.un.s IL_000c - IL_009f: ldc.i4.0 - IL_00a0: conv.i8 - IL_00a1: nop - IL_00a2: br.s IL_00ad + IL_0007: ldc.i4.0 + IL_0008: conv.i8 + IL_0009: nop + IL_000a: br.s IL_0015 - IL_00a4: ldloc.2 - IL_00a5: ldloc.0 - IL_00a6: sub - IL_00a7: ldloc.1 - IL_00a8: div.un - IL_00a9: ldc.i4.1 - IL_00aa: conv.i8 - IL_00ab: add.ovf.un - IL_00ac: nop - IL_00ad: stloc.s V_8 - IL_00af: ldc.i4.0 - IL_00b0: conv.i8 - IL_00b1: stloc.s V_9 - IL_00b3: ldloc.0 - IL_00b4: stloc.s V_10 - IL_00b6: br.s IL_00cd + IL_000c: ldc.i4.s 10 + IL_000e: conv.i8 + IL_000f: ldarg.0 + IL_0010: sub + IL_0011: ldc.i4.1 + IL_0012: conv.i8 + IL_0013: add.ovf.un + IL_0014: nop + IL_0015: stloc.0 + IL_0016: ldloc.0 + IL_0017: stloc.1 + IL_0018: ldloc.1 + IL_0019: brtrue.s IL_0021 - IL_00b8: ldloc.s V_6 - IL_00ba: ldloc.s V_9 - IL_00bc: conv.i - IL_00bd: ldloc.s V_10 - IL_00bf: stelem.i8 - IL_00c0: ldloc.s V_10 - IL_00c2: ldloc.1 - IL_00c3: add - IL_00c4: stloc.s V_10 - IL_00c6: ldloc.s V_9 - IL_00c8: ldc.i4.1 - IL_00c9: conv.i8 - IL_00ca: add - IL_00cb: stloc.s V_9 - IL_00cd: ldloc.s V_9 - IL_00cf: ldloc.s V_8 - IL_00d1: blt.un.s IL_00b8 + IL_001b: call !!0[] [runtime]System.Array::Empty() + IL_0020: ret - IL_00d3: nop - IL_00d4: ldloc.s V_6 - IL_00d6: ret + IL_0021: ldloc.1 + IL_0022: conv.ovf.i.un + IL_0023: newarr [runtime]System.UInt64 + IL_0028: stloc.2 + IL_0029: ldc.i4.0 + IL_002a: conv.i8 + IL_002b: stloc.3 + IL_002c: ldarg.0 + IL_002d: stloc.s V_4 + IL_002f: br.s IL_0043 + + IL_0031: ldloc.2 + IL_0032: ldloc.3 + IL_0033: conv.i + IL_0034: ldloc.s V_4 + IL_0036: stelem.i8 + IL_0037: ldloc.s V_4 + IL_0039: ldc.i4.1 + IL_003a: conv.i8 + IL_003b: add + IL_003c: stloc.s V_4 + IL_003e: ldloc.3 + IL_003f: ldc.i4.1 + IL_0040: conv.i8 + IL_0041: add + IL_0042: stloc.3 + IL_0043: ldloc.3 + IL_0044: ldloc.0 + IL_0045: blt.un.s IL_0031 + + IL_0047: ldloc.2 + IL_0048: ret } } @@ -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..429420e4664 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeLists.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeLists.fs.il.bsl @@ -72,159 +72,85 @@ IL_0028: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2() cil managed - { - - .maxstack 8 - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0005: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3() cil managed - { - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, - uint64 V_2) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.1 - IL_0004: conv.i8 - IL_0005: stloc.2 - IL_0006: br.s IL_001b - - IL_0008: ldloca.s V_0 - IL_000a: ldloc.2 - IL_000b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0010: nop - IL_0011: ldloc.2 - IL_0012: ldc.i4.1 - IL_0013: conv.i8 - IL_0014: add - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldc.i4.1 - IL_0018: conv.i8 - IL_0019: add - IL_001a: stloc.1 - IL_001b: ldloc.1 - IL_001c: ldc.i4.s 10 - IL_001e: conv.i8 - IL_001f: blt.un.s IL_0008 - - IL_0021: ldloca.s V_0 - IL_0023: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0028: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f4() cil managed - { - - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, - uint64 V_2) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.1 - IL_0004: conv.i8 - IL_0005: stloc.2 - IL_0006: br.s IL_001b - - IL_0008: ldloca.s V_0 - IL_000a: ldloc.2 - IL_000b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0010: nop - IL_0011: ldloc.2 - IL_0012: ldc.i4.2 - IL_0013: conv.i8 - IL_0014: add - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldc.i4.1 - IL_0018: conv.i8 - IL_0019: add - IL_001a: stloc.1 - IL_001b: ldloc.1 - IL_001c: ldc.i4.5 - IL_001d: conv.i8 - IL_001e: blt.un.s IL_0008 - - IL_0020: ldloca.s V_0 - IL_0022: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0027: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f5() cil managed - { - - .maxstack 8 - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0005: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f6(uint64 start) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f10(uint64 step) cil managed { - .maxstack 4 + .maxstack 5 .locals init (uint64 V_0, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, uint64 V_3) IL_0000: nop - IL_0001: ldc.i4.s 10 - IL_0003: conv.i8 - IL_0004: ldarg.0 - IL_0005: bge.un.s IL_000c + IL_0001: ldarg.0 + IL_0002: brtrue.s IL_0013 - IL_0007: ldc.i4.0 - IL_0008: conv.i8 - IL_0009: nop - IL_000a: br.s IL_0015 + IL_0004: ldc.i4.1 + IL_0005: conv.i8 + IL_0006: ldarg.0 + IL_0007: ldc.i4.s 10 + IL_0009: conv.i8 + IL_000a: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_000f: pop + IL_0010: nop + IL_0011: br.s IL_0014 - IL_000c: ldc.i4.s 10 - IL_000e: conv.i8 - IL_000f: ldarg.0 - IL_0010: sub - IL_0011: ldc.i4.1 - IL_0012: conv.i8 - IL_0013: add.ovf.un - IL_0014: nop - IL_0015: stloc.0 - IL_0016: ldc.i4.0 - IL_0017: conv.i8 - IL_0018: stloc.2 - IL_0019: ldarg.0 - IL_001a: stloc.3 - IL_001b: br.s IL_0030 + IL_0013: nop + IL_0014: ldc.i4.s 10 + IL_0016: conv.i8 + IL_0017: ldc.i4.1 + IL_0018: conv.i8 + IL_0019: bge.un.s IL_0020 - IL_001d: ldloca.s V_1 - IL_001f: ldloc.3 - IL_0020: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0025: nop - IL_0026: ldloc.3 - IL_0027: ldc.i4.1 - IL_0028: conv.i8 - IL_0029: add - IL_002a: stloc.3 - IL_002b: ldloc.2 - IL_002c: ldc.i4.1 - IL_002d: conv.i8 - IL_002e: add + IL_001b: ldc.i4.0 + IL_001c: conv.i8 + IL_001d: nop + IL_001e: br.s IL_002c + + IL_0020: ldc.i4.s 10 + IL_0022: conv.i8 + IL_0023: ldc.i4.1 + IL_0024: conv.i8 + IL_0025: sub + IL_0026: ldarg.0 + IL_0027: div.un + IL_0028: ldc.i4.1 + IL_0029: conv.i8 + IL_002a: add.ovf.un + IL_002b: nop + IL_002c: stloc.0 + IL_002d: ldc.i4.0 + IL_002e: conv.i8 IL_002f: stloc.2 - IL_0030: ldloc.2 - IL_0031: ldloc.0 - IL_0032: blt.un.s IL_001d + IL_0030: ldc.i4.1 + IL_0031: conv.i8 + IL_0032: stloc.3 + IL_0033: br.s IL_0047 - IL_0034: ldloca.s V_1 - IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003b: ret + IL_0035: ldloca.s V_1 + IL_0037: ldloc.3 + IL_0038: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003d: nop + IL_003e: ldloc.3 + IL_003f: ldarg.0 + IL_0040: add + IL_0041: stloc.3 + IL_0042: ldloc.2 + IL_0043: ldc.i4.1 + IL_0044: conv.i8 + IL_0045: add + IL_0046: stloc.2 + IL_0047: ldloc.2 + IL_0048: ldloc.0 + IL_0049: blt.un.s IL_0035 + + IL_004b: ldloca.s V_1 + IL_004d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0052: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f7(uint64 finish) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f11(uint64 finish) cil managed { .maxstack 4 @@ -283,46 +209,121 @@ IL_003a: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f8(uint64 start, uint64 finish) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f12(uint64 start, uint64 step) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 4 + .maxstack 5 .locals init (uint64 V_0, - bool V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - bool V_3, - uint64 V_4, - uint64 V_5, - uint64 V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, + uint64 V_2, + uint64 V_3) IL_0000: nop IL_0001: ldarg.1 - IL_0002: ldarg.0 - IL_0003: bge.un.s IL_000a + IL_0002: brtrue.s IL_0012 - IL_0005: ldc.i4.0 - IL_0006: conv.i8 - IL_0007: nop - IL_0008: br.s IL_000e + IL_0004: ldarg.0 + IL_0005: ldarg.1 + IL_0006: ldc.i4.s 10 + IL_0008: conv.i8 + IL_0009: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_000e: pop + IL_000f: nop + IL_0010: br.s IL_0013 - IL_000a: ldarg.1 - IL_000b: ldarg.0 - IL_000c: sub - IL_000d: nop - IL_000e: stloc.0 - IL_000f: ldloc.0 - IL_0010: ldc.i4.m1 - IL_0011: conv.i8 - IL_0012: ceq - IL_0014: stloc.1 - IL_0015: ldloc.1 - IL_0016: brfalse.s IL_0048 + IL_0012: nop + IL_0013: ldc.i4.s 10 + IL_0015: conv.i8 + IL_0016: ldarg.0 + IL_0017: bge.un.s IL_001e - IL_0018: ldc.i4.1 - IL_0019: stloc.3 - IL_001a: ldc.i4.0 - IL_001b: conv.i8 - IL_001c: stloc.s V_4 + IL_0019: ldc.i4.0 + IL_001a: conv.i8 + IL_001b: nop + IL_001c: br.s IL_0029 + + IL_001e: ldc.i4.s 10 + IL_0020: conv.i8 + IL_0021: ldarg.0 + IL_0022: sub + IL_0023: ldarg.1 + IL_0024: div.un + IL_0025: ldc.i4.1 + IL_0026: conv.i8 + IL_0027: add.ovf.un + IL_0028: nop + IL_0029: stloc.0 + IL_002a: ldc.i4.0 + IL_002b: conv.i8 + IL_002c: stloc.2 + IL_002d: ldarg.0 + IL_002e: stloc.3 + IL_002f: br.s IL_0043 + + IL_0031: ldloca.s V_1 + IL_0033: ldloc.3 + IL_0034: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0039: nop + IL_003a: ldloc.3 + IL_003b: ldarg.1 + IL_003c: add + IL_003d: stloc.3 + IL_003e: ldloc.2 + IL_003f: ldc.i4.1 + IL_0040: conv.i8 + IL_0041: add + IL_0042: stloc.2 + IL_0043: ldloc.2 + IL_0044: ldloc.0 + IL_0045: blt.un.s IL_0031 + + IL_0047: ldloca.s V_1 + IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004e: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f13(uint64 start, uint64 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 4 + .locals init (uint64 V_0, + bool V_1, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, + bool V_3, + uint64 V_4, + uint64 V_5, + uint64 V_6) + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: ldarg.0 + IL_0003: bge.un.s IL_000a + + IL_0005: ldc.i4.0 + IL_0006: conv.i8 + IL_0007: nop + IL_0008: br.s IL_000e + + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: sub + IL_000d: nop + IL_000e: stloc.0 + IL_000f: ldloc.0 + IL_0010: ldc.i4.m1 + IL_0011: conv.i8 + IL_0012: ceq + IL_0014: stloc.1 + IL_0015: ldloc.1 + IL_0016: brfalse.s IL_0048 + + IL_0018: ldc.i4.1 + IL_0019: stloc.3 + IL_001a: ldc.i4.0 + IL_001b: conv.i8 + IL_001c: stloc.s V_4 IL_001e: ldarg.0 IL_001f: stloc.s V_5 IL_0021: br.s IL_0042 @@ -400,523 +401,136 @@ IL_0089: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f9(uint64 start) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f14(uint64 step, uint64 finish) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 4 + .maxstack 5 .locals init (uint64 V_0, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, uint64 V_3) IL_0000: nop - IL_0001: ldc.i4.s 10 - IL_0003: conv.i8 - IL_0004: ldarg.0 - IL_0005: bge.un.s IL_000c + IL_0001: ldarg.0 + IL_0002: brtrue.s IL_0011 - IL_0007: ldc.i4.0 - IL_0008: conv.i8 - IL_0009: nop - IL_000a: br.s IL_0015 + IL_0004: ldc.i4.1 + IL_0005: conv.i8 + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_000d: pop + IL_000e: nop + IL_000f: br.s IL_0012 - IL_000c: ldc.i4.s 10 - IL_000e: conv.i8 - IL_000f: ldarg.0 - IL_0010: sub - IL_0011: ldc.i4.1 - IL_0012: conv.i8 - IL_0013: add.ovf.un - IL_0014: nop - IL_0015: stloc.0 - IL_0016: ldc.i4.0 - IL_0017: conv.i8 - IL_0018: stloc.2 - IL_0019: ldarg.0 - IL_001a: stloc.3 - IL_001b: br.s IL_0030 + IL_0011: nop + IL_0012: ldarg.1 + IL_0013: ldc.i4.1 + IL_0014: conv.i8 + IL_0015: bge.un.s IL_001c - IL_001d: ldloca.s V_1 - IL_001f: ldloc.3 - IL_0020: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0017: ldc.i4.0 + IL_0018: conv.i8 + IL_0019: nop + IL_001a: br.s IL_0026 + + IL_001c: ldarg.1 + IL_001d: ldc.i4.1 + IL_001e: conv.i8 + IL_001f: sub + IL_0020: ldarg.0 + IL_0021: div.un + IL_0022: ldc.i4.1 + IL_0023: conv.i8 + IL_0024: add.ovf.un IL_0025: nop - IL_0026: ldloc.3 - IL_0027: ldc.i4.1 + IL_0026: stloc.0 + IL_0027: ldc.i4.0 IL_0028: conv.i8 - IL_0029: add - IL_002a: stloc.3 - IL_002b: ldloc.2 - IL_002c: ldc.i4.1 - IL_002d: conv.i8 - IL_002e: add - IL_002f: stloc.2 - IL_0030: ldloc.2 - IL_0031: ldloc.0 - IL_0032: blt.un.s IL_001d + IL_0029: stloc.2 + IL_002a: ldc.i4.1 + IL_002b: conv.i8 + IL_002c: stloc.3 + IL_002d: br.s IL_0041 - IL_0034: ldloca.s V_1 - IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003b: ret + IL_002f: ldloca.s V_1 + IL_0031: ldloc.3 + IL_0032: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0037: nop + IL_0038: ldloc.3 + IL_0039: ldarg.0 + IL_003a: add + IL_003b: stloc.3 + IL_003c: ldloc.2 + IL_003d: ldc.i4.1 + IL_003e: conv.i8 + IL_003f: add + IL_0040: stloc.2 + IL_0041: ldloc.2 + IL_0042: ldloc.0 + IL_0043: blt.un.s IL_002f + + IL_0045: ldloca.s V_1 + IL_0047: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004c: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f10(uint64 step) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f15(uint64 start, + uint64 step, + uint64 finish) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) .maxstack 5 .locals init (uint64 V_0, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, - uint64 V_2, - uint64 V_3) + bool V_1, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, + bool V_3, + uint64 V_4, + uint64 V_5, + uint64 V_6) IL_0000: nop - IL_0001: ldarg.0 - IL_0002: brtrue.s IL_0013 + IL_0001: ldarg.1 + IL_0002: brtrue.s IL_0010 - IL_0004: ldc.i4.1 - IL_0005: conv.i8 - IL_0006: ldarg.0 - IL_0007: ldc.i4.s 10 - IL_0009: conv.i8 - IL_000a: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + IL_0004: ldarg.0 + IL_0005: ldarg.1 + IL_0006: ldarg.2 + IL_0007: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, uint64, uint64) - IL_000f: pop + IL_000c: pop + IL_000d: nop + IL_000e: br.s IL_0011 + IL_0010: nop - IL_0011: br.s IL_0014 + IL_0011: ldarg.2 + IL_0012: ldarg.0 + IL_0013: bge.un.s IL_001a - IL_0013: nop - IL_0014: ldc.i4.s 10 + IL_0015: ldc.i4.0 IL_0016: conv.i8 - IL_0017: ldc.i4.1 - IL_0018: conv.i8 - IL_0019: bge.un.s IL_0020 + IL_0017: nop + IL_0018: br.s IL_0020 - IL_001b: ldc.i4.0 - IL_001c: conv.i8 - IL_001d: nop - IL_001e: br.s IL_002c - - IL_0020: ldc.i4.s 10 - IL_0022: conv.i8 - IL_0023: ldc.i4.1 - IL_0024: conv.i8 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: div.un - IL_0028: ldc.i4.1 - IL_0029: conv.i8 - IL_002a: add.ovf.un - IL_002b: nop - IL_002c: stloc.0 - IL_002d: ldc.i4.0 - IL_002e: conv.i8 - IL_002f: stloc.2 - IL_0030: ldc.i4.1 - IL_0031: conv.i8 - IL_0032: stloc.3 - IL_0033: br.s IL_0047 - - IL_0035: ldloca.s V_1 - IL_0037: ldloc.3 - IL_0038: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_003d: nop - IL_003e: ldloc.3 - IL_003f: ldarg.0 - IL_0040: add - IL_0041: stloc.3 - IL_0042: ldloc.2 - IL_0043: ldc.i4.1 - IL_0044: conv.i8 - IL_0045: add - IL_0046: stloc.2 - IL_0047: ldloc.2 - IL_0048: ldloc.0 - IL_0049: blt.un.s IL_0035 - - IL_004b: ldloca.s V_1 - IL_004d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0052: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f11(uint64 finish) cil managed - { - - .maxstack 4 - .locals init (uint64 V_0, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, - uint64 V_2, - uint64 V_3) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: conv.i8 - IL_0004: bge.un.s IL_000b - - IL_0006: ldc.i4.0 - IL_0007: conv.i8 - IL_0008: nop - IL_0009: br.s IL_0013 - - IL_000b: ldarg.0 - IL_000c: ldc.i4.1 - IL_000d: conv.i8 - IL_000e: sub - IL_000f: ldc.i4.1 - IL_0010: conv.i8 - IL_0011: add.ovf.un - IL_0012: nop - IL_0013: stloc.0 - IL_0014: ldc.i4.0 - IL_0015: conv.i8 - IL_0016: stloc.2 - IL_0017: ldc.i4.1 - IL_0018: conv.i8 - IL_0019: stloc.3 - IL_001a: br.s IL_002f - - IL_001c: ldloca.s V_1 - IL_001e: ldloc.3 - IL_001f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0024: nop - IL_0025: ldloc.3 - IL_0026: ldc.i4.1 - IL_0027: conv.i8 - IL_0028: add - IL_0029: stloc.3 - IL_002a: ldloc.2 - IL_002b: ldc.i4.1 - IL_002c: conv.i8 - IL_002d: add - IL_002e: stloc.2 - IL_002f: ldloc.2 - IL_0030: ldloc.0 - IL_0031: blt.un.s IL_001c - - IL_0033: ldloca.s V_1 - IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003a: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f12(uint64 start, uint64 step) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 5 - .locals init (uint64 V_0, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, - uint64 V_2, - uint64 V_3) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: brtrue.s IL_0012 - - IL_0004: ldarg.0 - IL_0005: ldarg.1 - IL_0006: ldc.i4.s 10 - IL_0008: conv.i8 - IL_0009: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_000e: pop - IL_000f: nop - IL_0010: br.s IL_0013 - - IL_0012: nop - IL_0013: ldc.i4.s 10 - IL_0015: conv.i8 - IL_0016: ldarg.0 - IL_0017: bge.un.s IL_001e - - IL_0019: ldc.i4.0 - IL_001a: conv.i8 - IL_001b: nop - IL_001c: br.s IL_0029 - - IL_001e: ldc.i4.s 10 - IL_0020: conv.i8 - IL_0021: ldarg.0 - IL_0022: sub - IL_0023: ldarg.1 - IL_0024: div.un - IL_0025: ldc.i4.1 - IL_0026: conv.i8 - IL_0027: add.ovf.un - IL_0028: nop - IL_0029: stloc.0 - IL_002a: ldc.i4.0 - IL_002b: conv.i8 - IL_002c: stloc.2 - IL_002d: ldarg.0 - IL_002e: stloc.3 - IL_002f: br.s IL_0043 - - IL_0031: ldloca.s V_1 - IL_0033: ldloc.3 - IL_0034: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0039: nop - IL_003a: ldloc.3 - IL_003b: ldarg.1 - IL_003c: add - IL_003d: stloc.3 - IL_003e: ldloc.2 - IL_003f: ldc.i4.1 - IL_0040: conv.i8 - IL_0041: add - IL_0042: stloc.2 - IL_0043: ldloc.2 - IL_0044: ldloc.0 - IL_0045: blt.un.s IL_0031 - - IL_0047: ldloca.s V_1 - IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004e: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f13(uint64 start, uint64 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 4 - .locals init (uint64 V_0, - bool V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - bool V_3, - uint64 V_4, - uint64 V_5, - uint64 V_6) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: ldarg.0 - IL_0003: bge.un.s IL_000a - - IL_0005: ldc.i4.0 - IL_0006: conv.i8 - IL_0007: nop - IL_0008: br.s IL_000e - - IL_000a: ldarg.1 - IL_000b: ldarg.0 - IL_000c: sub - IL_000d: nop - IL_000e: stloc.0 - IL_000f: ldloc.0 - IL_0010: ldc.i4.m1 - IL_0011: conv.i8 - IL_0012: ceq - IL_0014: stloc.1 - IL_0015: ldloc.1 - IL_0016: brfalse.s IL_0048 - - IL_0018: ldc.i4.1 - IL_0019: stloc.3 - IL_001a: ldc.i4.0 - IL_001b: conv.i8 - IL_001c: stloc.s V_4 - IL_001e: ldarg.0 - IL_001f: stloc.s V_5 - IL_0021: br.s IL_0042 - - IL_0023: ldloca.s V_2 - IL_0025: ldloc.s V_5 - IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002c: nop - IL_002d: ldloc.s V_5 - IL_002f: ldc.i4.1 - IL_0030: conv.i8 - IL_0031: add - IL_0032: stloc.s V_5 - IL_0034: ldloc.s V_4 - IL_0036: ldc.i4.1 - IL_0037: conv.i8 - IL_0038: add - IL_0039: stloc.s V_4 - IL_003b: ldloc.s V_4 - IL_003d: ldc.i4.0 - IL_003e: conv.i8 - IL_003f: cgt.un - IL_0041: stloc.3 - IL_0042: ldloc.3 - IL_0043: brtrue.s IL_0023 - - IL_0045: nop - IL_0046: br.s IL_0082 - - IL_0048: ldarg.1 - IL_0049: ldarg.0 - IL_004a: bge.un.s IL_0051 - - IL_004c: ldc.i4.0 - IL_004d: conv.i8 - IL_004e: nop - IL_004f: br.s IL_0058 - - IL_0051: ldarg.1 - IL_0052: ldarg.0 - IL_0053: sub - IL_0054: ldc.i4.1 - IL_0055: conv.i8 - IL_0056: add.ovf.un - IL_0057: nop - IL_0058: stloc.s V_4 - IL_005a: ldc.i4.0 - IL_005b: conv.i8 - IL_005c: stloc.s V_5 - IL_005e: ldarg.0 - IL_005f: stloc.s V_6 - IL_0061: br.s IL_007b - - IL_0063: ldloca.s V_2 - IL_0065: ldloc.s V_6 - IL_0067: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_006c: nop - IL_006d: ldloc.s V_6 - IL_006f: ldc.i4.1 - IL_0070: conv.i8 - IL_0071: add - IL_0072: stloc.s V_6 - IL_0074: ldloc.s V_5 - IL_0076: ldc.i4.1 - IL_0077: conv.i8 - IL_0078: add - IL_0079: stloc.s V_5 - IL_007b: ldloc.s V_5 - IL_007d: ldloc.s V_4 - IL_007f: blt.un.s IL_0063 - - IL_0081: nop - IL_0082: ldloca.s V_2 - IL_0084: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0089: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f14(uint64 step, uint64 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 5 - .locals init (uint64 V_0, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, - uint64 V_2, - uint64 V_3) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: brtrue.s IL_0011 - - IL_0004: ldc.i4.1 - IL_0005: conv.i8 - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_000d: pop - IL_000e: nop - IL_000f: br.s IL_0012 - - IL_0011: nop - IL_0012: ldarg.1 - IL_0013: ldc.i4.1 - IL_0014: conv.i8 - IL_0015: bge.un.s IL_001c - - IL_0017: ldc.i4.0 - IL_0018: conv.i8 - IL_0019: nop - IL_001a: br.s IL_0026 - - IL_001c: ldarg.1 - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: sub - IL_0020: ldarg.0 - IL_0021: div.un - IL_0022: ldc.i4.1 - IL_0023: conv.i8 - IL_0024: add.ovf.un - IL_0025: nop - IL_0026: stloc.0 - IL_0027: ldc.i4.0 - IL_0028: conv.i8 - IL_0029: stloc.2 - IL_002a: ldc.i4.1 - IL_002b: conv.i8 - IL_002c: stloc.3 - IL_002d: br.s IL_0041 - - IL_002f: ldloca.s V_1 - IL_0031: ldloc.3 - IL_0032: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0037: nop - IL_0038: ldloc.3 - IL_0039: ldarg.0 - IL_003a: add - IL_003b: stloc.3 - IL_003c: ldloc.2 - IL_003d: ldc.i4.1 - IL_003e: conv.i8 - IL_003f: add - IL_0040: stloc.2 - IL_0041: ldloc.2 - IL_0042: ldloc.0 - IL_0043: blt.un.s IL_002f - - IL_0045: ldloca.s V_1 - IL_0047: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004c: ret - } - - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f15(uint64 start, - uint64 step, - uint64 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (uint64 V_0, - bool V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - bool V_3, - uint64 V_4, - uint64 V_5, - uint64 V_6) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: brtrue.s IL_0010 - - IL_0004: ldarg.0 - IL_0005: ldarg.1 - IL_0006: ldarg.2 - IL_0007: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_000c: pop - IL_000d: nop - IL_000e: br.s IL_0011 - - IL_0010: nop - IL_0011: ldarg.2 - IL_0012: ldarg.0 - IL_0013: bge.un.s IL_001a - - IL_0015: ldc.i4.0 - IL_0016: conv.i8 - IL_0017: nop - IL_0018: br.s IL_0020 - - IL_001a: ldarg.2 - IL_001b: ldarg.0 - IL_001c: sub - IL_001d: ldarg.1 - IL_001e: div.un - IL_001f: nop - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ldc.i4.m1 - IL_0023: conv.i8 - IL_0024: ceq - IL_0026: stloc.1 - IL_0027: ldloc.1 - IL_0028: brfalse.s IL_0059 + IL_001a: ldarg.2 + IL_001b: ldarg.0 + IL_001c: sub + IL_001d: ldarg.1 + IL_001e: div.un + IL_001f: nop + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ldc.i4.m1 + IL_0023: conv.i8 + IL_0024: ceq + IL_0026: stloc.1 + IL_0027: ldloc.1 + IL_0028: brfalse.s IL_0059 IL_002a: ldc.i4.1 IL_002b: stloc.3 @@ -984,23 +598,274 @@ IL_0080: ldloc.s V_6 IL_0082: ldarg.1 IL_0083: add - IL_0084: stloc.s V_6 - IL_0086: ldloc.s V_5 + IL_0084: stloc.s V_6 + IL_0086: ldloc.s V_5 + IL_0088: ldc.i4.1 + IL_0089: conv.i8 + IL_008a: add + IL_008b: stloc.s V_5 + IL_008d: ldloc.s V_5 + IL_008f: ldloc.s V_4 + IL_0091: blt.un.s IL_0076 + + IL_0093: nop + IL_0094: ldloca.s V_2 + IL_0096: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_009b: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f16(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + uint64 V_1, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, + uint64 V_3, + uint64 V_4) + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: stloc.0 + IL_0008: ldc.i4.s 10 + IL_000a: conv.i8 + IL_000b: ldloc.0 + IL_000c: bge.un.s IL_0013 + + IL_000e: ldc.i4.0 + IL_000f: conv.i8 + IL_0010: nop + IL_0011: br.s IL_001c + + IL_0013: ldc.i4.s 10 + IL_0015: conv.i8 + IL_0016: ldloc.0 + IL_0017: sub + IL_0018: ldc.i4.1 + IL_0019: conv.i8 + IL_001a: add.ovf.un + IL_001b: nop + IL_001c: stloc.1 + IL_001d: ldc.i4.0 + IL_001e: conv.i8 + IL_001f: stloc.3 + IL_0020: ldloc.0 + IL_0021: stloc.s V_4 + IL_0023: br.s IL_003b + + IL_0025: ldloca.s V_2 + IL_0027: ldloc.s V_4 + IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002e: nop + IL_002f: ldloc.s V_4 + IL_0031: ldc.i4.1 + IL_0032: conv.i8 + IL_0033: add + IL_0034: stloc.s V_4 + IL_0036: ldloc.3 + IL_0037: ldc.i4.1 + IL_0038: conv.i8 + IL_0039: add + IL_003a: stloc.3 + IL_003b: ldloc.3 + IL_003c: ldloc.1 + IL_003d: blt.un.s IL_0025 + + IL_003f: ldloca.s V_2 + IL_0041: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0046: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f17(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + uint64 V_1, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, + uint64 V_3, + uint64 V_4) + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldc.i4.1 + IL_000a: conv.i8 + IL_000b: bge.un.s IL_0012 + + IL_000d: ldc.i4.0 + IL_000e: conv.i8 + IL_000f: nop + IL_0010: br.s IL_001a + + IL_0012: ldloc.0 + IL_0013: ldc.i4.1 + IL_0014: conv.i8 + IL_0015: sub + IL_0016: ldc.i4.1 + IL_0017: conv.i8 + IL_0018: add.ovf.un + IL_0019: nop + IL_001a: stloc.1 + IL_001b: ldc.i4.0 + IL_001c: conv.i8 + IL_001d: stloc.3 + IL_001e: ldc.i4.1 + IL_001f: conv.i8 + IL_0020: stloc.s V_4 + IL_0022: br.s IL_003a + + IL_0024: ldloca.s V_2 + IL_0026: ldloc.s V_4 + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloc.s V_4 + IL_0030: ldc.i4.1 + IL_0031: conv.i8 + IL_0032: add + IL_0033: stloc.s V_4 + IL_0035: ldloc.3 + IL_0036: ldc.i4.1 + IL_0037: conv.i8 + IL_0038: add + IL_0039: stloc.3 + IL_003a: ldloc.3 + IL_003b: ldloc.1 + IL_003c: blt.un.s IL_0024 + + IL_003e: ldloca.s V_2 + IL_0040: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0045: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f18(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 4 + .locals init (uint64 V_0, + uint64 V_1, + uint64 V_2, + bool V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_4, + bool V_5, + uint64 V_6, + uint64 V_7, + uint64 V_8) + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: stloc.0 + IL_0008: ldarg.1 + IL_0009: ldnull + IL_000a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_000f: stloc.1 + IL_0010: ldloc.1 + IL_0011: ldloc.0 + IL_0012: bge.un.s IL_0019 + + IL_0014: ldc.i4.0 + IL_0015: conv.i8 + IL_0016: nop + IL_0017: br.s IL_001d + + IL_0019: ldloc.1 + IL_001a: ldloc.0 + IL_001b: sub + IL_001c: nop + IL_001d: stloc.2 + IL_001e: ldloc.2 + IL_001f: ldc.i4.m1 + IL_0020: conv.i8 + IL_0021: ceq + IL_0023: stloc.3 + IL_0024: ldloc.3 + IL_0025: brfalse.s IL_005a + + IL_0027: ldc.i4.1 + IL_0028: stloc.s V_5 + IL_002a: ldc.i4.0 + IL_002b: conv.i8 + IL_002c: stloc.s V_6 + IL_002e: ldloc.0 + IL_002f: stloc.s V_7 + IL_0031: br.s IL_0053 + + IL_0033: ldloca.s V_4 + IL_0035: ldloc.s V_7 + IL_0037: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003c: nop + IL_003d: ldloc.s V_7 + IL_003f: ldc.i4.1 + IL_0040: conv.i8 + IL_0041: add + IL_0042: stloc.s V_7 + IL_0044: ldloc.s V_6 + IL_0046: ldc.i4.1 + IL_0047: conv.i8 + IL_0048: add + IL_0049: stloc.s V_6 + IL_004b: ldloc.s V_6 + IL_004d: ldc.i4.0 + IL_004e: conv.i8 + IL_004f: cgt.un + IL_0051: stloc.s V_5 + IL_0053: ldloc.s V_5 + IL_0055: brtrue.s IL_0033 + + IL_0057: nop + IL_0058: br.s IL_0094 + + IL_005a: ldloc.1 + IL_005b: ldloc.0 + IL_005c: bge.un.s IL_0063 + + IL_005e: ldc.i4.0 + IL_005f: conv.i8 + IL_0060: nop + IL_0061: br.s IL_006a + + IL_0063: ldloc.1 + IL_0064: ldloc.0 + IL_0065: sub + IL_0066: ldc.i4.1 + IL_0067: conv.i8 + IL_0068: add.ovf.un + IL_0069: nop + IL_006a: stloc.s V_6 + IL_006c: ldc.i4.0 + IL_006d: conv.i8 + IL_006e: stloc.s V_7 + IL_0070: ldloc.0 + IL_0071: stloc.s V_8 + IL_0073: br.s IL_008d + + IL_0075: ldloca.s V_4 + IL_0077: ldloc.s V_8 + IL_0079: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_007e: nop + IL_007f: ldloc.s V_8 + IL_0081: ldc.i4.1 + IL_0082: conv.i8 + IL_0083: add + IL_0084: stloc.s V_8 + IL_0086: ldloc.s V_7 IL_0088: ldc.i4.1 IL_0089: conv.i8 IL_008a: add - IL_008b: stloc.s V_5 - IL_008d: ldloc.s V_5 - IL_008f: ldloc.s V_4 - IL_0091: blt.un.s IL_0076 + IL_008b: stloc.s V_7 + IL_008d: ldloc.s V_7 + IL_008f: ldloc.s V_6 + IL_0091: blt.un.s IL_0075 IL_0093: nop - IL_0094: ldloca.s V_2 + IL_0094: ldloca.s V_4 IL_0096: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() IL_009b: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f16(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f19(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed { .maxstack 4 @@ -1062,7 +927,97 @@ IL_0046: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f17(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2() cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0005: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f20(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + { + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, + uint64 V_3, + uint64 V_4) + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: brtrue.s IL_001a + + IL_000b: ldc.i4.1 + IL_000c: conv.i8 + IL_000d: ldloc.0 + IL_000e: ldc.i4.s 10 + IL_0010: conv.i8 + IL_0011: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_0016: pop + IL_0017: nop + IL_0018: br.s IL_001b + + IL_001a: nop + IL_001b: ldc.i4.s 10 + IL_001d: conv.i8 + IL_001e: ldc.i4.1 + IL_001f: conv.i8 + IL_0020: bge.un.s IL_0027 + + IL_0022: ldc.i4.0 + IL_0023: conv.i8 + IL_0024: nop + IL_0025: br.s IL_0033 + + IL_0027: ldc.i4.s 10 + IL_0029: conv.i8 + IL_002a: ldc.i4.1 + IL_002b: conv.i8 + IL_002c: sub + IL_002d: ldloc.0 + IL_002e: div.un + IL_002f: ldc.i4.1 + IL_0030: conv.i8 + IL_0031: add.ovf.un + IL_0032: nop + IL_0033: stloc.1 + IL_0034: ldc.i4.0 + IL_0035: conv.i8 + IL_0036: stloc.3 + IL_0037: ldc.i4.1 + IL_0038: conv.i8 + IL_0039: stloc.s V_4 + IL_003b: br.s IL_0052 + + IL_003d: ldloca.s V_2 + IL_003f: ldloc.s V_4 + IL_0041: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0046: nop + IL_0047: ldloc.s V_4 + IL_0049: ldloc.0 + IL_004a: add + IL_004b: stloc.s V_4 + IL_004d: ldloc.3 + IL_004e: ldc.i4.1 + IL_004f: conv.i8 + IL_0050: add + IL_0051: stloc.3 + IL_0052: ldloc.3 + IL_0053: ldloc.1 + IL_0054: blt.un.s IL_003d + + IL_0056: ldloca.s V_2 + IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005d: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f21(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed { .maxstack 4 @@ -1120,493 +1075,538 @@ IL_003b: ldloc.1 IL_003c: blt.un.s IL_0024 - IL_003e: ldloca.s V_2 - IL_0040: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0045: ret + IL_003e: ldloca.s V_2 + IL_0040: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0045: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + f22(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 h) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + uint64 V_2, + uint64 V_3, + bool V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_5, + bool V_6, + uint64 V_7, + uint64 V_8, + uint64 V_9) + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0007: stloc.0 + IL_0008: ldarg.1 + IL_0009: ldnull + IL_000a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_000f: stloc.1 + IL_0010: ldarg.2 + IL_0011: ldnull + IL_0012: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: brtrue.s IL_0027 + + IL_001b: ldloc.0 + IL_001c: ldloc.1 + IL_001d: ldloc.2 + IL_001e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_0023: pop + IL_0024: nop + IL_0025: br.s IL_0028 + + IL_0027: nop + IL_0028: ldloc.2 + IL_0029: ldloc.0 + IL_002a: bge.un.s IL_0031 + + IL_002c: ldc.i4.0 + IL_002d: conv.i8 + IL_002e: nop + IL_002f: br.s IL_0037 + + IL_0031: ldloc.2 + IL_0032: ldloc.0 + IL_0033: sub + IL_0034: ldloc.1 + IL_0035: div.un + IL_0036: nop + IL_0037: stloc.3 + IL_0038: ldloc.3 + IL_0039: ldc.i4.m1 + IL_003a: conv.i8 + IL_003b: ceq + IL_003d: stloc.s V_4 + IL_003f: ldloc.s V_4 + IL_0041: brfalse.s IL_0075 + + IL_0043: ldc.i4.1 + IL_0044: stloc.s V_6 + IL_0046: ldc.i4.0 + IL_0047: conv.i8 + IL_0048: stloc.s V_7 + IL_004a: ldloc.0 + IL_004b: stloc.s V_8 + IL_004d: br.s IL_006e + + IL_004f: ldloca.s V_5 + IL_0051: ldloc.s V_8 + IL_0053: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0058: nop + IL_0059: ldloc.s V_8 + IL_005b: ldloc.1 + IL_005c: add + IL_005d: stloc.s V_8 + IL_005f: ldloc.s V_7 + IL_0061: ldc.i4.1 + IL_0062: conv.i8 + IL_0063: add + IL_0064: stloc.s V_7 + IL_0066: ldloc.s V_7 + IL_0068: ldc.i4.0 + IL_0069: conv.i8 + IL_006a: cgt.un + IL_006c: stloc.s V_6 + IL_006e: ldloc.s V_6 + IL_0070: brtrue.s IL_004f + + IL_0072: nop + IL_0073: br.s IL_00b0 + + IL_0075: ldloc.2 + IL_0076: ldloc.0 + IL_0077: bge.un.s IL_007e + + IL_0079: ldc.i4.0 + IL_007a: conv.i8 + IL_007b: nop + IL_007c: br.s IL_0087 + + IL_007e: ldloc.2 + IL_007f: ldloc.0 + IL_0080: sub + IL_0081: ldloc.1 + IL_0082: div.un + IL_0083: ldc.i4.1 + IL_0084: conv.i8 + IL_0085: add.ovf.un + IL_0086: nop + IL_0087: stloc.s V_7 + IL_0089: ldc.i4.0 + IL_008a: conv.i8 + IL_008b: stloc.s V_8 + IL_008d: ldloc.0 + IL_008e: stloc.s V_9 + IL_0090: br.s IL_00a9 + + IL_0092: ldloca.s V_5 + IL_0094: ldloc.s V_9 + IL_0096: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_009b: nop + IL_009c: ldloc.s V_9 + IL_009e: ldloc.1 + IL_009f: add + IL_00a0: stloc.s V_9 + IL_00a2: ldloc.s V_8 + IL_00a4: ldc.i4.1 + IL_00a5: conv.i8 + IL_00a6: add + IL_00a7: stloc.s V_8 + IL_00a9: ldloc.s V_8 + IL_00ab: ldloc.s V_7 + IL_00ad: blt.un.s IL_0092 + + IL_00af: nop + IL_00b0: ldloca.s V_5 + IL_00b2: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_00b7: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f18(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 4 - .locals init (uint64 V_0, + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, - uint64 V_2, - bool V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_4, - bool V_5, - uint64 V_6, - uint64 V_7, - uint64 V_8) - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0007: stloc.0 - IL_0008: ldarg.1 - IL_0009: ldnull - IL_000a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_000f: stloc.1 - IL_0010: ldloc.1 - IL_0011: ldloc.0 - IL_0012: bge.un.s IL_0019 - - IL_0014: ldc.i4.0 - IL_0015: conv.i8 - IL_0016: nop - IL_0017: br.s IL_001d - - IL_0019: ldloc.1 - IL_001a: ldloc.0 - IL_001b: sub - IL_001c: nop - IL_001d: stloc.2 - IL_001e: ldloc.2 - IL_001f: ldc.i4.m1 - IL_0020: conv.i8 - IL_0021: ceq - IL_0023: stloc.3 - IL_0024: ldloc.3 - IL_0025: brfalse.s IL_005a - - IL_0027: ldc.i4.1 - IL_0028: stloc.s V_5 - IL_002a: ldc.i4.0 - IL_002b: conv.i8 - IL_002c: stloc.s V_6 - IL_002e: ldloc.0 - IL_002f: stloc.s V_7 - IL_0031: br.s IL_0053 - - IL_0033: ldloca.s V_4 - IL_0035: ldloc.s V_7 - IL_0037: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_003c: nop - IL_003d: ldloc.s V_7 - IL_003f: ldc.i4.1 - IL_0040: conv.i8 - IL_0041: add - IL_0042: stloc.s V_7 - IL_0044: ldloc.s V_6 - IL_0046: ldc.i4.1 - IL_0047: conv.i8 - IL_0048: add - IL_0049: stloc.s V_6 - IL_004b: ldloc.s V_6 - IL_004d: ldc.i4.0 - IL_004e: conv.i8 - IL_004f: cgt.un - IL_0051: stloc.s V_5 - IL_0053: ldloc.s V_5 - IL_0055: brtrue.s IL_0033 + uint64 V_2) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.1 + IL_0004: conv.i8 + IL_0005: stloc.2 + IL_0006: br.s IL_001b - IL_0057: nop - IL_0058: br.s IL_0094 + IL_0008: ldloca.s V_0 + IL_000a: ldloc.2 + IL_000b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0010: nop + IL_0011: ldloc.2 + IL_0012: ldc.i4.1 + IL_0013: conv.i8 + IL_0014: add + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldc.i4.1 + IL_0018: conv.i8 + IL_0019: add + IL_001a: stloc.1 + IL_001b: ldloc.1 + IL_001c: ldc.i4.s 10 + IL_001e: conv.i8 + IL_001f: blt.un.s IL_0008 - IL_005a: ldloc.1 - IL_005b: ldloc.0 - IL_005c: bge.un.s IL_0063 + IL_0021: ldloca.s V_0 + IL_0023: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0028: ret + } - IL_005e: ldc.i4.0 - IL_005f: conv.i8 - IL_0060: nop - IL_0061: br.s IL_006a + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f4() cil managed + { + + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + uint64 V_1, + uint64 V_2) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.1 + IL_0004: conv.i8 + IL_0005: stloc.2 + IL_0006: br.s IL_001b - IL_0063: ldloc.1 - IL_0064: ldloc.0 - IL_0065: sub - IL_0066: ldc.i4.1 - IL_0067: conv.i8 - IL_0068: add.ovf.un - IL_0069: nop - IL_006a: stloc.s V_6 - IL_006c: ldc.i4.0 - IL_006d: conv.i8 - IL_006e: stloc.s V_7 - IL_0070: ldloc.0 - IL_0071: stloc.s V_8 - IL_0073: br.s IL_008d + IL_0008: ldloca.s V_0 + IL_000a: ldloc.2 + IL_000b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0010: nop + IL_0011: ldloc.2 + IL_0012: ldc.i4.2 + IL_0013: conv.i8 + IL_0014: add + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldc.i4.1 + IL_0018: conv.i8 + IL_0019: add + IL_001a: stloc.1 + IL_001b: ldloc.1 + IL_001c: ldc.i4.5 + IL_001d: conv.i8 + IL_001e: blt.un.s IL_0008 - IL_0075: ldloca.s V_4 - IL_0077: ldloc.s V_8 - IL_0079: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_007e: nop - IL_007f: ldloc.s V_8 - IL_0081: ldc.i4.1 - IL_0082: conv.i8 - IL_0083: add - IL_0084: stloc.s V_8 - IL_0086: ldloc.s V_7 - IL_0088: ldc.i4.1 - IL_0089: conv.i8 - IL_008a: add - IL_008b: stloc.s V_7 - IL_008d: ldloc.s V_7 - IL_008f: ldloc.s V_6 - IL_0091: blt.un.s IL_0075 + IL_0020: ldloca.s V_0 + IL_0022: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0027: ret + } - IL_0093: nop - IL_0094: ldloca.s V_4 - IL_0096: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_009b: ret + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f5() cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0005: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f19(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f6(uint64 start) cil managed { .maxstack 4 .locals init (uint64 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - uint64 V_4) - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0007: stloc.0 - IL_0008: ldc.i4.s 10 - IL_000a: conv.i8 - IL_000b: ldloc.0 - IL_000c: bge.un.s IL_0013 + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, + uint64 V_2, + uint64 V_3) + IL_0000: nop + IL_0001: ldc.i4.s 10 + IL_0003: conv.i8 + IL_0004: ldarg.0 + IL_0005: bge.un.s IL_000c - IL_000e: ldc.i4.0 - IL_000f: conv.i8 - IL_0010: nop - IL_0011: br.s IL_001c + IL_0007: ldc.i4.0 + IL_0008: conv.i8 + IL_0009: nop + IL_000a: br.s IL_0015 - IL_0013: ldc.i4.s 10 - IL_0015: conv.i8 - IL_0016: ldloc.0 - IL_0017: sub - IL_0018: ldc.i4.1 - IL_0019: conv.i8 - IL_001a: add.ovf.un - IL_001b: nop - IL_001c: stloc.1 - IL_001d: ldc.i4.0 - IL_001e: conv.i8 - IL_001f: stloc.3 - IL_0020: ldloc.0 - IL_0021: stloc.s V_4 - IL_0023: br.s IL_003b + IL_000c: ldc.i4.s 10 + IL_000e: conv.i8 + IL_000f: ldarg.0 + IL_0010: sub + IL_0011: ldc.i4.1 + IL_0012: conv.i8 + IL_0013: add.ovf.un + IL_0014: nop + IL_0015: stloc.0 + IL_0016: ldc.i4.0 + IL_0017: conv.i8 + IL_0018: stloc.2 + IL_0019: ldarg.0 + IL_001a: stloc.3 + IL_001b: br.s IL_0030 - IL_0025: ldloca.s V_2 - IL_0027: ldloc.s V_4 - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.s V_4 - IL_0031: ldc.i4.1 - IL_0032: conv.i8 - IL_0033: add - IL_0034: stloc.s V_4 - IL_0036: ldloc.3 - IL_0037: ldc.i4.1 - IL_0038: conv.i8 - IL_0039: add - IL_003a: stloc.3 - IL_003b: ldloc.3 - IL_003c: ldloc.1 - IL_003d: blt.un.s IL_0025 + IL_001d: ldloca.s V_1 + IL_001f: ldloc.3 + IL_0020: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0025: nop + IL_0026: ldloc.3 + IL_0027: ldc.i4.1 + IL_0028: conv.i8 + IL_0029: add + IL_002a: stloc.3 + IL_002b: ldloc.2 + IL_002c: ldc.i4.1 + IL_002d: conv.i8 + IL_002e: add + IL_002f: stloc.2 + IL_0030: ldloc.2 + IL_0031: ldloc.0 + IL_0032: blt.un.s IL_001d - IL_003f: ldloca.s V_2 - IL_0041: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0046: ret + IL_0034: ldloca.s V_1 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003b: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f20(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f7(uint64 finish) cil managed { - .maxstack 5 + .maxstack 4 .locals init (uint64 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - uint64 V_4) - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: brtrue.s IL_001a + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, + uint64 V_2, + uint64 V_3) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldc.i4.1 + IL_0003: conv.i8 + IL_0004: bge.un.s IL_000b - IL_000b: ldc.i4.1 - IL_000c: conv.i8 - IL_000d: ldloc.0 - IL_000e: ldc.i4.s 10 - IL_0010: conv.i8 - IL_0011: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_0016: pop - IL_0017: nop - IL_0018: br.s IL_001b + IL_0006: ldc.i4.0 + IL_0007: conv.i8 + IL_0008: nop + IL_0009: br.s IL_0013 - IL_001a: nop - IL_001b: ldc.i4.s 10 - IL_001d: conv.i8 - IL_001e: ldc.i4.1 - IL_001f: conv.i8 - IL_0020: bge.un.s IL_0027 + IL_000b: ldarg.0 + IL_000c: ldc.i4.1 + IL_000d: conv.i8 + IL_000e: sub + IL_000f: ldc.i4.1 + IL_0010: conv.i8 + IL_0011: add.ovf.un + IL_0012: nop + IL_0013: stloc.0 + IL_0014: ldc.i4.0 + IL_0015: conv.i8 + IL_0016: stloc.2 + IL_0017: ldc.i4.1 + IL_0018: conv.i8 + IL_0019: stloc.3 + IL_001a: br.s IL_002f - IL_0022: ldc.i4.0 - IL_0023: conv.i8 + IL_001c: ldloca.s V_1 + IL_001e: ldloc.3 + IL_001f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0024: nop - IL_0025: br.s IL_0033 - - IL_0027: ldc.i4.s 10 - IL_0029: conv.i8 - IL_002a: ldc.i4.1 - IL_002b: conv.i8 - IL_002c: sub - IL_002d: ldloc.0 - IL_002e: div.un - IL_002f: ldc.i4.1 - IL_0030: conv.i8 - IL_0031: add.ovf.un - IL_0032: nop - IL_0033: stloc.1 - IL_0034: ldc.i4.0 - IL_0035: conv.i8 - IL_0036: stloc.3 - IL_0037: ldc.i4.1 - IL_0038: conv.i8 - IL_0039: stloc.s V_4 - IL_003b: br.s IL_0052 - - IL_003d: ldloca.s V_2 - IL_003f: ldloc.s V_4 - IL_0041: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0046: nop - IL_0047: ldloc.s V_4 - IL_0049: ldloc.0 - IL_004a: add - IL_004b: stloc.s V_4 - IL_004d: ldloc.3 - IL_004e: ldc.i4.1 - IL_004f: conv.i8 - IL_0050: add - IL_0051: stloc.3 - IL_0052: ldloc.3 - IL_0053: ldloc.1 - IL_0054: blt.un.s IL_003d + IL_0025: ldloc.3 + IL_0026: ldc.i4.1 + IL_0027: conv.i8 + IL_0028: add + IL_0029: stloc.3 + IL_002a: ldloc.2 + IL_002b: ldc.i4.1 + IL_002c: conv.i8 + IL_002d: add + IL_002e: stloc.2 + IL_002f: ldloc.2 + IL_0030: ldloc.0 + IL_0031: blt.un.s IL_001c - IL_0056: ldloca.s V_2 - IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005d: ret + IL_0033: ldloca.s V_1 + IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003a: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f21(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f8(uint64 start, uint64 finish) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 4 .locals init (uint64 V_0, - uint64 V_1, + bool V_1, valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - uint64 V_4) - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldc.i4.1 - IL_000a: conv.i8 - IL_000b: bge.un.s IL_0012 + bool V_3, + uint64 V_4, + uint64 V_5, + uint64 V_6) + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: ldarg.0 + IL_0003: bge.un.s IL_000a - IL_000d: ldc.i4.0 - IL_000e: conv.i8 - IL_000f: nop - IL_0010: br.s IL_001a + IL_0005: ldc.i4.0 + IL_0006: conv.i8 + IL_0007: nop + IL_0008: br.s IL_000e - IL_0012: ldloc.0 - IL_0013: ldc.i4.1 - IL_0014: conv.i8 - IL_0015: sub - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: add.ovf.un - IL_0019: nop - IL_001a: stloc.1 - IL_001b: ldc.i4.0 - IL_001c: conv.i8 - IL_001d: stloc.3 - IL_001e: ldc.i4.1 - IL_001f: conv.i8 - IL_0020: stloc.s V_4 - IL_0022: br.s IL_003a + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: sub + IL_000d: nop + IL_000e: stloc.0 + IL_000f: ldloc.0 + IL_0010: ldc.i4.m1 + IL_0011: conv.i8 + IL_0012: ceq + IL_0014: stloc.1 + IL_0015: ldloc.1 + IL_0016: brfalse.s IL_0048 - IL_0024: ldloca.s V_2 - IL_0026: ldloc.s V_4 - IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002d: nop - IL_002e: ldloc.s V_4 - IL_0030: ldc.i4.1 - IL_0031: conv.i8 - IL_0032: add - IL_0033: stloc.s V_4 - IL_0035: ldloc.3 + IL_0018: ldc.i4.1 + IL_0019: stloc.3 + IL_001a: ldc.i4.0 + IL_001b: conv.i8 + IL_001c: stloc.s V_4 + IL_001e: ldarg.0 + IL_001f: stloc.s V_5 + IL_0021: br.s IL_0042 + + IL_0023: ldloca.s V_2 + IL_0025: ldloc.s V_5 + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloc.s V_5 + IL_002f: ldc.i4.1 + IL_0030: conv.i8 + IL_0031: add + IL_0032: stloc.s V_5 + IL_0034: ldloc.s V_4 IL_0036: ldc.i4.1 IL_0037: conv.i8 IL_0038: add - IL_0039: stloc.3 - IL_003a: ldloc.3 - IL_003b: ldloc.1 - IL_003c: blt.un.s IL_0024 + IL_0039: stloc.s V_4 + IL_003b: ldloc.s V_4 + IL_003d: ldc.i4.0 + IL_003e: conv.i8 + IL_003f: cgt.un + IL_0041: stloc.3 + IL_0042: ldloc.3 + IL_0043: brtrue.s IL_0023 - IL_003e: ldloca.s V_2 - IL_0040: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0045: ret + IL_0045: nop + IL_0046: br.s IL_0082 + + IL_0048: ldarg.1 + IL_0049: ldarg.0 + IL_004a: bge.un.s IL_0051 + + IL_004c: ldc.i4.0 + IL_004d: conv.i8 + IL_004e: nop + IL_004f: br.s IL_0058 + + IL_0051: ldarg.1 + IL_0052: ldarg.0 + IL_0053: sub + IL_0054: ldc.i4.1 + IL_0055: conv.i8 + IL_0056: add.ovf.un + IL_0057: nop + IL_0058: stloc.s V_4 + IL_005a: ldc.i4.0 + IL_005b: conv.i8 + IL_005c: stloc.s V_5 + IL_005e: ldarg.0 + IL_005f: stloc.s V_6 + IL_0061: br.s IL_007b + + IL_0063: ldloca.s V_2 + IL_0065: ldloc.s V_6 + IL_0067: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_006c: nop + IL_006d: ldloc.s V_6 + IL_006f: ldc.i4.1 + IL_0070: conv.i8 + IL_0071: add + IL_0072: stloc.s V_6 + IL_0074: ldloc.s V_5 + IL_0076: ldc.i4.1 + IL_0077: conv.i8 + IL_0078: add + IL_0079: stloc.s V_5 + IL_007b: ldloc.s V_5 + IL_007d: ldloc.s V_4 + IL_007f: blt.un.s IL_0063 + + IL_0081: nop + IL_0082: ldloca.s V_2 + IL_0084: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0089: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - f22(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 h) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f9(uint64 start) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - .maxstack 5 + .maxstack 4 .locals init (uint64 V_0, - uint64 V_1, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, - uint64 V_3, - bool V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_5, - bool V_6, - uint64 V_7, - uint64 V_8, - uint64 V_9) - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0007: stloc.0 - IL_0008: ldarg.1 - IL_0009: ldnull - IL_000a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_000f: stloc.1 - IL_0010: ldarg.2 - IL_0011: ldnull - IL_0012: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0017: stloc.2 - IL_0018: ldloc.1 - IL_0019: brtrue.s IL_0027 + uint64 V_3) + IL_0000: nop + IL_0001: ldc.i4.s 10 + IL_0003: conv.i8 + IL_0004: ldarg.0 + IL_0005: bge.un.s IL_000c - IL_001b: ldloc.0 - IL_001c: ldloc.1 - IL_001d: ldloc.2 - IL_001e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_0023: pop - IL_0024: nop - IL_0025: br.s IL_0028 + IL_0007: ldc.i4.0 + IL_0008: conv.i8 + IL_0009: nop + IL_000a: br.s IL_0015 - IL_0027: nop - IL_0028: ldloc.2 - IL_0029: ldloc.0 - IL_002a: bge.un.s IL_0031 + IL_000c: ldc.i4.s 10 + IL_000e: conv.i8 + IL_000f: ldarg.0 + IL_0010: sub + IL_0011: ldc.i4.1 + IL_0012: conv.i8 + IL_0013: add.ovf.un + IL_0014: nop + IL_0015: stloc.0 + IL_0016: ldc.i4.0 + IL_0017: conv.i8 + IL_0018: stloc.2 + IL_0019: ldarg.0 + IL_001a: stloc.3 + IL_001b: br.s IL_0030 - IL_002c: ldc.i4.0 + IL_001d: ldloca.s V_1 + IL_001f: ldloc.3 + IL_0020: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0025: nop + IL_0026: ldloc.3 + IL_0027: ldc.i4.1 + IL_0028: conv.i8 + IL_0029: add + IL_002a: stloc.3 + IL_002b: ldloc.2 + IL_002c: ldc.i4.1 IL_002d: conv.i8 - IL_002e: nop - IL_002f: br.s IL_0037 - - IL_0031: ldloc.2 - IL_0032: ldloc.0 - IL_0033: sub - IL_0034: ldloc.1 - IL_0035: div.un - IL_0036: nop - IL_0037: stloc.3 - IL_0038: ldloc.3 - IL_0039: ldc.i4.m1 - IL_003a: conv.i8 - IL_003b: ceq - IL_003d: stloc.s V_4 - IL_003f: ldloc.s V_4 - IL_0041: brfalse.s IL_0075 - - IL_0043: ldc.i4.1 - IL_0044: stloc.s V_6 - IL_0046: ldc.i4.0 - IL_0047: conv.i8 - IL_0048: stloc.s V_7 - IL_004a: ldloc.0 - IL_004b: stloc.s V_8 - IL_004d: br.s IL_006e - - IL_004f: ldloca.s V_5 - IL_0051: ldloc.s V_8 - IL_0053: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0058: nop - IL_0059: ldloc.s V_8 - IL_005b: ldloc.1 - IL_005c: add - IL_005d: stloc.s V_8 - IL_005f: ldloc.s V_7 - IL_0061: ldc.i4.1 - IL_0062: conv.i8 - IL_0063: add - IL_0064: stloc.s V_7 - IL_0066: ldloc.s V_7 - IL_0068: ldc.i4.0 - IL_0069: conv.i8 - IL_006a: cgt.un - IL_006c: stloc.s V_6 - IL_006e: ldloc.s V_6 - IL_0070: brtrue.s IL_004f - - IL_0072: nop - IL_0073: br.s IL_00b0 - - IL_0075: ldloc.2 - IL_0076: ldloc.0 - IL_0077: bge.un.s IL_007e - - IL_0079: ldc.i4.0 - IL_007a: conv.i8 - IL_007b: nop - IL_007c: br.s IL_0087 - - IL_007e: ldloc.2 - IL_007f: ldloc.0 - IL_0080: sub - IL_0081: ldloc.1 - IL_0082: div.un - IL_0083: ldc.i4.1 - IL_0084: conv.i8 - IL_0085: add.ovf.un - IL_0086: nop - IL_0087: stloc.s V_7 - IL_0089: ldc.i4.0 - IL_008a: conv.i8 - IL_008b: stloc.s V_8 - IL_008d: ldloc.0 - IL_008e: stloc.s V_9 - IL_0090: br.s IL_00a9 - - IL_0092: ldloca.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_009b: nop - IL_009c: ldloc.s V_9 - IL_009e: ldloc.1 - IL_009f: add - IL_00a0: stloc.s V_9 - IL_00a2: ldloc.s V_8 - IL_00a4: ldc.i4.1 - IL_00a5: conv.i8 - IL_00a6: add - IL_00a7: stloc.s V_8 - IL_00a9: ldloc.s V_8 - IL_00ab: ldloc.s V_7 - IL_00ad: blt.un.s IL_0092 + IL_002e: add + IL_002f: stloc.2 + IL_0030: ldloc.2 + IL_0031: ldloc.0 + IL_0032: blt.un.s IL_001d - IL_00af: nop - IL_00b0: ldloca.s V_5 - IL_00b2: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_00b7: ret + IL_0034: ldloca.s V_1 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003b: ret } } @@ -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..7a13091ab6e 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 @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/F@5 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/F@5::.ctor() + IL_0005: stsfld class assembly/F@5 assembly/F@5::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -56,15 +65,6 @@ IL_0001: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/F@5::.ctor() - IL_0005: stsfld class assembly/F@5 assembly/F@5::@_instance - IL_000a: ret - } - } .method public static void F<(class [FSharp.Core]Microsoft.FSharp.Control.IEvent`2,int32>) T>(!!T[][] x) cil managed @@ -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..ab42f975f44 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 @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class Program/F@6 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void Program/F@6::.ctor() + IL_0005: stsfld class Program/F@6 Program/F@6::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -56,15 +65,6 @@ IL_0001: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void Program/F@6::.ctor() - IL_0005: stsfld class Program/F@6 Program/F@6::@_instance - IL_000a: ret - } - } .method public static void F<(class [FSharp.Core]Microsoft.FSharp.Control.IEvent`2,int32>) T>(!!T[] x) cil managed @@ -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..3e2407a1a89 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 @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class Program/F@6 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void Program/F@6::.ctor() + IL_0005: stsfld class Program/F@6 Program/F@6::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -56,15 +65,6 @@ IL_0001: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void Program/F@6::.ctor() - IL_0005: stsfld class Program/F@6 Program/F@6::@_instance - IL_000a: ret - } - } .method public static void F<(class [FSharp.Core]Microsoft.FSharp.Control.IEvent`2,int32>) T>(!!T[0...,0...] x) cil managed @@ -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..4e291200146 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 @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class Program/F@6 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void Program/F@6::.ctor() + IL_0005: stsfld class Program/F@6 Program/F@6::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -56,15 +65,6 @@ IL_0001: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void Program/F@6::.ctor() - IL_0005: stsfld class Program/F@6 Program/F@6::@_instance - IL_000a: ret - } - } .method public static void F<(class [FSharp.Core]Microsoft.FSharp.Control.IEvent`2,int32>) T>(!!T x) cil managed @@ -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..71fa9ca6be0 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 @@ -42,6 +42,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/test6@38 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/test6@38::.ctor() + IL_0005: stsfld class assembly/test6@38 assembly/test6@38::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -63,21 +72,21 @@ IL_0003: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit test7@47 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/test7@47 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/test6@38::.ctor() - IL_0005: stsfld class assembly/test6@38 assembly/test6@38::@_instance + IL_0000: newobj instance void assembly/test7@47::.ctor() + IL_0005: stsfld class assembly/test7@47 assembly/test7@47::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit test7@47 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/test7@47 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -99,15 +108,6 @@ IL_0003: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/test7@47::.ctor() - IL_0005: stsfld class assembly/test7@47 assembly/test7@47::@_instance - IL_000a: ret - } - } .method public static void test1(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 lst) cil managed @@ -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..71fa9ca6be0 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 @@ -42,6 +42,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/test6@38 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/test6@38::.ctor() + IL_0005: stsfld class assembly/test6@38 assembly/test6@38::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -63,21 +72,21 @@ IL_0003: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit test7@47 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/test7@47 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/test6@38::.ctor() - IL_0005: stsfld class assembly/test6@38 assembly/test6@38::@_instance + IL_0000: newobj instance void assembly/test7@47::.ctor() + IL_0005: stsfld class assembly/test7@47 assembly/test7@47::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit test7@47 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/test7@47 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -99,15 +108,6 @@ IL_0003: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/test7@47::.ctor() - IL_0005: stsfld class assembly/test7@47 assembly/test7@47::@_instance - IL_000a: ret - } - } .method public static void test1(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 lst) cil managed @@ -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..dc6ed4f21ce 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 @@ -42,6 +42,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/test8@54 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/test8@54::.ctor() + IL_0005: stsfld class assembly/test8@54 assembly/test8@54::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -65,21 +74,21 @@ IL_0005: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit test9@63 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/test9@63 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/test8@54::.ctor() - IL_0005: stsfld class assembly/test8@54 assembly/test8@54::@_instance + IL_0000: newobj instance void assembly/test9@63::.ctor() + IL_0005: stsfld class assembly/test9@63 assembly/test9@63::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit test9@63 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/test9@63 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -103,15 +112,6 @@ IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/test9@63::.ctor() - IL_0005: stsfld class assembly/test9@63 assembly/test9@63::@_instance - IL_000a: ret - } - } .method public static void test1(string str) cil managed @@ -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..dc6ed4f21ce 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 @@ -42,6 +42,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/test8@54 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/test8@54::.ctor() + IL_0005: stsfld class assembly/test8@54 assembly/test8@54::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -65,21 +74,21 @@ IL_0005: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit test9@63 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/test9@63 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/test8@54::.ctor() - IL_0005: stsfld class assembly/test8@54 assembly/test8@54::@_instance + IL_0000: newobj instance void assembly/test9@63::.ctor() + IL_0005: stsfld class assembly/test9@63 assembly/test9@63::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit test9@63 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/test9@63 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -103,15 +112,6 @@ IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/test9@63::.ctor() - IL_0005: stsfld class assembly/test9@63 assembly/test9@63::@_instance - IL_000a: ret - } - } .method public static void test1(string str) cil managed @@ -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..7df3e86edb3 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 @@ -33,21 +33,15 @@ 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 public specialname static uint8 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld uint8 ''.$assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(uint8 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld uint8 ''.$assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -137,6 +131,152 @@ IL_0019: ret } + .method public static void f10(uint8 start, + uint8 step, + uint8 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint16 V_0, + uint16 V_1, + uint8 V_2) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, + uint8, + uint8) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldarg.2 + IL_0011: ldarg.2 + IL_0012: bge.un.s IL_0018 + + IL_0014: ldc.i4.0 + IL_0015: nop + IL_0016: br.s IL_0021 + + IL_0018: ldarg.2 + IL_0019: ldarg.2 + IL_001a: sub + IL_001b: ldarg.1 + IL_001c: div.un + IL_001d: conv.u2 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: nop + IL_0021: stloc.0 + IL_0022: ldc.i4.0 + IL_0023: stloc.1 + IL_0024: ldarg.2 + IL_0025: stloc.2 + IL_0026: br.s IL_0036 + + IL_0028: ldloc.2 + IL_0029: call void assembly::set_c(uint8) + IL_002e: ldloc.2 + IL_002f: ldarg.1 + IL_0030: add + IL_0031: stloc.2 + IL_0032: ldloc.1 + IL_0033: ldc.i4.1 + IL_0034: add + IL_0035: stloc.1 + IL_0036: ldloc.1 + IL_0037: ldloc.0 + IL_0038: blt.un.s IL_0028 + + IL_003a: ret + } + + .method public static void f11(uint8 start, + uint8 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (uint8 V_0, + uint8 V_1, + uint8 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldarg.1 + IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, + uint8, + uint8) + IL_0008: pop + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4.0 + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: stloc.2 + IL_000f: br.s IL_001f + + IL_0011: ldloc.2 + IL_0012: call void assembly::set_c(uint8) + IL_0017: ldloc.2 + IL_0018: ldc.i4.0 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldloc.0 + IL_0021: blt.un.s IL_0011 + + IL_0023: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (uint8 V_0, + uint8 V_1, + uint8 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.s 10 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, + uint8, + uint8) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: stloc.0 + IL_000c: ldc.i4.0 + IL_000d: stloc.1 + IL_000e: ldc.i4.1 + IL_000f: stloc.2 + IL_0010: br.s IL_0020 + + IL_0012: ldloc.2 + IL_0013: call void assembly::set_c(uint8) + IL_0018: ldloc.2 + IL_0019: ldc.i4.0 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldloc.0 + IL_0022: blt.un.s IL_0012 + + IL_0024: ret + } + .method public static void f2(uint8 start) cil managed { @@ -482,150 +622,21 @@ IL_002a: ret } - .method public static void f10(uint8 start, - uint8 step, - uint8 finish) cil managed + .method public specialname static uint8 get_c() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - .maxstack 5 - .locals init (uint16 V_0, - uint16 V_1, - uint8 V_2) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, - uint8, - uint8) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldarg.2 - IL_0011: ldarg.2 - IL_0012: bge.un.s IL_0018 - - IL_0014: ldc.i4.0 - IL_0015: nop - IL_0016: br.s IL_0021 - - IL_0018: ldarg.2 - IL_0019: ldarg.2 - IL_001a: sub - IL_001b: ldarg.1 - IL_001c: div.un - IL_001d: conv.u2 - IL_001e: ldc.i4.1 - IL_001f: add - IL_0020: nop - IL_0021: stloc.0 - IL_0022: ldc.i4.0 - IL_0023: stloc.1 - IL_0024: ldarg.2 - IL_0025: stloc.2 - IL_0026: br.s IL_0036 - - IL_0028: ldloc.2 - IL_0029: call void assembly::set_c(uint8) - IL_002e: ldloc.2 - IL_002f: ldarg.1 - IL_0030: add - IL_0031: stloc.2 - IL_0032: ldloc.1 - IL_0033: ldc.i4.1 - IL_0034: add - IL_0035: stloc.1 - IL_0036: ldloc.1 - IL_0037: ldloc.0 - IL_0038: blt.un.s IL_0028 - - IL_003a: ret + .maxstack 8 + IL_0000: ldsfld uint8 ''.$assembly::c@1 + IL_0005: ret } - .method public static void f11(uint8 start, - uint8 finish) cil managed + .method public specialname static void set_c(uint8 'value') cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 - .locals init (uint8 V_0, - uint8 V_1, - uint8 V_2) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: ldarg.1 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, - uint8, - uint8) - IL_0008: pop - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4.0 - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: stloc.2 - IL_000f: br.s IL_001f - - IL_0011: ldloc.2 - IL_0012: call void assembly::set_c(uint8) - IL_0017: ldloc.2 - IL_0018: ldc.i4.0 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.0 - IL_0021: blt.un.s IL_0011 - - IL_0023: ret - } - - .method public static void f12() cil managed - { - - .maxstack 5 - .locals init (uint8 V_0, - uint8 V_1, - uint8 V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.0 - IL_0002: ldc.i4.s 10 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, - uint8, - uint8) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: ldc.i4.0 - IL_000d: stloc.1 - IL_000e: ldc.i4.1 - IL_000f: stloc.2 - IL_0010: br.s IL_0020 - - IL_0012: ldloc.2 - IL_0013: call void assembly::set_c(uint8) - IL_0018: ldloc.2 - IL_0019: ldc.i4.0 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldloc.0 - IL_0022: blt.un.s IL_0012 - - IL_0024: ret + IL_0001: stsfld uint8 ''.$assembly::c@1 + IL_0006: ret } .property uint8 c() @@ -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..0bfde607115 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 @@ -35,21 +35,15 @@ .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 uint8 c@1 .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 uint8 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld uint8 assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(uint8 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld uint8 assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -139,6 +133,152 @@ IL_0019: ret } + .method public static void f10(uint8 start, + uint8 step, + uint8 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint16 V_0, + uint16 V_1, + uint8 V_2) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, + uint8, + uint8) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldarg.2 + IL_0011: ldarg.2 + IL_0012: bge.un.s IL_0018 + + IL_0014: ldc.i4.0 + IL_0015: nop + IL_0016: br.s IL_0021 + + IL_0018: ldarg.2 + IL_0019: ldarg.2 + IL_001a: sub + IL_001b: ldarg.1 + IL_001c: div.un + IL_001d: conv.u2 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: nop + IL_0021: stloc.0 + IL_0022: ldc.i4.0 + IL_0023: stloc.1 + IL_0024: ldarg.2 + IL_0025: stloc.2 + IL_0026: br.s IL_0036 + + IL_0028: ldloc.2 + IL_0029: call void assembly::set_c(uint8) + IL_002e: ldloc.2 + IL_002f: ldarg.1 + IL_0030: add + IL_0031: stloc.2 + IL_0032: ldloc.1 + IL_0033: ldc.i4.1 + IL_0034: add + IL_0035: stloc.1 + IL_0036: ldloc.1 + IL_0037: ldloc.0 + IL_0038: blt.un.s IL_0028 + + IL_003a: ret + } + + .method public static void f11(uint8 start, + uint8 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (uint8 V_0, + uint8 V_1, + uint8 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldarg.1 + IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, + uint8, + uint8) + IL_0008: pop + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4.0 + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: stloc.2 + IL_000f: br.s IL_001f + + IL_0011: ldloc.2 + IL_0012: call void assembly::set_c(uint8) + IL_0017: ldloc.2 + IL_0018: ldc.i4.0 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldloc.0 + IL_0021: blt.un.s IL_0011 + + IL_0023: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (uint8 V_0, + uint8 V_1, + uint8 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.s 10 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, + uint8, + uint8) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: stloc.0 + IL_000c: ldc.i4.0 + IL_000d: stloc.1 + IL_000e: ldc.i4.1 + IL_000f: stloc.2 + IL_0010: br.s IL_0020 + + IL_0012: ldloc.2 + IL_0013: call void assembly::set_c(uint8) + IL_0018: ldloc.2 + IL_0019: ldc.i4.0 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldloc.0 + IL_0022: blt.un.s IL_0012 + + IL_0024: ret + } + .method public static void f2(uint8 start) cil managed { @@ -484,161 +624,21 @@ IL_002a: ret } - .method public static void f10(uint8 start, - uint8 step, - uint8 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (uint16 V_0, - uint16 V_1, - uint8 V_2) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, - uint8, - uint8) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldarg.2 - IL_0011: ldarg.2 - IL_0012: bge.un.s IL_0018 - - IL_0014: ldc.i4.0 - IL_0015: nop - IL_0016: br.s IL_0021 - - IL_0018: ldarg.2 - IL_0019: ldarg.2 - IL_001a: sub - IL_001b: ldarg.1 - IL_001c: div.un - IL_001d: conv.u2 - IL_001e: ldc.i4.1 - IL_001f: add - IL_0020: nop - IL_0021: stloc.0 - IL_0022: ldc.i4.0 - IL_0023: stloc.1 - IL_0024: ldarg.2 - IL_0025: stloc.2 - IL_0026: br.s IL_0036 - - IL_0028: ldloc.2 - IL_0029: call void assembly::set_c(uint8) - IL_002e: ldloc.2 - IL_002f: ldarg.1 - IL_0030: add - IL_0031: stloc.2 - IL_0032: ldloc.1 - IL_0033: ldc.i4.1 - IL_0034: add - IL_0035: stloc.1 - IL_0036: ldloc.1 - IL_0037: ldloc.0 - IL_0038: blt.un.s IL_0028 - - IL_003a: ret - } - - .method public static void f11(uint8 start, - uint8 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 5 - .locals init (uint8 V_0, - uint8 V_1, - uint8 V_2) - IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: ldarg.1 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, - uint8, - uint8) - IL_0008: pop - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4.0 - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: stloc.2 - IL_000f: br.s IL_001f - - IL_0011: ldloc.2 - IL_0012: call void assembly::set_c(uint8) - IL_0017: ldloc.2 - IL_0018: ldc.i4.0 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.0 - IL_0021: blt.un.s IL_0011 - - IL_0023: ret - } - - .method public static void f12() cil managed + .method public specialname static uint8 get_c() cil managed { - .maxstack 5 - .locals init (uint8 V_0, - uint8 V_1, - uint8 V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.0 - IL_0002: ldc.i4.s 10 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, - uint8, - uint8) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: ldc.i4.0 - IL_000d: stloc.1 - IL_000e: ldc.i4.1 - IL_000f: stloc.2 - IL_0010: br.s IL_0020 - - IL_0012: ldloc.2 - IL_0013: call void assembly::set_c(uint8) - IL_0018: ldloc.2 - IL_0019: ldc.i4.0 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldloc.0 - IL_0022: blt.un.s IL_0012 - - IL_0024: ret + .maxstack 8 + IL_0000: ldsfld uint8 assembly::c@1 + IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static void set_c(uint8 '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 uint8 assembly::c@1 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -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..6170dde8fd7 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 @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 { .field static assembly initonly class assembly/f8@40 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/f8@40::.ctor() + IL_0005: stsfld class assembly/f8@40 assembly/f8@40::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -59,21 +68,21 @@ IL_0004: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit f10@48 + extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 + { + .field static assembly initonly class assembly/f10@48 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/f8@40::.ctor() - IL_0005: stsfld class assembly/f8@40 assembly/f8@40::@_instance + IL_0000: newobj instance void assembly/f10@48::.ctor() + IL_0005: stsfld class assembly/f10@48 assembly/f10@48::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f10@48 - extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 - { - .field static assembly initonly class assembly/f10@48 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -96,21 +105,21 @@ IL_0004: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit f11@52 + extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 + { + .field static assembly initonly class assembly/f11@52 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/f10@48::.ctor() - IL_0005: stsfld class assembly/f10@48 assembly/f10@48::@_instance + IL_0000: newobj instance void assembly/f11@52::.ctor() + IL_0005: stsfld class assembly/f11@52 assembly/f11@52::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f11@52 - extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 - { - .field static assembly initonly class assembly/f11@52 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -133,21 +142,21 @@ IL_0004: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit f12@56 + extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 + { + .field static assembly initonly class assembly/f12@56 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/f11@52::.ctor() - IL_0005: stsfld class assembly/f11@52 assembly/f11@52::@_instance + IL_0000: newobj instance void assembly/f12@56::.ctor() + IL_0005: stsfld class assembly/f12@56 assembly/f12@56::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f12@56 - extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 - { - .field static assembly initonly class assembly/f12@56 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -170,32 +179,17 @@ IL_0004: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/f12@56::.ctor() - IL_0005: stsfld class assembly/f12@56 assembly/f12@56::@_instance - IL_000a: ret - } - - } - - .method public specialname static char get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld char ''.$assembly::c@1 - IL_0005: ret } - .method public specialname static void set_c(char 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld char ''.$assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -285,6 +279,165 @@ IL_001a: ret } + .method public static void f10(char start, + char step, + char finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 7 + .locals init (uint32 V_0, + uint32 V_1, + char V_2) + IL_0000: ldarg.1 + IL_0001: ldc.i4.0 + IL_0002: bne.un.s IL_0016 + + IL_0004: ldc.i4.0 + IL_0005: ldsfld class assembly/f10@48 assembly/f10@48::@_instance + IL_000a: ldarg.2 + IL_000b: ldarg.1 + IL_000c: ldarg.2 + IL_000d: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeStepGeneric(!!0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !!1, + !!0, + !!1) + IL_0012: pop + IL_0013: nop + IL_0014: br.s IL_0017 + + IL_0016: nop + IL_0017: ldarg.2 + IL_0018: ldarg.2 + IL_0019: bge.un.s IL_001f + + IL_001b: ldc.i4.0 + IL_001c: nop + IL_001d: br.s IL_0028 + + IL_001f: ldarg.2 + IL_0020: ldarg.2 + IL_0021: sub + IL_0022: ldarg.1 + IL_0023: div.un + IL_0024: conv.u4 + IL_0025: ldc.i4.1 + IL_0026: add + IL_0027: nop + IL_0028: stloc.0 + IL_0029: ldc.i4.0 + IL_002a: stloc.1 + IL_002b: ldarg.2 + IL_002c: stloc.2 + IL_002d: br.s IL_003d + + IL_002f: ldloc.2 + IL_0030: call void assembly::set_c(char) + IL_0035: ldloc.2 + IL_0036: ldarg.1 + IL_0037: add + IL_0038: stloc.2 + IL_0039: ldloc.1 + IL_003a: ldc.i4.1 + IL_003b: add + IL_003c: stloc.1 + IL_003d: ldloc.1 + IL_003e: ldloc.0 + IL_003f: blt.un.s IL_002f + + IL_0041: ret + } + + .method public static void f11(char start, + char finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 7 + .locals init (char V_0, + char V_1, + char V_2) + IL_0000: ldc.i4.0 + IL_0001: ldsfld class assembly/f11@52 assembly/f11@52::@_instance + IL_0006: ldarg.0 + IL_0007: ldc.i4.0 + IL_0008: ldarg.1 + IL_0009: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeStepGeneric(!!0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !!1, + !!0, + !!1) + IL_000e: pop + IL_000f: ldc.i4.0 + IL_0010: stloc.0 + IL_0011: ldc.i4.0 + IL_0012: stloc.1 + IL_0013: ldarg.0 + IL_0014: stloc.2 + IL_0015: br.s IL_0025 + + IL_0017: ldloc.2 + IL_0018: call void assembly::set_c(char) + IL_001d: ldloc.2 + IL_001e: ldc.i4.0 + IL_001f: add + IL_0020: stloc.2 + IL_0021: ldloc.1 + IL_0022: ldc.i4.1 + IL_0023: add + IL_0024: stloc.1 + IL_0025: ldloc.1 + IL_0026: ldloc.0 + IL_0027: blt.un.s IL_0017 + + IL_0029: ret + } + + .method public static void f12() cil managed + { + + .maxstack 7 + .locals init (char V_0, + char V_1, + char V_2) + IL_0000: ldc.i4.0 + IL_0001: ldsfld class assembly/f12@56 assembly/f12@56::@_instance + IL_0006: ldc.i4.s 97 + IL_0008: ldc.i4.0 + IL_0009: ldc.i4.s 122 + IL_000b: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeStepGeneric(!!0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !!1, + !!0, + !!1) + IL_0010: pop + IL_0011: ldc.i4.0 + IL_0012: stloc.0 + IL_0013: ldc.i4.0 + IL_0014: stloc.1 + IL_0015: ldc.i4.s 97 + IL_0017: stloc.2 + IL_0018: br.s IL_0028 + + IL_001a: ldloc.2 + IL_001b: call void assembly::set_c(char) + IL_0020: ldloc.2 + IL_0021: ldc.i4.0 + IL_0022: add + IL_0023: stloc.2 + IL_0024: ldloc.1 + IL_0025: ldc.i4.1 + IL_0026: add + IL_0027: stloc.1 + IL_0028: ldloc.1 + IL_0029: ldloc.0 + IL_002a: blt.un.s IL_001a + + IL_002c: ret + } + .method public static void f2(char start) cil managed { @@ -637,163 +790,21 @@ IL_002d: ret } - .method public static void f10(char start, - char step, - char finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 7 - .locals init (uint32 V_0, - uint32 V_1, - char V_2) - IL_0000: ldarg.1 - IL_0001: ldc.i4.0 - IL_0002: bne.un.s IL_0016 - - IL_0004: ldc.i4.0 - IL_0005: ldsfld class assembly/f10@48 assembly/f10@48::@_instance - IL_000a: ldarg.2 - IL_000b: ldarg.1 - IL_000c: ldarg.2 - IL_000d: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeStepGeneric(!!0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, - !!1, - !!0, - !!1) - IL_0012: pop - IL_0013: nop - IL_0014: br.s IL_0017 - - IL_0016: nop - IL_0017: ldarg.2 - IL_0018: ldarg.2 - IL_0019: bge.un.s IL_001f - - IL_001b: ldc.i4.0 - IL_001c: nop - IL_001d: br.s IL_0028 - - IL_001f: ldarg.2 - IL_0020: ldarg.2 - IL_0021: sub - IL_0022: ldarg.1 - IL_0023: div.un - IL_0024: conv.u4 - IL_0025: ldc.i4.1 - IL_0026: add - IL_0027: nop - IL_0028: stloc.0 - IL_0029: ldc.i4.0 - IL_002a: stloc.1 - IL_002b: ldarg.2 - IL_002c: stloc.2 - IL_002d: br.s IL_003d - - IL_002f: ldloc.2 - IL_0030: call void assembly::set_c(char) - IL_0035: ldloc.2 - IL_0036: ldarg.1 - IL_0037: add - IL_0038: stloc.2 - IL_0039: ldloc.1 - IL_003a: ldc.i4.1 - IL_003b: add - IL_003c: stloc.1 - IL_003d: ldloc.1 - IL_003e: ldloc.0 - IL_003f: blt.un.s IL_002f - - IL_0041: ret - } - - .method public static void f11(char start, - char finish) cil managed + .method public specialname static char get_c() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 7 - .locals init (char V_0, - char V_1, - char V_2) - IL_0000: ldc.i4.0 - IL_0001: ldsfld class assembly/f11@52 assembly/f11@52::@_instance - IL_0006: ldarg.0 - IL_0007: ldc.i4.0 - IL_0008: ldarg.1 - IL_0009: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeStepGeneric(!!0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, - !!1, - !!0, - !!1) - IL_000e: pop - IL_000f: ldc.i4.0 - IL_0010: stloc.0 - IL_0011: ldc.i4.0 - IL_0012: stloc.1 - IL_0013: ldarg.0 - IL_0014: stloc.2 - IL_0015: br.s IL_0025 - - IL_0017: ldloc.2 - IL_0018: call void assembly::set_c(char) - IL_001d: ldloc.2 - IL_001e: ldc.i4.0 - IL_001f: add - IL_0020: stloc.2 - IL_0021: ldloc.1 - IL_0022: ldc.i4.1 - IL_0023: add - IL_0024: stloc.1 - IL_0025: ldloc.1 - IL_0026: ldloc.0 - IL_0027: blt.un.s IL_0017 - - IL_0029: ret + .maxstack 8 + IL_0000: ldsfld char ''.$assembly::c@1 + IL_0005: ret } - .method public static void f12() cil managed + .method public specialname static void set_c(char 'value') cil managed { - .maxstack 7 - .locals init (char V_0, - char V_1, - char V_2) - IL_0000: ldc.i4.0 - IL_0001: ldsfld class assembly/f12@56 assembly/f12@56::@_instance - IL_0006: ldc.i4.s 97 - IL_0008: ldc.i4.0 - IL_0009: ldc.i4.s 122 - IL_000b: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeStepGeneric(!!0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, - !!1, - !!0, - !!1) - IL_0010: pop - IL_0011: ldc.i4.0 - IL_0012: stloc.0 - IL_0013: ldc.i4.0 - IL_0014: stloc.1 - IL_0015: ldc.i4.s 97 - IL_0017: stloc.2 - IL_0018: br.s IL_0028 - - IL_001a: ldloc.2 - IL_001b: call void assembly::set_c(char) - IL_0020: ldloc.2 - IL_0021: ldc.i4.0 - IL_0022: add - IL_0023: stloc.2 - IL_0024: ldloc.1 - IL_0025: ldc.i4.1 - IL_0026: add - IL_0027: stloc.1 - IL_0028: ldloc.1 - IL_0029: ldloc.0 - IL_002a: blt.un.s IL_001a - - IL_002c: ret + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld char ''.$assembly::c@1 + IL_0006: ret } .property char c() @@ -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..1c2e3d3e3cd 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 @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 { .field static assembly initonly class assembly/f8@40 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/f8@40::.ctor() + IL_0005: stsfld class assembly/f8@40 assembly/f8@40::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -59,21 +68,21 @@ IL_0004: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit f10@48 + extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 + { + .field static assembly initonly class assembly/f10@48 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/f8@40::.ctor() - IL_0005: stsfld class assembly/f8@40 assembly/f8@40::@_instance + IL_0000: newobj instance void assembly/f10@48::.ctor() + IL_0005: stsfld class assembly/f10@48 assembly/f10@48::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f10@48 - extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 - { - .field static assembly initonly class assembly/f10@48 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -96,21 +105,21 @@ IL_0004: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit f11@52 + extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 + { + .field static assembly initonly class assembly/f11@52 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/f10@48::.ctor() - IL_0005: stsfld class assembly/f10@48 assembly/f10@48::@_instance + IL_0000: newobj instance void assembly/f11@52::.ctor() + IL_0005: stsfld class assembly/f11@52 assembly/f11@52::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f11@52 - extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 - { - .field static assembly initonly class assembly/f11@52 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -133,21 +142,21 @@ IL_0004: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit f12@56 + extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 + { + .field static assembly initonly class assembly/f12@56 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/f11@52::.ctor() - IL_0005: stsfld class assembly/f11@52 assembly/f11@52::@_instance + IL_0000: newobj instance void assembly/f12@56::.ctor() + IL_0005: stsfld class assembly/f12@56 assembly/f12@56::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f12@56 - extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3 - { - .field static assembly initonly class assembly/f12@56 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -170,34 +179,19 @@ IL_0004: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/f12@56::.ctor() - IL_0005: stsfld class assembly/f12@56 assembly/f12@56::@_instance - IL_000a: ret - } - } .field static assembly char c@1 .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 char get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld char assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(char 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld char assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -287,6 +281,165 @@ IL_001a: ret } + .method public static void f10(char start, + char step, + char finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 7 + .locals init (uint32 V_0, + uint32 V_1, + char V_2) + IL_0000: ldarg.1 + IL_0001: ldc.i4.0 + IL_0002: bne.un.s IL_0016 + + IL_0004: ldc.i4.0 + IL_0005: ldsfld class assembly/f10@48 assembly/f10@48::@_instance + IL_000a: ldarg.2 + IL_000b: ldarg.1 + IL_000c: ldarg.2 + IL_000d: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeStepGeneric(!!0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !!1, + !!0, + !!1) + IL_0012: pop + IL_0013: nop + IL_0014: br.s IL_0017 + + IL_0016: nop + IL_0017: ldarg.2 + IL_0018: ldarg.2 + IL_0019: bge.un.s IL_001f + + IL_001b: ldc.i4.0 + IL_001c: nop + IL_001d: br.s IL_0028 + + IL_001f: ldarg.2 + IL_0020: ldarg.2 + IL_0021: sub + IL_0022: ldarg.1 + IL_0023: div.un + IL_0024: conv.u4 + IL_0025: ldc.i4.1 + IL_0026: add + IL_0027: nop + IL_0028: stloc.0 + IL_0029: ldc.i4.0 + IL_002a: stloc.1 + IL_002b: ldarg.2 + IL_002c: stloc.2 + IL_002d: br.s IL_003d + + IL_002f: ldloc.2 + IL_0030: call void assembly::set_c(char) + IL_0035: ldloc.2 + IL_0036: ldarg.1 + IL_0037: add + IL_0038: stloc.2 + IL_0039: ldloc.1 + IL_003a: ldc.i4.1 + IL_003b: add + IL_003c: stloc.1 + IL_003d: ldloc.1 + IL_003e: ldloc.0 + IL_003f: blt.un.s IL_002f + + IL_0041: ret + } + + .method public static void f11(char start, + char finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 7 + .locals init (char V_0, + char V_1, + char V_2) + IL_0000: ldc.i4.0 + IL_0001: ldsfld class assembly/f11@52 assembly/f11@52::@_instance + IL_0006: ldarg.0 + IL_0007: ldc.i4.0 + IL_0008: ldarg.1 + IL_0009: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeStepGeneric(!!0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !!1, + !!0, + !!1) + IL_000e: pop + IL_000f: ldc.i4.0 + IL_0010: stloc.0 + IL_0011: ldc.i4.0 + IL_0012: stloc.1 + IL_0013: ldarg.0 + IL_0014: stloc.2 + IL_0015: br.s IL_0025 + + IL_0017: ldloc.2 + IL_0018: call void assembly::set_c(char) + IL_001d: ldloc.2 + IL_001e: ldc.i4.0 + IL_001f: add + IL_0020: stloc.2 + IL_0021: ldloc.1 + IL_0022: ldc.i4.1 + IL_0023: add + IL_0024: stloc.1 + IL_0025: ldloc.1 + IL_0026: ldloc.0 + IL_0027: blt.un.s IL_0017 + + IL_0029: ret + } + + .method public static void f12() cil managed + { + + .maxstack 7 + .locals init (char V_0, + char V_1, + char V_2) + IL_0000: ldc.i4.0 + IL_0001: ldsfld class assembly/f12@56 assembly/f12@56::@_instance + IL_0006: ldc.i4.s 97 + IL_0008: ldc.i4.0 + IL_0009: ldc.i4.s 122 + IL_000b: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeStepGeneric(!!0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + !!1, + !!0, + !!1) + IL_0010: pop + IL_0011: ldc.i4.0 + IL_0012: stloc.0 + IL_0013: ldc.i4.0 + IL_0014: stloc.1 + IL_0015: ldc.i4.s 97 + IL_0017: stloc.2 + IL_0018: br.s IL_0028 + + IL_001a: ldloc.2 + IL_001b: call void assembly::set_c(char) + IL_0020: ldloc.2 + IL_0021: ldc.i4.0 + IL_0022: add + IL_0023: stloc.2 + IL_0024: ldloc.1 + IL_0025: ldc.i4.1 + IL_0026: add + IL_0027: stloc.1 + IL_0028: ldloc.1 + IL_0029: ldloc.0 + IL_002a: blt.un.s IL_001a + + IL_002c: ret + } + .method public static void f2(char start) cil managed { @@ -639,174 +792,21 @@ IL_002d: ret } - .method public static void f10(char start, - char step, - char finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 7 - .locals init (uint32 V_0, - uint32 V_1, - char V_2) - IL_0000: ldarg.1 - IL_0001: ldc.i4.0 - IL_0002: bne.un.s IL_0016 - - IL_0004: ldc.i4.0 - IL_0005: ldsfld class assembly/f10@48 assembly/f10@48::@_instance - IL_000a: ldarg.2 - IL_000b: ldarg.1 - IL_000c: ldarg.2 - IL_000d: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeStepGeneric(!!0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, - !!1, - !!0, - !!1) - IL_0012: pop - IL_0013: nop - IL_0014: br.s IL_0017 - - IL_0016: nop - IL_0017: ldarg.2 - IL_0018: ldarg.2 - IL_0019: bge.un.s IL_001f - - IL_001b: ldc.i4.0 - IL_001c: nop - IL_001d: br.s IL_0028 - - IL_001f: ldarg.2 - IL_0020: ldarg.2 - IL_0021: sub - IL_0022: ldarg.1 - IL_0023: div.un - IL_0024: conv.u4 - IL_0025: ldc.i4.1 - IL_0026: add - IL_0027: nop - IL_0028: stloc.0 - IL_0029: ldc.i4.0 - IL_002a: stloc.1 - IL_002b: ldarg.2 - IL_002c: stloc.2 - IL_002d: br.s IL_003d - - IL_002f: ldloc.2 - IL_0030: call void assembly::set_c(char) - IL_0035: ldloc.2 - IL_0036: ldarg.1 - IL_0037: add - IL_0038: stloc.2 - IL_0039: ldloc.1 - IL_003a: ldc.i4.1 - IL_003b: add - IL_003c: stloc.1 - IL_003d: ldloc.1 - IL_003e: ldloc.0 - IL_003f: blt.un.s IL_002f - - IL_0041: ret - } - - .method public static void f11(char start, - char finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 7 - .locals init (char V_0, - char V_1, - char V_2) - IL_0000: ldc.i4.0 - IL_0001: ldsfld class assembly/f11@52 assembly/f11@52::@_instance - IL_0006: ldarg.0 - IL_0007: ldc.i4.0 - IL_0008: ldarg.1 - IL_0009: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeStepGeneric(!!0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, - !!1, - !!0, - !!1) - IL_000e: pop - IL_000f: ldc.i4.0 - IL_0010: stloc.0 - IL_0011: ldc.i4.0 - IL_0012: stloc.1 - IL_0013: ldarg.0 - IL_0014: stloc.2 - IL_0015: br.s IL_0025 - - IL_0017: ldloc.2 - IL_0018: call void assembly::set_c(char) - IL_001d: ldloc.2 - IL_001e: ldc.i4.0 - IL_001f: add - IL_0020: stloc.2 - IL_0021: ldloc.1 - IL_0022: ldc.i4.1 - IL_0023: add - IL_0024: stloc.1 - IL_0025: ldloc.1 - IL_0026: ldloc.0 - IL_0027: blt.un.s IL_0017 - - IL_0029: ret - } - - .method public static void f12() cil managed + .method public specialname static char get_c() cil managed { - .maxstack 7 - .locals init (char V_0, - char V_1, - char V_2) - IL_0000: ldc.i4.0 - IL_0001: ldsfld class assembly/f12@56 assembly/f12@56::@_instance - IL_0006: ldc.i4.s 97 - IL_0008: ldc.i4.0 - IL_0009: ldc.i4.s 122 - IL_000b: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeStepGeneric(!!0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, - !!1, - !!0, - !!1) - IL_0010: pop - IL_0011: ldc.i4.0 - IL_0012: stloc.0 - IL_0013: ldc.i4.0 - IL_0014: stloc.1 - IL_0015: ldc.i4.s 97 - IL_0017: stloc.2 - IL_0018: br.s IL_0028 - - IL_001a: ldloc.2 - IL_001b: call void assembly::set_c(char) - IL_0020: ldloc.2 - IL_0021: ldc.i4.0 - IL_0022: add - IL_0023: stloc.2 - IL_0024: ldloc.1 - IL_0025: ldc.i4.1 - IL_0026: add - IL_0027: stloc.1 - IL_0028: ldloc.1 - IL_0029: ldloc.0 - IL_002a: blt.un.s IL_001a - - IL_002c: ret + .maxstack 8 + IL_0000: ldsfld char assembly::c@1 + IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static void set_c(char '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 char assembly::c@1 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -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..650d439f361 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 @@ -33,21 +33,15 @@ 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 public specialname static int16 get_c() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int16 ''.$assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(int16 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int16 ''.$assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -137,6 +131,238 @@ IL_0019: ret } + .method public static void f10(int16 start, + int16 step, + int16 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint32 V_0, + uint32 V_1, + int16 V_2) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt16(int16, + int16, + int16) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldc.i4.0 + IL_0011: ldarg.1 + IL_0012: bge.s IL_0027 + + IL_0014: ldarg.2 + IL_0015: ldarg.2 + IL_0016: bge.s IL_001c + + IL_0018: ldc.i4.0 + IL_0019: nop + IL_001a: br.s IL_003d + + IL_001c: ldarg.2 + IL_001d: ldarg.2 + IL_001e: sub + IL_001f: ldarg.1 + IL_0020: div.un + IL_0021: conv.i4 + IL_0022: ldc.i4.1 + IL_0023: add + IL_0024: nop + IL_0025: br.s IL_003d + + IL_0027: ldarg.2 + IL_0028: ldarg.2 + IL_0029: bge.s IL_002f + + IL_002b: ldc.i4.0 + IL_002c: nop + IL_002d: br.s IL_003d + + IL_002f: ldarg.2 + IL_0030: ldarg.2 + IL_0031: sub + IL_0032: ldarg.1 + IL_0033: not + IL_0034: ldc.i4.1 + IL_0035: add + IL_0036: div.un + IL_0037: conv.i4 + IL_0038: ldc.i4.1 + IL_0039: add + IL_003a: nop + IL_003b: br.s IL_003d + + IL_003d: stloc.0 + IL_003e: ldc.i4.0 + IL_003f: stloc.1 + IL_0040: ldarg.2 + IL_0041: stloc.2 + IL_0042: br.s IL_0052 + + IL_0044: ldloc.2 + IL_0045: call void assembly::set_c(int16) + IL_004a: ldloc.2 + IL_004b: ldarg.1 + IL_004c: add + IL_004d: stloc.2 + IL_004e: ldloc.1 + IL_004f: ldc.i4.1 + IL_0050: add + IL_0051: stloc.1 + IL_0052: ldloc.1 + IL_0053: ldloc.0 + IL_0054: blt.un.s IL_0044 + + IL_0056: ret + } + + .method public static void f11(int16 start, + int16 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (int16 V_0, + int16 V_1, + int16 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldarg.1 + IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt16(int16, + int16, + int16) + IL_0008: pop + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4.0 + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: stloc.2 + IL_000f: br.s IL_001f + + IL_0011: ldloc.2 + IL_0012: call void assembly::set_c(int16) + IL_0017: ldloc.2 + IL_0018: ldc.i4.0 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldloc.0 + IL_0021: blt.un.s IL_0011 + + IL_0023: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (int16 V_0, + int16 V_1, + int16 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.s 10 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt16(int16, + int16, + int16) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: stloc.0 + IL_000c: ldc.i4.0 + IL_000d: stloc.1 + IL_000e: ldc.i4.1 + IL_000f: stloc.2 + IL_0010: br.s IL_0020 + + IL_0012: ldloc.2 + IL_0013: call void assembly::set_c(int16) + IL_0018: ldloc.2 + IL_0019: ldc.i4.0 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldloc.0 + IL_0022: blt.un.s IL_0012 + + IL_0024: ret + } + + .method public static void f13() cil managed + { + + .maxstack 4 + .locals init (uint32 V_0, + int16 V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.s 10 + IL_0004: stloc.1 + IL_0005: br.s IL_0015 + + IL_0007: ldloc.1 + IL_0008: call void assembly::set_c(int16) + IL_000d: ldloc.1 + IL_000e: ldc.i4.m1 + IL_000f: add + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: ldc.i4.1 + IL_0013: add + IL_0014: stloc.0 + IL_0015: ldloc.0 + IL_0016: ldc.i4.s 10 + IL_0018: blt.un.s IL_0007 + + IL_001a: ret + } + + .method public static void f14() cil managed + { + + .maxstack 4 + .locals init (uint32 V_0, + int16 V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.s 10 + IL_0004: stloc.1 + IL_0005: br.s IL_0016 + + IL_0007: ldloc.1 + IL_0008: call void assembly::set_c(int16) + IL_000d: ldloc.1 + IL_000e: ldc.i4.s -2 + IL_0010: add + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldc.i4.1 + IL_0014: add + IL_0015: stloc.0 + IL_0016: ldloc.0 + IL_0017: ldc.i4.5 + IL_0018: blt.un.s IL_0007 + + IL_001a: ret + } + .method public static void f2(int16 start) cil managed { @@ -491,236 +717,21 @@ IL_002a: ret } - .method public static void f10(int16 start, - int16 step, - int16 finish) cil managed + .method public specialname static int16 get_c() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - .maxstack 5 - .locals init (uint32 V_0, - uint32 V_1, - int16 V_2) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt16(int16, - int16, - int16) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldc.i4.0 - IL_0011: ldarg.1 - IL_0012: bge.s IL_0027 - - IL_0014: ldarg.2 - IL_0015: ldarg.2 - IL_0016: bge.s IL_001c - - IL_0018: ldc.i4.0 - IL_0019: nop - IL_001a: br.s IL_003d - - IL_001c: ldarg.2 - IL_001d: ldarg.2 - IL_001e: sub - IL_001f: ldarg.1 - IL_0020: div.un - IL_0021: conv.i4 - IL_0022: ldc.i4.1 - IL_0023: add - IL_0024: nop - IL_0025: br.s IL_003d - - IL_0027: ldarg.2 - IL_0028: ldarg.2 - IL_0029: bge.s IL_002f - - IL_002b: ldc.i4.0 - IL_002c: nop - IL_002d: br.s IL_003d - - IL_002f: ldarg.2 - IL_0030: ldarg.2 - IL_0031: sub - IL_0032: ldarg.1 - IL_0033: not - IL_0034: ldc.i4.1 - IL_0035: add - IL_0036: div.un - IL_0037: conv.i4 - IL_0038: ldc.i4.1 - IL_0039: add - IL_003a: nop - IL_003b: br.s IL_003d - - IL_003d: stloc.0 - IL_003e: ldc.i4.0 - IL_003f: stloc.1 - IL_0040: ldarg.2 - IL_0041: stloc.2 - IL_0042: br.s IL_0052 - - IL_0044: ldloc.2 - IL_0045: call void assembly::set_c(int16) - IL_004a: ldloc.2 - IL_004b: ldarg.1 - IL_004c: add - IL_004d: stloc.2 - IL_004e: ldloc.1 - IL_004f: ldc.i4.1 - IL_0050: add - IL_0051: stloc.1 - IL_0052: ldloc.1 - IL_0053: ldloc.0 - IL_0054: blt.un.s IL_0044 - - IL_0056: ret + .maxstack 8 + IL_0000: ldsfld int16 ''.$assembly::c@1 + IL_0005: ret } - .method public static void f11(int16 start, - int16 finish) cil managed + .method public specialname static void set_c(int16 'value') cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 - .locals init (int16 V_0, - int16 V_1, - int16 V_2) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: ldarg.1 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt16(int16, - int16, - int16) - IL_0008: pop - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4.0 - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: stloc.2 - IL_000f: br.s IL_001f - - IL_0011: ldloc.2 - IL_0012: call void assembly::set_c(int16) - IL_0017: ldloc.2 - IL_0018: ldc.i4.0 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.0 - IL_0021: blt.un.s IL_0011 - - IL_0023: ret - } - - .method public static void f12() cil managed - { - - .maxstack 5 - .locals init (int16 V_0, - int16 V_1, - int16 V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.0 - IL_0002: ldc.i4.s 10 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt16(int16, - int16, - int16) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: ldc.i4.0 - IL_000d: stloc.1 - IL_000e: ldc.i4.1 - IL_000f: stloc.2 - IL_0010: br.s IL_0020 - - IL_0012: ldloc.2 - IL_0013: call void assembly::set_c(int16) - IL_0018: ldloc.2 - IL_0019: ldc.i4.0 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldloc.0 - IL_0022: blt.un.s IL_0012 - - IL_0024: ret - } - - .method public static void f13() cil managed - { - - .maxstack 4 - .locals init (uint32 V_0, - int16 V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.s 10 - IL_0004: stloc.1 - IL_0005: br.s IL_0015 - - IL_0007: ldloc.1 - IL_0008: call void assembly::set_c(int16) - IL_000d: ldloc.1 - IL_000e: ldc.i4.m1 - IL_000f: add - IL_0010: stloc.1 - IL_0011: ldloc.0 - IL_0012: ldc.i4.1 - IL_0013: add - IL_0014: stloc.0 - IL_0015: ldloc.0 - IL_0016: ldc.i4.s 10 - IL_0018: blt.un.s IL_0007 - - IL_001a: ret - } - - .method public static void f14() cil managed - { - - .maxstack 4 - .locals init (uint32 V_0, - int16 V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.s 10 - IL_0004: stloc.1 - IL_0005: br.s IL_0016 - - IL_0007: ldloc.1 - IL_0008: call void assembly::set_c(int16) - IL_000d: ldloc.1 - IL_000e: ldc.i4.s -2 - IL_0010: add - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldc.i4.1 - IL_0014: add - IL_0015: stloc.0 - IL_0016: ldloc.0 - IL_0017: ldc.i4.5 - IL_0018: blt.un.s IL_0007 - - IL_001a: ret + IL_0001: stsfld int16 ''.$assembly::c@1 + IL_0006: ret } .property int16 c() @@ -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..d26ad86bb32 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 @@ -35,21 +35,15 @@ .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 int16 c@1 .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 int16 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int16 assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(int16 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int16 assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -139,6 +133,238 @@ IL_0019: ret } + .method public static void f10(int16 start, + int16 step, + int16 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint32 V_0, + uint32 V_1, + int16 V_2) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt16(int16, + int16, + int16) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldc.i4.0 + IL_0011: ldarg.1 + IL_0012: bge.s IL_0027 + + IL_0014: ldarg.2 + IL_0015: ldarg.2 + IL_0016: bge.s IL_001c + + IL_0018: ldc.i4.0 + IL_0019: nop + IL_001a: br.s IL_003d + + IL_001c: ldarg.2 + IL_001d: ldarg.2 + IL_001e: sub + IL_001f: ldarg.1 + IL_0020: div.un + IL_0021: conv.i4 + IL_0022: ldc.i4.1 + IL_0023: add + IL_0024: nop + IL_0025: br.s IL_003d + + IL_0027: ldarg.2 + IL_0028: ldarg.2 + IL_0029: bge.s IL_002f + + IL_002b: ldc.i4.0 + IL_002c: nop + IL_002d: br.s IL_003d + + IL_002f: ldarg.2 + IL_0030: ldarg.2 + IL_0031: sub + IL_0032: ldarg.1 + IL_0033: not + IL_0034: ldc.i4.1 + IL_0035: add + IL_0036: div.un + IL_0037: conv.i4 + IL_0038: ldc.i4.1 + IL_0039: add + IL_003a: nop + IL_003b: br.s IL_003d + + IL_003d: stloc.0 + IL_003e: ldc.i4.0 + IL_003f: stloc.1 + IL_0040: ldarg.2 + IL_0041: stloc.2 + IL_0042: br.s IL_0052 + + IL_0044: ldloc.2 + IL_0045: call void assembly::set_c(int16) + IL_004a: ldloc.2 + IL_004b: ldarg.1 + IL_004c: add + IL_004d: stloc.2 + IL_004e: ldloc.1 + IL_004f: ldc.i4.1 + IL_0050: add + IL_0051: stloc.1 + IL_0052: ldloc.1 + IL_0053: ldloc.0 + IL_0054: blt.un.s IL_0044 + + IL_0056: ret + } + + .method public static void f11(int16 start, + int16 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (int16 V_0, + int16 V_1, + int16 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldarg.1 + IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt16(int16, + int16, + int16) + IL_0008: pop + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4.0 + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: stloc.2 + IL_000f: br.s IL_001f + + IL_0011: ldloc.2 + IL_0012: call void assembly::set_c(int16) + IL_0017: ldloc.2 + IL_0018: ldc.i4.0 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldloc.0 + IL_0021: blt.un.s IL_0011 + + IL_0023: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (int16 V_0, + int16 V_1, + int16 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.s 10 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt16(int16, + int16, + int16) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: stloc.0 + IL_000c: ldc.i4.0 + IL_000d: stloc.1 + IL_000e: ldc.i4.1 + IL_000f: stloc.2 + IL_0010: br.s IL_0020 + + IL_0012: ldloc.2 + IL_0013: call void assembly::set_c(int16) + IL_0018: ldloc.2 + IL_0019: ldc.i4.0 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldloc.0 + IL_0022: blt.un.s IL_0012 + + IL_0024: ret + } + + .method public static void f13() cil managed + { + + .maxstack 4 + .locals init (uint32 V_0, + int16 V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.s 10 + IL_0004: stloc.1 + IL_0005: br.s IL_0015 + + IL_0007: ldloc.1 + IL_0008: call void assembly::set_c(int16) + IL_000d: ldloc.1 + IL_000e: ldc.i4.m1 + IL_000f: add + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: ldc.i4.1 + IL_0013: add + IL_0014: stloc.0 + IL_0015: ldloc.0 + IL_0016: ldc.i4.s 10 + IL_0018: blt.un.s IL_0007 + + IL_001a: ret + } + + .method public static void f14() cil managed + { + + .maxstack 4 + .locals init (uint32 V_0, + int16 V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.s 10 + IL_0004: stloc.1 + IL_0005: br.s IL_0016 + + IL_0007: ldloc.1 + IL_0008: call void assembly::set_c(int16) + IL_000d: ldloc.1 + IL_000e: ldc.i4.s -2 + IL_0010: add + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldc.i4.1 + IL_0014: add + IL_0015: stloc.0 + IL_0016: ldloc.0 + IL_0017: ldc.i4.5 + IL_0018: blt.un.s IL_0007 + + IL_001a: ret + } + .method public static void f2(int16 start) cil managed { @@ -493,247 +719,21 @@ IL_002a: ret } - .method public static void f10(int16 start, - int16 step, - int16 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (uint32 V_0, - uint32 V_1, - int16 V_2) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt16(int16, - int16, - int16) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldc.i4.0 - IL_0011: ldarg.1 - IL_0012: bge.s IL_0027 - - IL_0014: ldarg.2 - IL_0015: ldarg.2 - IL_0016: bge.s IL_001c - - IL_0018: ldc.i4.0 - IL_0019: nop - IL_001a: br.s IL_003d - - IL_001c: ldarg.2 - IL_001d: ldarg.2 - IL_001e: sub - IL_001f: ldarg.1 - IL_0020: div.un - IL_0021: conv.i4 - IL_0022: ldc.i4.1 - IL_0023: add - IL_0024: nop - IL_0025: br.s IL_003d - - IL_0027: ldarg.2 - IL_0028: ldarg.2 - IL_0029: bge.s IL_002f - - IL_002b: ldc.i4.0 - IL_002c: nop - IL_002d: br.s IL_003d - - IL_002f: ldarg.2 - IL_0030: ldarg.2 - IL_0031: sub - IL_0032: ldarg.1 - IL_0033: not - IL_0034: ldc.i4.1 - IL_0035: add - IL_0036: div.un - IL_0037: conv.i4 - IL_0038: ldc.i4.1 - IL_0039: add - IL_003a: nop - IL_003b: br.s IL_003d - - IL_003d: stloc.0 - IL_003e: ldc.i4.0 - IL_003f: stloc.1 - IL_0040: ldarg.2 - IL_0041: stloc.2 - IL_0042: br.s IL_0052 - - IL_0044: ldloc.2 - IL_0045: call void assembly::set_c(int16) - IL_004a: ldloc.2 - IL_004b: ldarg.1 - IL_004c: add - IL_004d: stloc.2 - IL_004e: ldloc.1 - IL_004f: ldc.i4.1 - IL_0050: add - IL_0051: stloc.1 - IL_0052: ldloc.1 - IL_0053: ldloc.0 - IL_0054: blt.un.s IL_0044 - - IL_0056: ret - } - - .method public static void f11(int16 start, - int16 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 5 - .locals init (int16 V_0, - int16 V_1, - int16 V_2) - IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: ldarg.1 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt16(int16, - int16, - int16) - IL_0008: pop - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4.0 - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: stloc.2 - IL_000f: br.s IL_001f - - IL_0011: ldloc.2 - IL_0012: call void assembly::set_c(int16) - IL_0017: ldloc.2 - IL_0018: ldc.i4.0 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.0 - IL_0021: blt.un.s IL_0011 - - IL_0023: ret - } - - .method public static void f12() cil managed - { - - .maxstack 5 - .locals init (int16 V_0, - int16 V_1, - int16 V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.0 - IL_0002: ldc.i4.s 10 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt16(int16, - int16, - int16) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: ldc.i4.0 - IL_000d: stloc.1 - IL_000e: ldc.i4.1 - IL_000f: stloc.2 - IL_0010: br.s IL_0020 - - IL_0012: ldloc.2 - IL_0013: call void assembly::set_c(int16) - IL_0018: ldloc.2 - IL_0019: ldc.i4.0 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldloc.0 - IL_0022: blt.un.s IL_0012 - - IL_0024: ret - } - - .method public static void f13() cil managed - { - - .maxstack 4 - .locals init (uint32 V_0, - int16 V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.s 10 - IL_0004: stloc.1 - IL_0005: br.s IL_0015 - - IL_0007: ldloc.1 - IL_0008: call void assembly::set_c(int16) - IL_000d: ldloc.1 - IL_000e: ldc.i4.m1 - IL_000f: add - IL_0010: stloc.1 - IL_0011: ldloc.0 - IL_0012: ldc.i4.1 - IL_0013: add - IL_0014: stloc.0 - IL_0015: ldloc.0 - IL_0016: ldc.i4.s 10 - IL_0018: blt.un.s IL_0007 - - IL_001a: ret - } - - .method public static void f14() cil managed + .method public specialname static int16 get_c() cil managed { - .maxstack 4 - .locals init (uint32 V_0, - int16 V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.s 10 - IL_0004: stloc.1 - IL_0005: br.s IL_0016 - - IL_0007: ldloc.1 - IL_0008: call void assembly::set_c(int16) - IL_000d: ldloc.1 - IL_000e: ldc.i4.s -2 - IL_0010: add - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldc.i4.1 - IL_0014: add - IL_0015: stloc.0 - IL_0016: ldloc.0 - IL_0017: ldc.i4.5 - IL_0018: blt.un.s IL_0007 - - IL_001a: ret + .maxstack 8 + IL_0000: ldsfld int16 assembly::c@1 + IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static void set_c(int16 '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 int16 assembly::c@1 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -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..03febae95b1 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 @@ -33,21 +33,15 @@ 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 public specialname static int32 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(int32 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 ''.$assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -123,6 +117,250 @@ IL_0013: ret } + .method public static void f10(!!a start, + int32 step, + int32 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldc.i4.0 + IL_0011: ldarg.1 + IL_0012: bge.s IL_0029 + + IL_0014: ldarg.2 + IL_0015: ldarg.2 + IL_0016: bge.s IL_001d + + IL_0018: ldc.i4.0 + IL_0019: conv.i8 + IL_001a: nop + IL_001b: br.s IL_0041 + + IL_001d: ldarg.2 + IL_001e: ldarg.2 + IL_001f: sub + IL_0020: ldarg.1 + IL_0021: div.un + IL_0022: conv.i8 + IL_0023: ldc.i4.1 + IL_0024: conv.i8 + IL_0025: add + IL_0026: nop + IL_0027: br.s IL_0041 + + IL_0029: ldarg.2 + IL_002a: ldarg.2 + IL_002b: bge.s IL_0032 + + IL_002d: ldc.i4.0 + IL_002e: conv.i8 + IL_002f: nop + IL_0030: br.s IL_0041 + + IL_0032: ldarg.2 + IL_0033: ldarg.2 + IL_0034: sub + IL_0035: ldarg.1 + IL_0036: not + IL_0037: ldc.i4.1 + IL_0038: add + IL_0039: div.un + IL_003a: conv.i8 + IL_003b: ldc.i4.1 + IL_003c: conv.i8 + IL_003d: add + IL_003e: nop + IL_003f: br.s IL_0041 + + IL_0041: stloc.0 + IL_0042: ldc.i4.0 + IL_0043: conv.i8 + IL_0044: stloc.1 + IL_0045: ldarg.2 + IL_0046: stloc.2 + IL_0047: br.s IL_0058 + + IL_0049: ldloc.2 + IL_004a: call void assembly::set_c(int32) + IL_004f: ldloc.2 + IL_0050: ldarg.1 + IL_0051: add + IL_0052: stloc.2 + IL_0053: ldloc.1 + IL_0054: ldc.i4.1 + IL_0055: conv.i8 + IL_0056: add + IL_0057: stloc.1 + IL_0058: ldloc.1 + IL_0059: ldloc.0 + IL_005a: blt.un.s IL_0049 + + IL_005c: ret + } + + .method public static void f11(int32 start, + int32 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + int32 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldarg.1 + IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_0008: pop + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4.0 + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: stloc.2 + IL_000f: br.s IL_001f + + IL_0011: ldloc.2 + IL_0012: call void assembly::set_c(int32) + IL_0017: ldloc.2 + IL_0018: ldc.i4.0 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldloc.0 + IL_0021: blt.un.s IL_0011 + + IL_0023: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + int32 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.s 10 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: stloc.0 + IL_000c: ldc.i4.0 + IL_000d: stloc.1 + IL_000e: ldc.i4.1 + IL_000f: stloc.2 + IL_0010: br.s IL_0020 + + IL_0012: ldloc.2 + IL_0013: call void assembly::set_c(int32) + IL_0018: ldloc.2 + IL_0019: ldc.i4.0 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldloc.0 + IL_0022: blt.un.s IL_0012 + + IL_0024: ret + } + + .method public static void f13() cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + int32 V_1) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.0 + IL_0003: ldc.i4.s 10 + IL_0005: stloc.1 + IL_0006: br.s IL_0017 + + IL_0008: ldloc.1 + IL_0009: call void assembly::set_c(int32) + IL_000e: ldloc.1 + IL_000f: ldc.i4.m1 + IL_0010: add + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldc.i4.1 + IL_0014: conv.i8 + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldloc.0 + IL_0018: ldc.i4.s 10 + IL_001a: conv.i8 + IL_001b: blt.un.s IL_0008 + + IL_001d: ret + } + + .method public static void f14() cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + int32 V_1) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.0 + IL_0003: ldc.i4.s 10 + IL_0005: stloc.1 + IL_0006: br.s IL_0018 + + IL_0008: ldloc.1 + IL_0009: call void assembly::set_c(int32) + IL_000e: ldloc.1 + IL_000f: ldc.i4.s -2 + IL_0011: add + IL_0012: stloc.1 + IL_0013: ldloc.0 + IL_0014: ldc.i4.1 + IL_0015: conv.i8 + IL_0016: add + IL_0017: stloc.0 + IL_0018: ldloc.0 + IL_0019: ldc.i4.5 + IL_001a: conv.i8 + IL_001b: blt.un.s IL_0008 + + IL_001d: ret + } + .method public static void f2(int32 start) cil managed { @@ -437,248 +675,21 @@ IL_002e: ret } - .method public static void f10(!!a start, - int32 step, - int32 finish) cil managed + .method public specialname static int32 get_c() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - int32 V_2) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldc.i4.0 - IL_0011: ldarg.1 - IL_0012: bge.s IL_0029 - - IL_0014: ldarg.2 - IL_0015: ldarg.2 - IL_0016: bge.s IL_001d - - IL_0018: ldc.i4.0 - IL_0019: conv.i8 - IL_001a: nop - IL_001b: br.s IL_0041 - - IL_001d: ldarg.2 - IL_001e: ldarg.2 - IL_001f: sub - IL_0020: ldarg.1 - IL_0021: div.un - IL_0022: conv.i8 - IL_0023: ldc.i4.1 - IL_0024: conv.i8 - IL_0025: add - IL_0026: nop - IL_0027: br.s IL_0041 - - IL_0029: ldarg.2 - IL_002a: ldarg.2 - IL_002b: bge.s IL_0032 - - IL_002d: ldc.i4.0 - IL_002e: conv.i8 - IL_002f: nop - IL_0030: br.s IL_0041 - - IL_0032: ldarg.2 - IL_0033: ldarg.2 - IL_0034: sub - IL_0035: ldarg.1 - IL_0036: not - IL_0037: ldc.i4.1 - IL_0038: add - IL_0039: div.un - IL_003a: conv.i8 - IL_003b: ldc.i4.1 - IL_003c: conv.i8 - IL_003d: add - IL_003e: nop - IL_003f: br.s IL_0041 - - IL_0041: stloc.0 - IL_0042: ldc.i4.0 - IL_0043: conv.i8 - IL_0044: stloc.1 - IL_0045: ldarg.2 - IL_0046: stloc.2 - IL_0047: br.s IL_0058 - - IL_0049: ldloc.2 - IL_004a: call void assembly::set_c(int32) - IL_004f: ldloc.2 - IL_0050: ldarg.1 - IL_0051: add - IL_0052: stloc.2 - IL_0053: ldloc.1 - IL_0054: ldc.i4.1 - IL_0055: conv.i8 - IL_0056: add - IL_0057: stloc.1 - IL_0058: ldloc.1 - IL_0059: ldloc.0 - IL_005a: blt.un.s IL_0049 - - IL_005c: ret + .maxstack 8 + IL_0000: ldsfld int32 ''.$assembly::c@1 + IL_0005: ret } - .method public static void f11(int32 start, - int32 finish) cil managed + .method public specialname static void set_c(int32 'value') cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 - .locals init (int32 V_0, - int32 V_1, - int32 V_2) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: ldarg.1 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_0008: pop - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4.0 - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: stloc.2 - IL_000f: br.s IL_001f - - IL_0011: ldloc.2 - IL_0012: call void assembly::set_c(int32) - IL_0017: ldloc.2 - IL_0018: ldc.i4.0 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.0 - IL_0021: blt.un.s IL_0011 - - IL_0023: ret - } - - .method public static void f12() cil managed - { - - .maxstack 5 - .locals init (int32 V_0, - int32 V_1, - int32 V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.0 - IL_0002: ldc.i4.s 10 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: ldc.i4.0 - IL_000d: stloc.1 - IL_000e: ldc.i4.1 - IL_000f: stloc.2 - IL_0010: br.s IL_0020 - - IL_0012: ldloc.2 - IL_0013: call void assembly::set_c(int32) - IL_0018: ldloc.2 - IL_0019: ldc.i4.0 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldloc.0 - IL_0022: blt.un.s IL_0012 - - IL_0024: ret - } - - .method public static void f13() cil managed - { - - .maxstack 4 - .locals init (uint64 V_0, - int32 V_1) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.s 10 - IL_0005: stloc.1 - IL_0006: br.s IL_0017 - - IL_0008: ldloc.1 - IL_0009: call void assembly::set_c(int32) - IL_000e: ldloc.1 - IL_000f: ldc.i4.m1 - IL_0010: add - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldc.i4.1 - IL_0014: conv.i8 - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldloc.0 - IL_0018: ldc.i4.s 10 - IL_001a: conv.i8 - IL_001b: blt.un.s IL_0008 - - IL_001d: ret - } - - .method public static void f14() cil managed - { - - .maxstack 4 - .locals init (uint64 V_0, - int32 V_1) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.s 10 - IL_0005: stloc.1 - IL_0006: br.s IL_0018 - - IL_0008: ldloc.1 - IL_0009: call void assembly::set_c(int32) - IL_000e: ldloc.1 - IL_000f: ldc.i4.s -2 - IL_0011: add - IL_0012: stloc.1 - IL_0013: ldloc.0 - IL_0014: ldc.i4.1 - IL_0015: conv.i8 - IL_0016: add - IL_0017: stloc.0 - IL_0018: ldloc.0 - IL_0019: ldc.i4.5 - IL_001a: conv.i8 - IL_001b: blt.un.s IL_0008 - - IL_001d: ret + IL_0001: stsfld int32 ''.$assembly::c@1 + IL_0006: ret } .property int32 c() @@ -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..d198d33f39a 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 @@ -35,21 +35,15 @@ .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 int32 c@1 .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 int32 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(int32 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -125,6 +119,250 @@ IL_0013: ret } + .method public static void f10(!!a start, + int32 step, + int32 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldc.i4.0 + IL_0011: ldarg.1 + IL_0012: bge.s IL_0029 + + IL_0014: ldarg.2 + IL_0015: ldarg.2 + IL_0016: bge.s IL_001d + + IL_0018: ldc.i4.0 + IL_0019: conv.i8 + IL_001a: nop + IL_001b: br.s IL_0041 + + IL_001d: ldarg.2 + IL_001e: ldarg.2 + IL_001f: sub + IL_0020: ldarg.1 + IL_0021: div.un + IL_0022: conv.i8 + IL_0023: ldc.i4.1 + IL_0024: conv.i8 + IL_0025: add + IL_0026: nop + IL_0027: br.s IL_0041 + + IL_0029: ldarg.2 + IL_002a: ldarg.2 + IL_002b: bge.s IL_0032 + + IL_002d: ldc.i4.0 + IL_002e: conv.i8 + IL_002f: nop + IL_0030: br.s IL_0041 + + IL_0032: ldarg.2 + IL_0033: ldarg.2 + IL_0034: sub + IL_0035: ldarg.1 + IL_0036: not + IL_0037: ldc.i4.1 + IL_0038: add + IL_0039: div.un + IL_003a: conv.i8 + IL_003b: ldc.i4.1 + IL_003c: conv.i8 + IL_003d: add + IL_003e: nop + IL_003f: br.s IL_0041 + + IL_0041: stloc.0 + IL_0042: ldc.i4.0 + IL_0043: conv.i8 + IL_0044: stloc.1 + IL_0045: ldarg.2 + IL_0046: stloc.2 + IL_0047: br.s IL_0058 + + IL_0049: ldloc.2 + IL_004a: call void assembly::set_c(int32) + IL_004f: ldloc.2 + IL_0050: ldarg.1 + IL_0051: add + IL_0052: stloc.2 + IL_0053: ldloc.1 + IL_0054: ldc.i4.1 + IL_0055: conv.i8 + IL_0056: add + IL_0057: stloc.1 + IL_0058: ldloc.1 + IL_0059: ldloc.0 + IL_005a: blt.un.s IL_0049 + + IL_005c: ret + } + + .method public static void f11(int32 start, + int32 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + int32 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldarg.1 + IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_0008: pop + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4.0 + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: stloc.2 + IL_000f: br.s IL_001f + + IL_0011: ldloc.2 + IL_0012: call void assembly::set_c(int32) + IL_0017: ldloc.2 + IL_0018: ldc.i4.0 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldloc.0 + IL_0021: blt.un.s IL_0011 + + IL_0023: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + int32 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.s 10 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: stloc.0 + IL_000c: ldc.i4.0 + IL_000d: stloc.1 + IL_000e: ldc.i4.1 + IL_000f: stloc.2 + IL_0010: br.s IL_0020 + + IL_0012: ldloc.2 + IL_0013: call void assembly::set_c(int32) + IL_0018: ldloc.2 + IL_0019: ldc.i4.0 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldloc.0 + IL_0022: blt.un.s IL_0012 + + IL_0024: ret + } + + .method public static void f13() cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + int32 V_1) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.0 + IL_0003: ldc.i4.s 10 + IL_0005: stloc.1 + IL_0006: br.s IL_0017 + + IL_0008: ldloc.1 + IL_0009: call void assembly::set_c(int32) + IL_000e: ldloc.1 + IL_000f: ldc.i4.m1 + IL_0010: add + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldc.i4.1 + IL_0014: conv.i8 + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldloc.0 + IL_0018: ldc.i4.s 10 + IL_001a: conv.i8 + IL_001b: blt.un.s IL_0008 + + IL_001d: ret + } + + .method public static void f14() cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + int32 V_1) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.0 + IL_0003: ldc.i4.s 10 + IL_0005: stloc.1 + IL_0006: br.s IL_0018 + + IL_0008: ldloc.1 + IL_0009: call void assembly::set_c(int32) + IL_000e: ldloc.1 + IL_000f: ldc.i4.s -2 + IL_0011: add + IL_0012: stloc.1 + IL_0013: ldloc.0 + IL_0014: ldc.i4.1 + IL_0015: conv.i8 + IL_0016: add + IL_0017: stloc.0 + IL_0018: ldloc.0 + IL_0019: ldc.i4.5 + IL_001a: conv.i8 + IL_001b: blt.un.s IL_0008 + + IL_001d: ret + } + .method public static void f2(int32 start) cil managed { @@ -439,259 +677,21 @@ IL_002e: ret } - .method public static void f10(!!a start, - int32 step, - int32 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - int32 V_2) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldc.i4.0 - IL_0011: ldarg.1 - IL_0012: bge.s IL_0029 - - IL_0014: ldarg.2 - IL_0015: ldarg.2 - IL_0016: bge.s IL_001d - - IL_0018: ldc.i4.0 - IL_0019: conv.i8 - IL_001a: nop - IL_001b: br.s IL_0041 - - IL_001d: ldarg.2 - IL_001e: ldarg.2 - IL_001f: sub - IL_0020: ldarg.1 - IL_0021: div.un - IL_0022: conv.i8 - IL_0023: ldc.i4.1 - IL_0024: conv.i8 - IL_0025: add - IL_0026: nop - IL_0027: br.s IL_0041 - - IL_0029: ldarg.2 - IL_002a: ldarg.2 - IL_002b: bge.s IL_0032 - - IL_002d: ldc.i4.0 - IL_002e: conv.i8 - IL_002f: nop - IL_0030: br.s IL_0041 - - IL_0032: ldarg.2 - IL_0033: ldarg.2 - IL_0034: sub - IL_0035: ldarg.1 - IL_0036: not - IL_0037: ldc.i4.1 - IL_0038: add - IL_0039: div.un - IL_003a: conv.i8 - IL_003b: ldc.i4.1 - IL_003c: conv.i8 - IL_003d: add - IL_003e: nop - IL_003f: br.s IL_0041 - - IL_0041: stloc.0 - IL_0042: ldc.i4.0 - IL_0043: conv.i8 - IL_0044: stloc.1 - IL_0045: ldarg.2 - IL_0046: stloc.2 - IL_0047: br.s IL_0058 - - IL_0049: ldloc.2 - IL_004a: call void assembly::set_c(int32) - IL_004f: ldloc.2 - IL_0050: ldarg.1 - IL_0051: add - IL_0052: stloc.2 - IL_0053: ldloc.1 - IL_0054: ldc.i4.1 - IL_0055: conv.i8 - IL_0056: add - IL_0057: stloc.1 - IL_0058: ldloc.1 - IL_0059: ldloc.0 - IL_005a: blt.un.s IL_0049 - - IL_005c: ret - } - - .method public static void f11(int32 start, - int32 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 5 - .locals init (int32 V_0, - int32 V_1, - int32 V_2) - IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: ldarg.1 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_0008: pop - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4.0 - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: stloc.2 - IL_000f: br.s IL_001f - - IL_0011: ldloc.2 - IL_0012: call void assembly::set_c(int32) - IL_0017: ldloc.2 - IL_0018: ldc.i4.0 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.0 - IL_0021: blt.un.s IL_0011 - - IL_0023: ret - } - - .method public static void f12() cil managed - { - - .maxstack 5 - .locals init (int32 V_0, - int32 V_1, - int32 V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.0 - IL_0002: ldc.i4.s 10 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: ldc.i4.0 - IL_000d: stloc.1 - IL_000e: ldc.i4.1 - IL_000f: stloc.2 - IL_0010: br.s IL_0020 - - IL_0012: ldloc.2 - IL_0013: call void assembly::set_c(int32) - IL_0018: ldloc.2 - IL_0019: ldc.i4.0 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldloc.0 - IL_0022: blt.un.s IL_0012 - - IL_0024: ret - } - - .method public static void f13() cil managed - { - - .maxstack 4 - .locals init (uint64 V_0, - int32 V_1) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.s 10 - IL_0005: stloc.1 - IL_0006: br.s IL_0017 - - IL_0008: ldloc.1 - IL_0009: call void assembly::set_c(int32) - IL_000e: ldloc.1 - IL_000f: ldc.i4.m1 - IL_0010: add - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldc.i4.1 - IL_0014: conv.i8 - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldloc.0 - IL_0018: ldc.i4.s 10 - IL_001a: conv.i8 - IL_001b: blt.un.s IL_0008 - - IL_001d: ret - } - - .method public static void f14() cil managed + .method public specialname static int32 get_c() cil managed { - .maxstack 4 - .locals init (uint64 V_0, - int32 V_1) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.s 10 - IL_0005: stloc.1 - IL_0006: br.s IL_0018 - - IL_0008: ldloc.1 - IL_0009: call void assembly::set_c(int32) - IL_000e: ldloc.1 - IL_000f: ldc.i4.s -2 - IL_0011: add - IL_0012: stloc.1 - IL_0013: ldloc.0 - IL_0014: ldc.i4.1 - IL_0015: conv.i8 - IL_0016: add - IL_0017: stloc.0 - IL_0018: ldloc.0 - IL_0019: ldc.i4.5 - IL_001a: conv.i8 - IL_001b: blt.un.s IL_0008 - - IL_001d: ret + .maxstack 8 + IL_0000: ldsfld int32 assembly::c@1 + IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static void set_c(int32 '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 int32 assembly::c@1 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -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..5924a34d319 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 @@ -33,21 +33,15 @@ 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 public specialname static int64 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int64 ''.$assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(int64 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int64 ''.$assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -152,250 +146,281 @@ IL_001e: ret } - .method public static void f2(int64 start) cil managed + .method public static void f10(int64 start, + int64 step, + int64 finish) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) - .maxstack 4 + .maxstack 5 .locals init (uint64 V_0, - uint64 V_1, - int64 V_2) - IL_0000: ldc.i4.s 10 - IL_0002: conv.i8 - IL_0003: ldarg.0 - IL_0004: bge.s IL_000b + bool V_1, + uint64 V_2, + int64 V_3, + uint64 V_4) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f - IL_0006: ldc.i4.0 - IL_0007: conv.i8 - IL_0008: nop - IL_0009: br.s IL_0014 + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, + int64, + int64) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 - IL_000b: ldc.i4.s 10 - IL_000d: conv.i8 - IL_000e: ldarg.0 - IL_000f: sub - IL_0010: ldc.i4.1 + IL_000f: nop + IL_0010: ldc.i4.0 IL_0011: conv.i8 - IL_0012: add.ovf.un - IL_0013: nop - IL_0014: stloc.0 - IL_0015: ldc.i4.0 - IL_0016: conv.i8 - IL_0017: stloc.1 - IL_0018: ldarg.0 - IL_0019: stloc.2 - IL_001a: br.s IL_002c + IL_0012: ldarg.1 + IL_0013: bge.s IL_0026 - IL_001c: ldloc.2 - IL_001d: call void assembly::set_c(int64) - IL_0022: ldloc.2 - IL_0023: ldc.i4.1 - IL_0024: conv.i8 - IL_0025: add - IL_0026: stloc.2 - IL_0027: ldloc.1 - IL_0028: ldc.i4.1 - IL_0029: conv.i8 - IL_002a: add - IL_002b: stloc.1 - IL_002c: ldloc.1 - IL_002d: ldloc.0 - IL_002e: blt.un.s IL_001c + IL_0015: ldarg.2 + IL_0016: ldarg.2 + IL_0017: bge.s IL_001e - IL_0030: ret - } + IL_0019: ldc.i4.0 + IL_001a: conv.i8 + IL_001b: nop + IL_001c: br.s IL_003b - .method public static void f3(int64 finish) cil managed - { - - .maxstack 4 - .locals init (uint64 V_0, - uint64 V_1, - int64 V_2) - IL_0000: ldarg.0 - IL_0001: ldc.i4.1 - IL_0002: conv.i8 - IL_0003: bge.s IL_000a + IL_001e: ldarg.2 + IL_001f: ldarg.2 + IL_0020: sub + IL_0021: ldarg.1 + IL_0022: div.un + IL_0023: nop + IL_0024: br.s IL_003b - IL_0005: ldc.i4.0 - IL_0006: conv.i8 - IL_0007: nop - IL_0008: br.s IL_0012 + IL_0026: ldarg.2 + IL_0027: ldarg.2 + IL_0028: bge.s IL_002f - IL_000a: ldarg.0 - IL_000b: ldc.i4.1 - IL_000c: conv.i8 - IL_000d: sub - IL_000e: ldc.i4.1 - IL_000f: conv.i8 - IL_0010: add.ovf.un - IL_0011: nop - IL_0012: stloc.0 - IL_0013: ldc.i4.0 - IL_0014: conv.i8 - IL_0015: stloc.1 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: stloc.2 - IL_0019: br.s IL_002b + IL_002a: ldc.i4.0 + IL_002b: conv.i8 + IL_002c: nop + IL_002d: br.s IL_003b - IL_001b: ldloc.2 - IL_001c: call void assembly::set_c(int64) - IL_0021: ldloc.2 - IL_0022: ldc.i4.1 - IL_0023: conv.i8 - IL_0024: add - IL_0025: stloc.2 - IL_0026: ldloc.1 - IL_0027: ldc.i4.1 - IL_0028: conv.i8 - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: ldloc.0 - IL_002d: blt.un.s IL_001b + IL_002f: ldarg.2 + IL_0030: ldarg.2 + IL_0031: sub + IL_0032: ldarg.1 + IL_0033: not + IL_0034: ldc.i4.1 + IL_0035: conv.i8 + IL_0036: add + IL_0037: div.un + IL_0038: nop + IL_0039: br.s IL_003b - IL_002f: ret - } + IL_003b: stloc.0 + IL_003c: ldloc.0 + IL_003d: ldc.i4.m1 + IL_003e: conv.i8 + IL_003f: bne.un.s IL_0063 - .method public static void f4(int64 start, - int64 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 4 - .locals init (uint64 V_0, - bool V_1, - uint64 V_2, - int64 V_3, - uint64 V_4) - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: bge.s IL_0009 + IL_0041: ldc.i4.1 + IL_0042: stloc.1 + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: stloc.2 + IL_0046: ldarg.2 + IL_0047: stloc.3 + IL_0048: br.s IL_005f - IL_0004: ldc.i4.0 - IL_0005: conv.i8 - IL_0006: nop - IL_0007: br.s IL_000d + IL_004a: ldloc.3 + IL_004b: call void assembly::set_c(int64) + IL_0050: ldloc.3 + IL_0051: ldarg.1 + IL_0052: add + IL_0053: stloc.3 + IL_0054: ldloc.2 + IL_0055: ldc.i4.1 + IL_0056: conv.i8 + IL_0057: add + IL_0058: stloc.2 + IL_0059: ldloc.2 + IL_005a: ldc.i4.0 + IL_005b: conv.i8 + IL_005c: cgt.un + IL_005e: stloc.1 + IL_005f: ldloc.1 + IL_0060: brtrue.s IL_004a - IL_0009: ldarg.1 - IL_000a: ldarg.0 - IL_000b: sub - IL_000c: nop - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: ldc.i4.m1 - IL_0010: conv.i8 - IL_0011: bne.un.s IL_0036 + IL_0062: ret - IL_0013: ldc.i4.1 - IL_0014: stloc.1 - IL_0015: ldc.i4.0 - IL_0016: conv.i8 - IL_0017: stloc.2 - IL_0018: ldarg.0 - IL_0019: stloc.3 - IL_001a: br.s IL_0032 + IL_0063: ldc.i4.0 + IL_0064: conv.i8 + IL_0065: ldarg.1 + IL_0066: bge.s IL_007c - IL_001c: ldloc.3 - IL_001d: call void assembly::set_c(int64) - IL_0022: ldloc.3 - IL_0023: ldc.i4.1 - IL_0024: conv.i8 - IL_0025: add - IL_0026: stloc.3 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: conv.i8 - IL_002a: add - IL_002b: stloc.2 - IL_002c: ldloc.2 - IL_002d: ldc.i4.0 - IL_002e: conv.i8 - IL_002f: cgt.un - IL_0031: stloc.1 - IL_0032: ldloc.1 - IL_0033: brtrue.s IL_001c + IL_0068: ldarg.2 + IL_0069: ldarg.2 + IL_006a: bge.s IL_0071 - IL_0035: ret + IL_006c: ldc.i4.0 + IL_006d: conv.i8 + IL_006e: nop + IL_006f: br.s IL_0094 - IL_0036: ldarg.1 - IL_0037: ldarg.0 - IL_0038: bge.s IL_003f + IL_0071: ldarg.2 + IL_0072: ldarg.2 + IL_0073: sub + IL_0074: ldarg.1 + IL_0075: div.un + IL_0076: ldc.i4.1 + IL_0077: conv.i8 + IL_0078: add.ovf.un + IL_0079: nop + IL_007a: br.s IL_0094 - IL_003a: ldc.i4.0 - IL_003b: conv.i8 - IL_003c: nop - IL_003d: br.s IL_0046 + IL_007c: ldarg.2 + IL_007d: ldarg.2 + IL_007e: bge.s IL_0085 - IL_003f: ldarg.1 - IL_0040: ldarg.0 - IL_0041: sub - IL_0042: ldc.i4.1 - IL_0043: conv.i8 - IL_0044: add.ovf.un - IL_0045: nop - IL_0046: stloc.2 - IL_0047: ldc.i4.0 - IL_0048: conv.i8 - IL_0049: stloc.s V_4 - IL_004b: ldarg.0 - IL_004c: stloc.3 - IL_004d: br.s IL_0061 + IL_0080: ldc.i4.0 + IL_0081: conv.i8 + IL_0082: nop + IL_0083: br.s IL_0094 - IL_004f: ldloc.3 - IL_0050: call void assembly::set_c(int64) - IL_0055: ldloc.3 - IL_0056: ldc.i4.1 - IL_0057: conv.i8 - IL_0058: add - IL_0059: stloc.3 - IL_005a: ldloc.s V_4 - IL_005c: ldc.i4.1 - IL_005d: conv.i8 - IL_005e: add - IL_005f: stloc.s V_4 - IL_0061: ldloc.s V_4 - IL_0063: ldloc.2 - IL_0064: blt.un.s IL_004f + IL_0085: ldarg.2 + IL_0086: ldarg.2 + IL_0087: sub + IL_0088: ldarg.1 + IL_0089: not + IL_008a: ldc.i4.1 + IL_008b: conv.i8 + IL_008c: add + IL_008d: div.un + IL_008e: ldc.i4.1 + IL_008f: conv.i8 + IL_0090: add.ovf.un + IL_0091: nop + IL_0092: br.s IL_0094 - IL_0066: ret + IL_0094: stloc.2 + IL_0095: ldc.i4.0 + IL_0096: conv.i8 + IL_0097: stloc.s V_4 + IL_0099: ldarg.2 + IL_009a: stloc.3 + IL_009b: br.s IL_00ae + + IL_009d: ldloc.3 + IL_009e: call void assembly::set_c(int64) + IL_00a3: ldloc.3 + IL_00a4: ldarg.1 + IL_00a5: add + IL_00a6: stloc.3 + IL_00a7: ldloc.s V_4 + IL_00a9: ldc.i4.1 + IL_00aa: conv.i8 + IL_00ab: add + IL_00ac: stloc.s V_4 + IL_00ae: ldloc.s V_4 + IL_00b0: ldloc.2 + IL_00b1: blt.un.s IL_009d + + IL_00b3: ret } - .method public static void f5() cil managed + .method public static void f11(int64 start, + int64 finish) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 4 - .locals init (uint64 V_0, - int64 V_1) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.1 - IL_0004: conv.i8 - IL_0005: stloc.1 - IL_0006: br.s IL_0018 + .maxstack 5 + .locals init (int64 V_0, + int64 V_1, + int64 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: conv.i8 + IL_0003: ldarg.1 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, + int64, + int64) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: conv.i8 + IL_000c: stloc.0 + IL_000d: ldc.i4.0 + IL_000e: conv.i8 + IL_000f: stloc.1 + IL_0010: ldarg.0 + IL_0011: stloc.2 + IL_0012: br.s IL_0024 - IL_0008: ldloc.1 - IL_0009: call void assembly::set_c(int64) - IL_000e: ldloc.1 - IL_000f: ldc.i4.1 - IL_0010: conv.i8 - IL_0011: add + IL_0014: ldloc.2 + IL_0015: call void assembly::set_c(int64) + IL_001a: ldloc.2 + IL_001b: ldc.i4.0 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.2 + IL_001f: ldloc.1 + IL_0020: ldc.i4.1 + IL_0021: conv.i8 + IL_0022: add + IL_0023: stloc.1 + IL_0024: ldloc.1 + IL_0025: ldloc.0 + IL_0026: blt.un.s IL_0014 + + IL_0028: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (int64 V_0, + int64 V_1, + int64 V_2) + IL_0000: ldc.i4.1 + IL_0001: conv.i8 + IL_0002: ldc.i4.0 + IL_0003: conv.i8 + IL_0004: ldc.i4.s 10 + IL_0006: conv.i8 + IL_0007: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, + int64, + int64) + IL_000c: pop + IL_000d: ldc.i4.0 + IL_000e: conv.i8 + IL_000f: stloc.0 + IL_0010: ldc.i4.0 + IL_0011: conv.i8 IL_0012: stloc.1 - IL_0013: ldloc.0 - IL_0014: ldc.i4.1 - IL_0015: conv.i8 - IL_0016: add - IL_0017: stloc.0 - IL_0018: ldloc.0 - IL_0019: ldc.i4.s 10 - IL_001b: conv.i8 - IL_001c: blt.un.s IL_0008 + IL_0013: ldc.i4.1 + IL_0014: conv.i8 + IL_0015: stloc.2 + IL_0016: br.s IL_0028 - IL_001e: ret + IL_0018: ldloc.2 + IL_0019: call void assembly::set_c(int64) + IL_001e: ldloc.2 + IL_001f: ldc.i4.0 + IL_0020: conv.i8 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.1 + IL_0024: ldc.i4.1 + IL_0025: conv.i8 + IL_0026: add + IL_0027: stloc.1 + IL_0028: ldloc.1 + IL_0029: ldloc.0 + IL_002a: blt.un.s IL_0018 + + IL_002c: ret } - .method public static void f6() cil managed + .method public static void f13() cil managed { .maxstack 4 @@ -404,37 +429,71 @@ IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.0 - IL_0003: ldc.i4.1 - IL_0004: conv.i8 - IL_0005: stloc.1 - IL_0006: br.s IL_0018 + IL_0003: ldc.i4.s 10 + IL_0005: conv.i8 + IL_0006: stloc.1 + IL_0007: br.s IL_0019 - IL_0008: ldloc.1 - IL_0009: call void assembly::set_c(int64) - IL_000e: ldloc.1 - IL_000f: ldc.i4.2 - IL_0010: conv.i8 - IL_0011: add - IL_0012: stloc.1 - IL_0013: ldloc.0 - IL_0014: ldc.i4.1 - IL_0015: conv.i8 - IL_0016: add - IL_0017: stloc.0 - IL_0018: ldloc.0 - IL_0019: ldc.i4.5 - IL_001a: conv.i8 - IL_001b: blt.un.s IL_0008 + IL_0009: ldloc.1 + IL_000a: call void assembly::set_c(int64) + IL_000f: ldloc.1 + IL_0010: ldc.i4.m1 + IL_0011: conv.i8 + IL_0012: add + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: ldc.i4.1 + IL_0016: conv.i8 + IL_0017: add + IL_0018: stloc.0 + IL_0019: ldloc.0 + IL_001a: ldc.i4.s 10 + IL_001c: conv.i8 + IL_001d: blt.un.s IL_0009 - IL_001d: ret + IL_001f: ret } - .method public static void f7(int64 start) cil managed + .method public static void f14() cil managed { .maxstack 4 .locals init (uint64 V_0, - uint64 V_1, + int64 V_1) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.0 + IL_0003: ldc.i4.s 10 + IL_0005: conv.i8 + IL_0006: stloc.1 + IL_0007: br.s IL_001a + + IL_0009: ldloc.1 + IL_000a: call void assembly::set_c(int64) + IL_000f: ldloc.1 + IL_0010: ldc.i4.s -2 + IL_0012: conv.i8 + IL_0013: add + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: ldc.i4.1 + IL_0017: conv.i8 + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldloc.0 + IL_001b: ldc.i4.5 + IL_001c: conv.i8 + IL_001d: blt.un.s IL_0009 + + IL_001f: ret + } + + .method public static void f2(int64 start) cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + uint64 V_1, int64 V_2) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 @@ -444,115 +503,44 @@ IL_0006: ldc.i4.0 IL_0007: conv.i8 IL_0008: nop - IL_0009: br.s IL_0017 + IL_0009: br.s IL_0014 IL_000b: ldc.i4.s 10 IL_000d: conv.i8 IL_000e: ldarg.0 IL_000f: sub - IL_0010: ldc.i4.2 + IL_0010: ldc.i4.1 IL_0011: conv.i8 - IL_0012: div.un - IL_0013: ldc.i4.1 - IL_0014: conv.i8 - IL_0015: add.ovf.un - IL_0016: nop - IL_0017: stloc.0 - IL_0018: ldc.i4.0 - IL_0019: conv.i8 - IL_001a: stloc.1 - IL_001b: ldarg.0 - IL_001c: stloc.2 - IL_001d: br.s IL_002f - - IL_001f: ldloc.2 - IL_0020: call void assembly::set_c(int64) - IL_0025: ldloc.2 - IL_0026: ldc.i4.2 - IL_0027: conv.i8 - IL_0028: add - IL_0029: stloc.2 - IL_002a: ldloc.1 - IL_002b: ldc.i4.1 - IL_002c: conv.i8 - IL_002d: add - IL_002e: stloc.1 - IL_002f: ldloc.1 - IL_0030: ldloc.0 - IL_0031: blt.un.s IL_001f - - IL_0033: ret - } - - .method public static void f8(int64 step) cil managed - { - - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - int64 V_2) - IL_0000: ldarg.0 - IL_0001: brtrue.s IL_0012 - - IL_0003: ldc.i4.1 - IL_0004: conv.i8 - IL_0005: ldarg.0 - IL_0006: ldc.i4.s 10 - IL_0008: conv.i8 - IL_0009: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, - int64, - int64) - IL_000e: pop - IL_000f: nop - IL_0010: br.s IL_0013 - - IL_0012: nop - IL_0013: ldc.i4.0 - IL_0014: conv.i8 - IL_0015: ldarg.0 - IL_0016: bge.s IL_0023 - - IL_0018: ldc.i4.s 9 - IL_001a: conv.i8 - IL_001b: ldarg.0 - IL_001c: div.un - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: add.ovf.un - IL_0020: nop - IL_0021: br.s IL_0026 + IL_0012: add.ovf.un + IL_0013: nop + IL_0014: stloc.0 + IL_0015: ldc.i4.0 + IL_0016: conv.i8 + IL_0017: stloc.1 + IL_0018: ldarg.0 + IL_0019: stloc.2 + IL_001a: br.s IL_002c - IL_0023: ldc.i4.0 + IL_001c: ldloc.2 + IL_001d: call void assembly::set_c(int64) + IL_0022: ldloc.2 + IL_0023: ldc.i4.1 IL_0024: conv.i8 - IL_0025: nop - IL_0026: stloc.0 - IL_0027: ldc.i4.0 - IL_0028: conv.i8 - IL_0029: stloc.1 - IL_002a: ldc.i4.1 - IL_002b: conv.i8 - IL_002c: stloc.2 - IL_002d: br.s IL_003e - - IL_002f: ldloc.2 - IL_0030: call void assembly::set_c(int64) - IL_0035: ldloc.2 - IL_0036: ldarg.0 - IL_0037: add - IL_0038: stloc.2 - IL_0039: ldloc.1 - IL_003a: ldc.i4.1 - IL_003b: conv.i8 - IL_003c: add - IL_003d: stloc.1 - IL_003e: ldloc.1 - IL_003f: ldloc.0 - IL_0040: blt.un.s IL_002f + IL_0025: add + IL_0026: stloc.2 + IL_0027: ldloc.1 + IL_0028: ldc.i4.1 + IL_0029: conv.i8 + IL_002a: add + IL_002b: stloc.1 + IL_002c: ldloc.1 + IL_002d: ldloc.0 + IL_002e: blt.un.s IL_001c - IL_0042: ret + IL_0030: ret } - .method public static void f9(int64 finish) cil managed + .method public static void f3(int64 finish) cil managed { .maxstack 4 @@ -567,387 +555,410 @@ IL_0005: ldc.i4.0 IL_0006: conv.i8 IL_0007: nop - IL_0008: br.s IL_0015 + IL_0008: br.s IL_0012 IL_000a: ldarg.0 IL_000b: ldc.i4.1 IL_000c: conv.i8 IL_000d: sub - IL_000e: ldc.i4.2 + IL_000e: ldc.i4.1 IL_000f: conv.i8 - IL_0010: div.un - IL_0011: ldc.i4.1 - IL_0012: conv.i8 - IL_0013: add.ovf.un - IL_0014: nop - IL_0015: stloc.0 - IL_0016: ldc.i4.0 + IL_0010: add.ovf.un + IL_0011: nop + IL_0012: stloc.0 + IL_0013: ldc.i4.0 + IL_0014: conv.i8 + IL_0015: stloc.1 + IL_0016: ldc.i4.1 IL_0017: conv.i8 - IL_0018: stloc.1 - IL_0019: ldc.i4.1 - IL_001a: conv.i8 - IL_001b: stloc.2 - IL_001c: br.s IL_002e + IL_0018: stloc.2 + IL_0019: br.s IL_002b - IL_001e: ldloc.2 - IL_001f: call void assembly::set_c(int64) - IL_0024: ldloc.2 - IL_0025: ldc.i4.2 - IL_0026: conv.i8 - IL_0027: add - IL_0028: stloc.2 - IL_0029: ldloc.1 - IL_002a: ldc.i4.1 - IL_002b: conv.i8 - IL_002c: add - IL_002d: stloc.1 - IL_002e: ldloc.1 - IL_002f: ldloc.0 - IL_0030: blt.un.s IL_001e + IL_001b: ldloc.2 + IL_001c: call void assembly::set_c(int64) + IL_0021: ldloc.2 + IL_0022: ldc.i4.1 + IL_0023: conv.i8 + IL_0024: add + IL_0025: stloc.2 + IL_0026: ldloc.1 + IL_0027: ldc.i4.1 + IL_0028: conv.i8 + IL_0029: add + IL_002a: stloc.1 + IL_002b: ldloc.1 + IL_002c: ldloc.0 + IL_002d: blt.un.s IL_001b - IL_0032: ret + IL_002f: ret } - .method public static void f10(int64 start, - int64 step, - int64 finish) cil managed + .method public static void f4(int64 start, + int64 finish) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 + .maxstack 4 .locals init (uint64 V_0, bool V_1, uint64 V_2, int64 V_3, uint64 V_4) IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f + IL_0001: ldarg.0 + IL_0002: bge.s IL_0009 - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, - int64, - int64) - IL_000b: pop + IL_0004: ldc.i4.0 + IL_0005: conv.i8 + IL_0006: nop + IL_0007: br.s IL_000d + + IL_0009: ldarg.1 + IL_000a: ldarg.0 + IL_000b: sub IL_000c: nop - IL_000d: br.s IL_0010 + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: ldc.i4.m1 + IL_0010: conv.i8 + IL_0011: bne.un.s IL_0036 - IL_000f: nop - IL_0010: ldc.i4.0 - IL_0011: conv.i8 - IL_0012: ldarg.1 - IL_0013: bge.s IL_0026 - - IL_0015: ldarg.2 - IL_0016: ldarg.2 - IL_0017: bge.s IL_001e - - IL_0019: ldc.i4.0 - IL_001a: conv.i8 - IL_001b: nop - IL_001c: br.s IL_003b + IL_0013: ldc.i4.1 + IL_0014: stloc.1 + IL_0015: ldc.i4.0 + IL_0016: conv.i8 + IL_0017: stloc.2 + IL_0018: ldarg.0 + IL_0019: stloc.3 + IL_001a: br.s IL_0032 - IL_001e: ldarg.2 - IL_001f: ldarg.2 - IL_0020: sub - IL_0021: ldarg.1 - IL_0022: div.un - IL_0023: nop - IL_0024: br.s IL_003b + IL_001c: ldloc.3 + IL_001d: call void assembly::set_c(int64) + IL_0022: ldloc.3 + IL_0023: ldc.i4.1 + IL_0024: conv.i8 + IL_0025: add + IL_0026: stloc.3 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: conv.i8 + IL_002a: add + IL_002b: stloc.2 + IL_002c: ldloc.2 + IL_002d: ldc.i4.0 + IL_002e: conv.i8 + IL_002f: cgt.un + IL_0031: stloc.1 + IL_0032: ldloc.1 + IL_0033: brtrue.s IL_001c - IL_0026: ldarg.2 - IL_0027: ldarg.2 - IL_0028: bge.s IL_002f + IL_0035: ret - IL_002a: ldc.i4.0 - IL_002b: conv.i8 - IL_002c: nop - IL_002d: br.s IL_003b + IL_0036: ldarg.1 + IL_0037: ldarg.0 + IL_0038: bge.s IL_003f - IL_002f: ldarg.2 - IL_0030: ldarg.2 - IL_0031: sub - IL_0032: ldarg.1 - IL_0033: not - IL_0034: ldc.i4.1 - IL_0035: conv.i8 - IL_0036: add - IL_0037: div.un - IL_0038: nop - IL_0039: br.s IL_003b + IL_003a: ldc.i4.0 + IL_003b: conv.i8 + IL_003c: nop + IL_003d: br.s IL_0046 - IL_003b: stloc.0 - IL_003c: ldloc.0 - IL_003d: ldc.i4.m1 - IL_003e: conv.i8 - IL_003f: bne.un.s IL_0063 + IL_003f: ldarg.1 + IL_0040: ldarg.0 + IL_0041: sub + IL_0042: ldc.i4.1 + IL_0043: conv.i8 + IL_0044: add.ovf.un + IL_0045: nop + IL_0046: stloc.2 + IL_0047: ldc.i4.0 + IL_0048: conv.i8 + IL_0049: stloc.s V_4 + IL_004b: ldarg.0 + IL_004c: stloc.3 + IL_004d: br.s IL_0061 - IL_0041: ldc.i4.1 - IL_0042: stloc.1 - IL_0043: ldc.i4.0 - IL_0044: conv.i8 - IL_0045: stloc.2 - IL_0046: ldarg.2 - IL_0047: stloc.3 - IL_0048: br.s IL_005f + IL_004f: ldloc.3 + IL_0050: call void assembly::set_c(int64) + IL_0055: ldloc.3 + IL_0056: ldc.i4.1 + IL_0057: conv.i8 + IL_0058: add + IL_0059: stloc.3 + IL_005a: ldloc.s V_4 + IL_005c: ldc.i4.1 + IL_005d: conv.i8 + IL_005e: add + IL_005f: stloc.s V_4 + IL_0061: ldloc.s V_4 + IL_0063: ldloc.2 + IL_0064: blt.un.s IL_004f - IL_004a: ldloc.3 - IL_004b: call void assembly::set_c(int64) - IL_0050: ldloc.3 - IL_0051: ldarg.1 - IL_0052: add - IL_0053: stloc.3 - IL_0054: ldloc.2 - IL_0055: ldc.i4.1 - IL_0056: conv.i8 - IL_0057: add - IL_0058: stloc.2 - IL_0059: ldloc.2 - IL_005a: ldc.i4.0 - IL_005b: conv.i8 - IL_005c: cgt.un - IL_005e: stloc.1 - IL_005f: ldloc.1 - IL_0060: brtrue.s IL_004a + IL_0066: ret + } - IL_0062: ret + .method public static void f5() cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + int64 V_1) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.0 + IL_0003: ldc.i4.1 + IL_0004: conv.i8 + IL_0005: stloc.1 + IL_0006: br.s IL_0018 - IL_0063: ldc.i4.0 - IL_0064: conv.i8 - IL_0065: ldarg.1 - IL_0066: bge.s IL_007c + IL_0008: ldloc.1 + IL_0009: call void assembly::set_c(int64) + IL_000e: ldloc.1 + IL_000f: ldc.i4.1 + IL_0010: conv.i8 + IL_0011: add + IL_0012: stloc.1 + IL_0013: ldloc.0 + IL_0014: ldc.i4.1 + IL_0015: conv.i8 + IL_0016: add + IL_0017: stloc.0 + IL_0018: ldloc.0 + IL_0019: ldc.i4.s 10 + IL_001b: conv.i8 + IL_001c: blt.un.s IL_0008 - IL_0068: ldarg.2 - IL_0069: ldarg.2 - IL_006a: bge.s IL_0071 + IL_001e: ret + } - IL_006c: ldc.i4.0 - IL_006d: conv.i8 - IL_006e: nop - IL_006f: br.s IL_0094 + .method public static void f6() cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + int64 V_1) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.0 + IL_0003: ldc.i4.1 + IL_0004: conv.i8 + IL_0005: stloc.1 + IL_0006: br.s IL_0018 - IL_0071: ldarg.2 - IL_0072: ldarg.2 - IL_0073: sub - IL_0074: ldarg.1 - IL_0075: div.un - IL_0076: ldc.i4.1 - IL_0077: conv.i8 - IL_0078: add.ovf.un - IL_0079: nop - IL_007a: br.s IL_0094 + IL_0008: ldloc.1 + IL_0009: call void assembly::set_c(int64) + IL_000e: ldloc.1 + IL_000f: ldc.i4.2 + IL_0010: conv.i8 + IL_0011: add + IL_0012: stloc.1 + IL_0013: ldloc.0 + IL_0014: ldc.i4.1 + IL_0015: conv.i8 + IL_0016: add + IL_0017: stloc.0 + IL_0018: ldloc.0 + IL_0019: ldc.i4.5 + IL_001a: conv.i8 + IL_001b: blt.un.s IL_0008 - IL_007c: ldarg.2 - IL_007d: ldarg.2 - IL_007e: bge.s IL_0085 + IL_001d: ret + } - IL_0080: ldc.i4.0 - IL_0081: conv.i8 - IL_0082: nop - IL_0083: br.s IL_0094 + .method public static void f7(int64 start) cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + uint64 V_1, + int64 V_2) + IL_0000: ldc.i4.s 10 + IL_0002: conv.i8 + IL_0003: ldarg.0 + IL_0004: bge.s IL_000b - IL_0085: ldarg.2 - IL_0086: ldarg.2 - IL_0087: sub - IL_0088: ldarg.1 - IL_0089: not - IL_008a: ldc.i4.1 - IL_008b: conv.i8 - IL_008c: add - IL_008d: div.un - IL_008e: ldc.i4.1 - IL_008f: conv.i8 - IL_0090: add.ovf.un - IL_0091: nop - IL_0092: br.s IL_0094 + IL_0006: ldc.i4.0 + IL_0007: conv.i8 + IL_0008: nop + IL_0009: br.s IL_0017 - IL_0094: stloc.2 - IL_0095: ldc.i4.0 - IL_0096: conv.i8 - IL_0097: stloc.s V_4 - IL_0099: ldarg.2 - IL_009a: stloc.3 - IL_009b: br.s IL_00ae + IL_000b: ldc.i4.s 10 + IL_000d: conv.i8 + IL_000e: ldarg.0 + IL_000f: sub + IL_0010: ldc.i4.2 + IL_0011: conv.i8 + IL_0012: div.un + IL_0013: ldc.i4.1 + IL_0014: conv.i8 + IL_0015: add.ovf.un + IL_0016: nop + IL_0017: stloc.0 + IL_0018: ldc.i4.0 + IL_0019: conv.i8 + IL_001a: stloc.1 + IL_001b: ldarg.0 + IL_001c: stloc.2 + IL_001d: br.s IL_002f - IL_009d: ldloc.3 - IL_009e: call void assembly::set_c(int64) - IL_00a3: ldloc.3 - IL_00a4: ldarg.1 - IL_00a5: add - IL_00a6: stloc.3 - IL_00a7: ldloc.s V_4 - IL_00a9: ldc.i4.1 - IL_00aa: conv.i8 - IL_00ab: add - IL_00ac: stloc.s V_4 - IL_00ae: ldloc.s V_4 - IL_00b0: ldloc.2 - IL_00b1: blt.un.s IL_009d + IL_001f: ldloc.2 + IL_0020: call void assembly::set_c(int64) + IL_0025: ldloc.2 + IL_0026: ldc.i4.2 + IL_0027: conv.i8 + IL_0028: add + IL_0029: stloc.2 + IL_002a: ldloc.1 + IL_002b: ldc.i4.1 + IL_002c: conv.i8 + IL_002d: add + IL_002e: stloc.1 + IL_002f: ldloc.1 + IL_0030: ldloc.0 + IL_0031: blt.un.s IL_001f - IL_00b3: ret + IL_0033: ret } - .method public static void f11(int64 start, - int64 finish) cil managed + .method public static void f8(int64 step) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 5 - .locals init (int64 V_0, - int64 V_1, + .locals init (uint64 V_0, + uint64 V_1, int64 V_2) IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: conv.i8 - IL_0003: ldarg.1 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, + IL_0001: brtrue.s IL_0012 + + IL_0003: ldc.i4.1 + IL_0004: conv.i8 + IL_0005: ldarg.0 + IL_0006: ldc.i4.s 10 + IL_0008: conv.i8 + IL_0009: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, int64, int64) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: conv.i8 - IL_000c: stloc.0 - IL_000d: ldc.i4.0 - IL_000e: conv.i8 - IL_000f: stloc.1 - IL_0010: ldarg.0 - IL_0011: stloc.2 - IL_0012: br.s IL_0024 + IL_000e: pop + IL_000f: nop + IL_0010: br.s IL_0013 - IL_0014: ldloc.2 - IL_0015: call void assembly::set_c(int64) - IL_001a: ldloc.2 - IL_001b: ldc.i4.0 - IL_001c: conv.i8 - IL_001d: add - IL_001e: stloc.2 - IL_001f: ldloc.1 - IL_0020: ldc.i4.1 - IL_0021: conv.i8 - IL_0022: add - IL_0023: stloc.1 - IL_0024: ldloc.1 - IL_0025: ldloc.0 - IL_0026: blt.un.s IL_0014 + IL_0012: nop + IL_0013: ldc.i4.0 + IL_0014: conv.i8 + IL_0015: ldarg.0 + IL_0016: bge.s IL_0023 - IL_0028: ret + IL_0018: ldc.i4.s 9 + IL_001a: conv.i8 + IL_001b: ldarg.0 + IL_001c: div.un + IL_001d: ldc.i4.1 + IL_001e: conv.i8 + IL_001f: add.ovf.un + IL_0020: nop + IL_0021: br.s IL_0026 + + IL_0023: ldc.i4.0 + IL_0024: conv.i8 + IL_0025: nop + IL_0026: stloc.0 + IL_0027: ldc.i4.0 + IL_0028: conv.i8 + IL_0029: stloc.1 + IL_002a: ldc.i4.1 + IL_002b: conv.i8 + IL_002c: stloc.2 + IL_002d: br.s IL_003e + + IL_002f: ldloc.2 + IL_0030: call void assembly::set_c(int64) + IL_0035: ldloc.2 + IL_0036: ldarg.0 + IL_0037: add + IL_0038: stloc.2 + IL_0039: ldloc.1 + IL_003a: ldc.i4.1 + IL_003b: conv.i8 + IL_003c: add + IL_003d: stloc.1 + IL_003e: ldloc.1 + IL_003f: ldloc.0 + IL_0040: blt.un.s IL_002f + + IL_0042: ret } - .method public static void f12() cil managed + .method public static void f9(int64 finish) cil managed { - .maxstack 5 - .locals init (int64 V_0, - int64 V_1, + .maxstack 4 + .locals init (uint64 V_0, + uint64 V_1, int64 V_2) - IL_0000: ldc.i4.1 - IL_0001: conv.i8 - IL_0002: ldc.i4.0 - IL_0003: conv.i8 - IL_0004: ldc.i4.s 10 + IL_0000: ldarg.0 + IL_0001: ldc.i4.1 + IL_0002: conv.i8 + IL_0003: bge.s IL_000a + + IL_0005: ldc.i4.0 IL_0006: conv.i8 - IL_0007: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, - int64, - int64) - IL_000c: pop - IL_000d: ldc.i4.0 - IL_000e: conv.i8 - IL_000f: stloc.0 - IL_0010: ldc.i4.0 - IL_0011: conv.i8 - IL_0012: stloc.1 - IL_0013: ldc.i4.1 - IL_0014: conv.i8 - IL_0015: stloc.2 - IL_0016: br.s IL_0028 + IL_0007: nop + IL_0008: br.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldc.i4.1 + IL_000c: conv.i8 + IL_000d: sub + IL_000e: ldc.i4.2 + IL_000f: conv.i8 + IL_0010: div.un + IL_0011: ldc.i4.1 + IL_0012: conv.i8 + IL_0013: add.ovf.un + IL_0014: nop + IL_0015: stloc.0 + IL_0016: ldc.i4.0 + IL_0017: conv.i8 + IL_0018: stloc.1 + IL_0019: ldc.i4.1 + IL_001a: conv.i8 + IL_001b: stloc.2 + IL_001c: br.s IL_002e - IL_0018: ldloc.2 - IL_0019: call void assembly::set_c(int64) IL_001e: ldloc.2 - IL_001f: ldc.i4.0 - IL_0020: conv.i8 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.1 - IL_0024: ldc.i4.1 - IL_0025: conv.i8 - IL_0026: add - IL_0027: stloc.1 - IL_0028: ldloc.1 - IL_0029: ldloc.0 - IL_002a: blt.un.s IL_0018 + IL_001f: call void assembly::set_c(int64) + IL_0024: ldloc.2 + IL_0025: ldc.i4.2 + IL_0026: conv.i8 + IL_0027: add + IL_0028: stloc.2 + IL_0029: ldloc.1 + IL_002a: ldc.i4.1 + IL_002b: conv.i8 + IL_002c: add + IL_002d: stloc.1 + IL_002e: ldloc.1 + IL_002f: ldloc.0 + IL_0030: blt.un.s IL_001e - IL_002c: ret + IL_0032: ret } - .method public static void f13() cil managed + .method public specialname static int64 get_c() cil managed { - .maxstack 4 - .locals init (uint64 V_0, - int64 V_1) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.s 10 - IL_0005: conv.i8 - IL_0006: stloc.1 - IL_0007: br.s IL_0019 - - IL_0009: ldloc.1 - IL_000a: call void assembly::set_c(int64) - IL_000f: ldloc.1 - IL_0010: ldc.i4.m1 - IL_0011: conv.i8 - IL_0012: add - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: ldc.i4.1 - IL_0016: conv.i8 - IL_0017: add - IL_0018: stloc.0 - IL_0019: ldloc.0 - IL_001a: ldc.i4.s 10 - IL_001c: conv.i8 - IL_001d: blt.un.s IL_0009 - - IL_001f: ret + .maxstack 8 + IL_0000: ldsfld int64 ''.$assembly::c@1 + IL_0005: ret } - .method public static void f14() cil managed + .method public specialname static void set_c(int64 'value') cil managed { - .maxstack 4 - .locals init (uint64 V_0, - int64 V_1) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.s 10 - IL_0005: conv.i8 - IL_0006: stloc.1 - IL_0007: br.s IL_001a - - IL_0009: ldloc.1 - IL_000a: call void assembly::set_c(int64) - IL_000f: ldloc.1 - IL_0010: ldc.i4.s -2 - IL_0012: conv.i8 - IL_0013: add - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldloc.0 - IL_001b: ldc.i4.5 - IL_001c: conv.i8 - IL_001d: blt.un.s IL_0009 - - IL_001f: ret + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld int64 ''.$assembly::c@1 + IL_0006: ret } .property int64 c() @@ -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..5cea6ed0377 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 @@ -35,21 +35,15 @@ .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 int64 c@1 .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 int64 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int64 assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(int64 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int64 assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -154,216 +148,281 @@ IL_001e: ret } - .method public static void f2(int64 start) cil managed + .method public static void f10(int64 start, + int64 step, + int64 finish) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) - .maxstack 4 + .maxstack 5 .locals init (uint64 V_0, - uint64 V_1, - int64 V_2) - IL_0000: ldc.i4.s 10 - IL_0002: conv.i8 - IL_0003: ldarg.0 - IL_0004: bge.s IL_000b + bool V_1, + uint64 V_2, + int64 V_3, + uint64 V_4) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f - IL_0006: ldc.i4.0 - IL_0007: conv.i8 - IL_0008: nop - IL_0009: br.s IL_0014 + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, + int64, + int64) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 - IL_000b: ldc.i4.s 10 - IL_000d: conv.i8 - IL_000e: ldarg.0 - IL_000f: sub - IL_0010: ldc.i4.1 + IL_000f: nop + IL_0010: ldc.i4.0 IL_0011: conv.i8 - IL_0012: add.ovf.un - IL_0013: nop - IL_0014: stloc.0 - IL_0015: ldc.i4.0 - IL_0016: conv.i8 - IL_0017: stloc.1 - IL_0018: ldarg.0 - IL_0019: stloc.2 - IL_001a: br.s IL_002c + IL_0012: ldarg.1 + IL_0013: bge.s IL_0026 - IL_001c: ldloc.2 - IL_001d: call void assembly::set_c(int64) - IL_0022: ldloc.2 - IL_0023: ldc.i4.1 - IL_0024: conv.i8 - IL_0025: add - IL_0026: stloc.2 - IL_0027: ldloc.1 - IL_0028: ldc.i4.1 - IL_0029: conv.i8 - IL_002a: add - IL_002b: stloc.1 - IL_002c: ldloc.1 - IL_002d: ldloc.0 - IL_002e: blt.un.s IL_001c + IL_0015: ldarg.2 + IL_0016: ldarg.2 + IL_0017: bge.s IL_001e - IL_0030: ret - } + IL_0019: ldc.i4.0 + IL_001a: conv.i8 + IL_001b: nop + IL_001c: br.s IL_003b - .method public static void f3(int64 finish) cil managed - { - - .maxstack 4 - .locals init (uint64 V_0, - uint64 V_1, - int64 V_2) - IL_0000: ldarg.0 - IL_0001: ldc.i4.1 - IL_0002: conv.i8 - IL_0003: bge.s IL_000a + IL_001e: ldarg.2 + IL_001f: ldarg.2 + IL_0020: sub + IL_0021: ldarg.1 + IL_0022: div.un + IL_0023: nop + IL_0024: br.s IL_003b - IL_0005: ldc.i4.0 - IL_0006: conv.i8 - IL_0007: nop - IL_0008: br.s IL_0012 + IL_0026: ldarg.2 + IL_0027: ldarg.2 + IL_0028: bge.s IL_002f - IL_000a: ldarg.0 - IL_000b: ldc.i4.1 - IL_000c: conv.i8 - IL_000d: sub - IL_000e: ldc.i4.1 - IL_000f: conv.i8 - IL_0010: add.ovf.un - IL_0011: nop - IL_0012: stloc.0 - IL_0013: ldc.i4.0 - IL_0014: conv.i8 - IL_0015: stloc.1 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: stloc.2 - IL_0019: br.s IL_002b + IL_002a: ldc.i4.0 + IL_002b: conv.i8 + IL_002c: nop + IL_002d: br.s IL_003b - IL_001b: ldloc.2 - IL_001c: call void assembly::set_c(int64) - IL_0021: ldloc.2 - IL_0022: ldc.i4.1 - IL_0023: conv.i8 - IL_0024: add - IL_0025: stloc.2 - IL_0026: ldloc.1 - IL_0027: ldc.i4.1 - IL_0028: conv.i8 - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: ldloc.0 - IL_002d: blt.un.s IL_001b + IL_002f: ldarg.2 + IL_0030: ldarg.2 + IL_0031: sub + IL_0032: ldarg.1 + IL_0033: not + IL_0034: ldc.i4.1 + IL_0035: conv.i8 + IL_0036: add + IL_0037: div.un + IL_0038: nop + IL_0039: br.s IL_003b - IL_002f: ret - } + IL_003b: stloc.0 + IL_003c: ldloc.0 + IL_003d: ldc.i4.m1 + IL_003e: conv.i8 + IL_003f: bne.un.s IL_0063 - .method public static void f4(int64 start, - int64 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 4 - .locals init (uint64 V_0, - bool V_1, - uint64 V_2, - int64 V_3, - uint64 V_4) - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: bge.s IL_0009 + IL_0041: ldc.i4.1 + IL_0042: stloc.1 + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: stloc.2 + IL_0046: ldarg.2 + IL_0047: stloc.3 + IL_0048: br.s IL_005f - IL_0004: ldc.i4.0 - IL_0005: conv.i8 - IL_0006: nop - IL_0007: br.s IL_000d + IL_004a: ldloc.3 + IL_004b: call void assembly::set_c(int64) + IL_0050: ldloc.3 + IL_0051: ldarg.1 + IL_0052: add + IL_0053: stloc.3 + IL_0054: ldloc.2 + IL_0055: ldc.i4.1 + IL_0056: conv.i8 + IL_0057: add + IL_0058: stloc.2 + IL_0059: ldloc.2 + IL_005a: ldc.i4.0 + IL_005b: conv.i8 + IL_005c: cgt.un + IL_005e: stloc.1 + IL_005f: ldloc.1 + IL_0060: brtrue.s IL_004a - IL_0009: ldarg.1 - IL_000a: ldarg.0 - IL_000b: sub - IL_000c: nop - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: ldc.i4.m1 - IL_0010: conv.i8 - IL_0011: bne.un.s IL_0036 + IL_0062: ret - IL_0013: ldc.i4.1 - IL_0014: stloc.1 - IL_0015: ldc.i4.0 - IL_0016: conv.i8 - IL_0017: stloc.2 - IL_0018: ldarg.0 - IL_0019: stloc.3 - IL_001a: br.s IL_0032 + IL_0063: ldc.i4.0 + IL_0064: conv.i8 + IL_0065: ldarg.1 + IL_0066: bge.s IL_007c - IL_001c: ldloc.3 - IL_001d: call void assembly::set_c(int64) - IL_0022: ldloc.3 - IL_0023: ldc.i4.1 - IL_0024: conv.i8 - IL_0025: add - IL_0026: stloc.3 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: conv.i8 - IL_002a: add - IL_002b: stloc.2 - IL_002c: ldloc.2 - IL_002d: ldc.i4.0 - IL_002e: conv.i8 - IL_002f: cgt.un - IL_0031: stloc.1 - IL_0032: ldloc.1 - IL_0033: brtrue.s IL_001c + IL_0068: ldarg.2 + IL_0069: ldarg.2 + IL_006a: bge.s IL_0071 - IL_0035: ret + IL_006c: ldc.i4.0 + IL_006d: conv.i8 + IL_006e: nop + IL_006f: br.s IL_0094 - IL_0036: ldarg.1 - IL_0037: ldarg.0 - IL_0038: bge.s IL_003f + IL_0071: ldarg.2 + IL_0072: ldarg.2 + IL_0073: sub + IL_0074: ldarg.1 + IL_0075: div.un + IL_0076: ldc.i4.1 + IL_0077: conv.i8 + IL_0078: add.ovf.un + IL_0079: nop + IL_007a: br.s IL_0094 - IL_003a: ldc.i4.0 - IL_003b: conv.i8 - IL_003c: nop - IL_003d: br.s IL_0046 + IL_007c: ldarg.2 + IL_007d: ldarg.2 + IL_007e: bge.s IL_0085 - IL_003f: ldarg.1 - IL_0040: ldarg.0 - IL_0041: sub - IL_0042: ldc.i4.1 - IL_0043: conv.i8 - IL_0044: add.ovf.un - IL_0045: nop - IL_0046: stloc.2 - IL_0047: ldc.i4.0 - IL_0048: conv.i8 - IL_0049: stloc.s V_4 - IL_004b: ldarg.0 - IL_004c: stloc.3 - IL_004d: br.s IL_0061 + IL_0080: ldc.i4.0 + IL_0081: conv.i8 + IL_0082: nop + IL_0083: br.s IL_0094 - IL_004f: ldloc.3 - IL_0050: call void assembly::set_c(int64) - IL_0055: ldloc.3 - IL_0056: ldc.i4.1 - IL_0057: conv.i8 - IL_0058: add - IL_0059: stloc.3 - IL_005a: ldloc.s V_4 - IL_005c: ldc.i4.1 - IL_005d: conv.i8 - IL_005e: add - IL_005f: stloc.s V_4 - IL_0061: ldloc.s V_4 - IL_0063: ldloc.2 - IL_0064: blt.un.s IL_004f + IL_0085: ldarg.2 + IL_0086: ldarg.2 + IL_0087: sub + IL_0088: ldarg.1 + IL_0089: not + IL_008a: ldc.i4.1 + IL_008b: conv.i8 + IL_008c: add + IL_008d: div.un + IL_008e: ldc.i4.1 + IL_008f: conv.i8 + IL_0090: add.ovf.un + IL_0091: nop + IL_0092: br.s IL_0094 - IL_0066: ret + IL_0094: stloc.2 + IL_0095: ldc.i4.0 + IL_0096: conv.i8 + IL_0097: stloc.s V_4 + IL_0099: ldarg.2 + IL_009a: stloc.3 + IL_009b: br.s IL_00ae + + IL_009d: ldloc.3 + IL_009e: call void assembly::set_c(int64) + IL_00a3: ldloc.3 + IL_00a4: ldarg.1 + IL_00a5: add + IL_00a6: stloc.3 + IL_00a7: ldloc.s V_4 + IL_00a9: ldc.i4.1 + IL_00aa: conv.i8 + IL_00ab: add + IL_00ac: stloc.s V_4 + IL_00ae: ldloc.s V_4 + IL_00b0: ldloc.2 + IL_00b1: blt.un.s IL_009d + + IL_00b3: ret } - .method public static void f5() cil managed + .method public static void f11(int64 start, + int64 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (int64 V_0, + int64 V_1, + int64 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: conv.i8 + IL_0003: ldarg.1 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, + int64, + int64) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: conv.i8 + IL_000c: stloc.0 + IL_000d: ldc.i4.0 + IL_000e: conv.i8 + IL_000f: stloc.1 + IL_0010: ldarg.0 + IL_0011: stloc.2 + IL_0012: br.s IL_0024 + + IL_0014: ldloc.2 + IL_0015: call void assembly::set_c(int64) + IL_001a: ldloc.2 + IL_001b: ldc.i4.0 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.2 + IL_001f: ldloc.1 + IL_0020: ldc.i4.1 + IL_0021: conv.i8 + IL_0022: add + IL_0023: stloc.1 + IL_0024: ldloc.1 + IL_0025: ldloc.0 + IL_0026: blt.un.s IL_0014 + + IL_0028: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (int64 V_0, + int64 V_1, + int64 V_2) + IL_0000: ldc.i4.1 + IL_0001: conv.i8 + IL_0002: ldc.i4.0 + IL_0003: conv.i8 + IL_0004: ldc.i4.s 10 + IL_0006: conv.i8 + IL_0007: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, + int64, + int64) + IL_000c: pop + IL_000d: ldc.i4.0 + IL_000e: conv.i8 + IL_000f: stloc.0 + IL_0010: ldc.i4.0 + IL_0011: conv.i8 + IL_0012: stloc.1 + IL_0013: ldc.i4.1 + IL_0014: conv.i8 + IL_0015: stloc.2 + IL_0016: br.s IL_0028 + + IL_0018: ldloc.2 + IL_0019: call void assembly::set_c(int64) + IL_001e: ldloc.2 + IL_001f: ldc.i4.0 + IL_0020: conv.i8 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.1 + IL_0024: ldc.i4.1 + IL_0025: conv.i8 + IL_0026: add + IL_0027: stloc.1 + IL_0028: ldloc.1 + IL_0029: ldloc.0 + IL_002a: blt.un.s IL_0018 + + IL_002c: ret + } + + .method public static void f13() cil managed { .maxstack 4 @@ -372,32 +431,32 @@ IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.0 - IL_0003: ldc.i4.1 - IL_0004: conv.i8 - IL_0005: stloc.1 - IL_0006: br.s IL_0018 + IL_0003: ldc.i4.s 10 + IL_0005: conv.i8 + IL_0006: stloc.1 + IL_0007: br.s IL_0019 - IL_0008: ldloc.1 - IL_0009: call void assembly::set_c(int64) - IL_000e: ldloc.1 - IL_000f: ldc.i4.1 - IL_0010: conv.i8 - IL_0011: add - IL_0012: stloc.1 - IL_0013: ldloc.0 - IL_0014: ldc.i4.1 - IL_0015: conv.i8 - IL_0016: add - IL_0017: stloc.0 - IL_0018: ldloc.0 - IL_0019: ldc.i4.s 10 - IL_001b: conv.i8 - IL_001c: blt.un.s IL_0008 + IL_0009: ldloc.1 + IL_000a: call void assembly::set_c(int64) + IL_000f: ldloc.1 + IL_0010: ldc.i4.m1 + IL_0011: conv.i8 + IL_0012: add + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: ldc.i4.1 + IL_0016: conv.i8 + IL_0017: add + IL_0018: stloc.0 + IL_0019: ldloc.0 + IL_001a: ldc.i4.s 10 + IL_001c: conv.i8 + IL_001d: blt.un.s IL_0009 - IL_001e: ret + IL_001f: ret } - .method public static void f6() cil managed + .method public static void f14() cil managed { .maxstack 4 @@ -406,32 +465,32 @@ IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.0 - IL_0003: ldc.i4.1 - IL_0004: conv.i8 - IL_0005: stloc.1 - IL_0006: br.s IL_0018 + IL_0003: ldc.i4.s 10 + IL_0005: conv.i8 + IL_0006: stloc.1 + IL_0007: br.s IL_001a - IL_0008: ldloc.1 - IL_0009: call void assembly::set_c(int64) - IL_000e: ldloc.1 - IL_000f: ldc.i4.2 - IL_0010: conv.i8 - IL_0011: add - IL_0012: stloc.1 - IL_0013: ldloc.0 - IL_0014: ldc.i4.1 - IL_0015: conv.i8 - IL_0016: add - IL_0017: stloc.0 - IL_0018: ldloc.0 - IL_0019: ldc.i4.5 - IL_001a: conv.i8 - IL_001b: blt.un.s IL_0008 + IL_0009: ldloc.1 + IL_000a: call void assembly::set_c(int64) + IL_000f: ldloc.1 + IL_0010: ldc.i4.s -2 + IL_0012: conv.i8 + IL_0013: add + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: ldc.i4.1 + IL_0017: conv.i8 + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldloc.0 + IL_001b: ldc.i4.5 + IL_001c: conv.i8 + IL_001d: blt.un.s IL_0009 - IL_001d: ret + IL_001f: ret } - .method public static void f7(int64 start) cil managed + .method public static void f2(int64 start) cil managed { .maxstack 4 @@ -446,115 +505,44 @@ IL_0006: ldc.i4.0 IL_0007: conv.i8 IL_0008: nop - IL_0009: br.s IL_0017 + IL_0009: br.s IL_0014 IL_000b: ldc.i4.s 10 IL_000d: conv.i8 IL_000e: ldarg.0 IL_000f: sub - IL_0010: ldc.i4.2 + IL_0010: ldc.i4.1 IL_0011: conv.i8 - IL_0012: div.un - IL_0013: ldc.i4.1 - IL_0014: conv.i8 - IL_0015: add.ovf.un - IL_0016: nop - IL_0017: stloc.0 - IL_0018: ldc.i4.0 - IL_0019: conv.i8 - IL_001a: stloc.1 - IL_001b: ldarg.0 - IL_001c: stloc.2 - IL_001d: br.s IL_002f - - IL_001f: ldloc.2 - IL_0020: call void assembly::set_c(int64) - IL_0025: ldloc.2 - IL_0026: ldc.i4.2 - IL_0027: conv.i8 - IL_0028: add - IL_0029: stloc.2 - IL_002a: ldloc.1 - IL_002b: ldc.i4.1 - IL_002c: conv.i8 - IL_002d: add - IL_002e: stloc.1 - IL_002f: ldloc.1 - IL_0030: ldloc.0 - IL_0031: blt.un.s IL_001f - - IL_0033: ret - } - - .method public static void f8(int64 step) cil managed - { - - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - int64 V_2) - IL_0000: ldarg.0 - IL_0001: brtrue.s IL_0012 - - IL_0003: ldc.i4.1 - IL_0004: conv.i8 - IL_0005: ldarg.0 - IL_0006: ldc.i4.s 10 - IL_0008: conv.i8 - IL_0009: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, - int64, - int64) - IL_000e: pop - IL_000f: nop - IL_0010: br.s IL_0013 - - IL_0012: nop - IL_0013: ldc.i4.0 - IL_0014: conv.i8 - IL_0015: ldarg.0 - IL_0016: bge.s IL_0023 - - IL_0018: ldc.i4.s 9 - IL_001a: conv.i8 - IL_001b: ldarg.0 - IL_001c: div.un - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: add.ovf.un - IL_0020: nop - IL_0021: br.s IL_0026 + IL_0012: add.ovf.un + IL_0013: nop + IL_0014: stloc.0 + IL_0015: ldc.i4.0 + IL_0016: conv.i8 + IL_0017: stloc.1 + IL_0018: ldarg.0 + IL_0019: stloc.2 + IL_001a: br.s IL_002c - IL_0023: ldc.i4.0 + IL_001c: ldloc.2 + IL_001d: call void assembly::set_c(int64) + IL_0022: ldloc.2 + IL_0023: ldc.i4.1 IL_0024: conv.i8 - IL_0025: nop - IL_0026: stloc.0 - IL_0027: ldc.i4.0 - IL_0028: conv.i8 - IL_0029: stloc.1 - IL_002a: ldc.i4.1 - IL_002b: conv.i8 - IL_002c: stloc.2 - IL_002d: br.s IL_003e - - IL_002f: ldloc.2 - IL_0030: call void assembly::set_c(int64) - IL_0035: ldloc.2 - IL_0036: ldarg.0 - IL_0037: add - IL_0038: stloc.2 - IL_0039: ldloc.1 - IL_003a: ldc.i4.1 - IL_003b: conv.i8 - IL_003c: add - IL_003d: stloc.1 - IL_003e: ldloc.1 - IL_003f: ldloc.0 - IL_0040: blt.un.s IL_002f + IL_0025: add + IL_0026: stloc.2 + IL_0027: ldloc.1 + IL_0028: ldc.i4.1 + IL_0029: conv.i8 + IL_002a: add + IL_002b: stloc.1 + IL_002c: ldloc.1 + IL_002d: ldloc.0 + IL_002e: blt.un.s IL_001c - IL_0042: ret + IL_0030: ret } - .method public static void f9(int64 finish) cil managed + .method public static void f3(int64 finish) cil managed { .maxstack 4 @@ -569,398 +557,410 @@ IL_0005: ldc.i4.0 IL_0006: conv.i8 IL_0007: nop - IL_0008: br.s IL_0015 + IL_0008: br.s IL_0012 IL_000a: ldarg.0 IL_000b: ldc.i4.1 IL_000c: conv.i8 IL_000d: sub - IL_000e: ldc.i4.2 + IL_000e: ldc.i4.1 IL_000f: conv.i8 - IL_0010: div.un - IL_0011: ldc.i4.1 - IL_0012: conv.i8 - IL_0013: add.ovf.un - IL_0014: nop - IL_0015: stloc.0 - IL_0016: ldc.i4.0 + IL_0010: add.ovf.un + IL_0011: nop + IL_0012: stloc.0 + IL_0013: ldc.i4.0 + IL_0014: conv.i8 + IL_0015: stloc.1 + IL_0016: ldc.i4.1 IL_0017: conv.i8 - IL_0018: stloc.1 - IL_0019: ldc.i4.1 - IL_001a: conv.i8 - IL_001b: stloc.2 - IL_001c: br.s IL_002e + IL_0018: stloc.2 + IL_0019: br.s IL_002b - IL_001e: ldloc.2 - IL_001f: call void assembly::set_c(int64) - IL_0024: ldloc.2 - IL_0025: ldc.i4.2 - IL_0026: conv.i8 - IL_0027: add - IL_0028: stloc.2 - IL_0029: ldloc.1 - IL_002a: ldc.i4.1 - IL_002b: conv.i8 - IL_002c: add - IL_002d: stloc.1 - IL_002e: ldloc.1 - IL_002f: ldloc.0 - IL_0030: blt.un.s IL_001e + IL_001b: ldloc.2 + IL_001c: call void assembly::set_c(int64) + IL_0021: ldloc.2 + IL_0022: ldc.i4.1 + IL_0023: conv.i8 + IL_0024: add + IL_0025: stloc.2 + IL_0026: ldloc.1 + IL_0027: ldc.i4.1 + IL_0028: conv.i8 + IL_0029: add + IL_002a: stloc.1 + IL_002b: ldloc.1 + IL_002c: ldloc.0 + IL_002d: blt.un.s IL_001b - IL_0032: ret + IL_002f: ret } - .method public static void f10(int64 start, - int64 step, - int64 finish) cil managed + .method public static void f4(int64 start, + int64 finish) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 + .maxstack 4 .locals init (uint64 V_0, bool V_1, uint64 V_2, int64 V_3, uint64 V_4) IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f + IL_0001: ldarg.0 + IL_0002: bge.s IL_0009 - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, - int64, - int64) - IL_000b: pop + IL_0004: ldc.i4.0 + IL_0005: conv.i8 + IL_0006: nop + IL_0007: br.s IL_000d + + IL_0009: ldarg.1 + IL_000a: ldarg.0 + IL_000b: sub IL_000c: nop - IL_000d: br.s IL_0010 + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: ldc.i4.m1 + IL_0010: conv.i8 + IL_0011: bne.un.s IL_0036 - IL_000f: nop - IL_0010: ldc.i4.0 - IL_0011: conv.i8 - IL_0012: ldarg.1 - IL_0013: bge.s IL_0026 + IL_0013: ldc.i4.1 + IL_0014: stloc.1 + IL_0015: ldc.i4.0 + IL_0016: conv.i8 + IL_0017: stloc.2 + IL_0018: ldarg.0 + IL_0019: stloc.3 + IL_001a: br.s IL_0032 - IL_0015: ldarg.2 - IL_0016: ldarg.2 - IL_0017: bge.s IL_001e - - IL_0019: ldc.i4.0 - IL_001a: conv.i8 - IL_001b: nop - IL_001c: br.s IL_003b - - IL_001e: ldarg.2 - IL_001f: ldarg.2 - IL_0020: sub - IL_0021: ldarg.1 - IL_0022: div.un - IL_0023: nop - IL_0024: br.s IL_003b + IL_001c: ldloc.3 + IL_001d: call void assembly::set_c(int64) + IL_0022: ldloc.3 + IL_0023: ldc.i4.1 + IL_0024: conv.i8 + IL_0025: add + IL_0026: stloc.3 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: conv.i8 + IL_002a: add + IL_002b: stloc.2 + IL_002c: ldloc.2 + IL_002d: ldc.i4.0 + IL_002e: conv.i8 + IL_002f: cgt.un + IL_0031: stloc.1 + IL_0032: ldloc.1 + IL_0033: brtrue.s IL_001c - IL_0026: ldarg.2 - IL_0027: ldarg.2 - IL_0028: bge.s IL_002f + IL_0035: ret - IL_002a: ldc.i4.0 - IL_002b: conv.i8 - IL_002c: nop - IL_002d: br.s IL_003b + IL_0036: ldarg.1 + IL_0037: ldarg.0 + IL_0038: bge.s IL_003f - IL_002f: ldarg.2 - IL_0030: ldarg.2 - IL_0031: sub - IL_0032: ldarg.1 - IL_0033: not - IL_0034: ldc.i4.1 - IL_0035: conv.i8 - IL_0036: add - IL_0037: div.un - IL_0038: nop - IL_0039: br.s IL_003b + IL_003a: ldc.i4.0 + IL_003b: conv.i8 + IL_003c: nop + IL_003d: br.s IL_0046 - IL_003b: stloc.0 - IL_003c: ldloc.0 - IL_003d: ldc.i4.m1 - IL_003e: conv.i8 - IL_003f: bne.un.s IL_0063 + IL_003f: ldarg.1 + IL_0040: ldarg.0 + IL_0041: sub + IL_0042: ldc.i4.1 + IL_0043: conv.i8 + IL_0044: add.ovf.un + IL_0045: nop + IL_0046: stloc.2 + IL_0047: ldc.i4.0 + IL_0048: conv.i8 + IL_0049: stloc.s V_4 + IL_004b: ldarg.0 + IL_004c: stloc.3 + IL_004d: br.s IL_0061 - IL_0041: ldc.i4.1 - IL_0042: stloc.1 - IL_0043: ldc.i4.0 - IL_0044: conv.i8 - IL_0045: stloc.2 - IL_0046: ldarg.2 - IL_0047: stloc.3 - IL_0048: br.s IL_005f + IL_004f: ldloc.3 + IL_0050: call void assembly::set_c(int64) + IL_0055: ldloc.3 + IL_0056: ldc.i4.1 + IL_0057: conv.i8 + IL_0058: add + IL_0059: stloc.3 + IL_005a: ldloc.s V_4 + IL_005c: ldc.i4.1 + IL_005d: conv.i8 + IL_005e: add + IL_005f: stloc.s V_4 + IL_0061: ldloc.s V_4 + IL_0063: ldloc.2 + IL_0064: blt.un.s IL_004f - IL_004a: ldloc.3 - IL_004b: call void assembly::set_c(int64) - IL_0050: ldloc.3 - IL_0051: ldarg.1 - IL_0052: add - IL_0053: stloc.3 - IL_0054: ldloc.2 - IL_0055: ldc.i4.1 - IL_0056: conv.i8 - IL_0057: add - IL_0058: stloc.2 - IL_0059: ldloc.2 - IL_005a: ldc.i4.0 - IL_005b: conv.i8 - IL_005c: cgt.un - IL_005e: stloc.1 - IL_005f: ldloc.1 - IL_0060: brtrue.s IL_004a + IL_0066: ret + } - IL_0062: ret + .method public static void f5() cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + int64 V_1) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.0 + IL_0003: ldc.i4.1 + IL_0004: conv.i8 + IL_0005: stloc.1 + IL_0006: br.s IL_0018 - IL_0063: ldc.i4.0 - IL_0064: conv.i8 - IL_0065: ldarg.1 - IL_0066: bge.s IL_007c + IL_0008: ldloc.1 + IL_0009: call void assembly::set_c(int64) + IL_000e: ldloc.1 + IL_000f: ldc.i4.1 + IL_0010: conv.i8 + IL_0011: add + IL_0012: stloc.1 + IL_0013: ldloc.0 + IL_0014: ldc.i4.1 + IL_0015: conv.i8 + IL_0016: add + IL_0017: stloc.0 + IL_0018: ldloc.0 + IL_0019: ldc.i4.s 10 + IL_001b: conv.i8 + IL_001c: blt.un.s IL_0008 - IL_0068: ldarg.2 - IL_0069: ldarg.2 - IL_006a: bge.s IL_0071 + IL_001e: ret + } - IL_006c: ldc.i4.0 - IL_006d: conv.i8 - IL_006e: nop - IL_006f: br.s IL_0094 + .method public static void f6() cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + int64 V_1) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.0 + IL_0003: ldc.i4.1 + IL_0004: conv.i8 + IL_0005: stloc.1 + IL_0006: br.s IL_0018 - IL_0071: ldarg.2 - IL_0072: ldarg.2 - IL_0073: sub - IL_0074: ldarg.1 - IL_0075: div.un - IL_0076: ldc.i4.1 - IL_0077: conv.i8 - IL_0078: add.ovf.un - IL_0079: nop - IL_007a: br.s IL_0094 + IL_0008: ldloc.1 + IL_0009: call void assembly::set_c(int64) + IL_000e: ldloc.1 + IL_000f: ldc.i4.2 + IL_0010: conv.i8 + IL_0011: add + IL_0012: stloc.1 + IL_0013: ldloc.0 + IL_0014: ldc.i4.1 + IL_0015: conv.i8 + IL_0016: add + IL_0017: stloc.0 + IL_0018: ldloc.0 + IL_0019: ldc.i4.5 + IL_001a: conv.i8 + IL_001b: blt.un.s IL_0008 - IL_007c: ldarg.2 - IL_007d: ldarg.2 - IL_007e: bge.s IL_0085 + IL_001d: ret + } - IL_0080: ldc.i4.0 - IL_0081: conv.i8 - IL_0082: nop - IL_0083: br.s IL_0094 + .method public static void f7(int64 start) cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + uint64 V_1, + int64 V_2) + IL_0000: ldc.i4.s 10 + IL_0002: conv.i8 + IL_0003: ldarg.0 + IL_0004: bge.s IL_000b - IL_0085: ldarg.2 - IL_0086: ldarg.2 - IL_0087: sub - IL_0088: ldarg.1 - IL_0089: not - IL_008a: ldc.i4.1 - IL_008b: conv.i8 - IL_008c: add - IL_008d: div.un - IL_008e: ldc.i4.1 - IL_008f: conv.i8 - IL_0090: add.ovf.un - IL_0091: nop - IL_0092: br.s IL_0094 + IL_0006: ldc.i4.0 + IL_0007: conv.i8 + IL_0008: nop + IL_0009: br.s IL_0017 - IL_0094: stloc.2 - IL_0095: ldc.i4.0 - IL_0096: conv.i8 - IL_0097: stloc.s V_4 - IL_0099: ldarg.2 - IL_009a: stloc.3 - IL_009b: br.s IL_00ae + IL_000b: ldc.i4.s 10 + IL_000d: conv.i8 + IL_000e: ldarg.0 + IL_000f: sub + IL_0010: ldc.i4.2 + IL_0011: conv.i8 + IL_0012: div.un + IL_0013: ldc.i4.1 + IL_0014: conv.i8 + IL_0015: add.ovf.un + IL_0016: nop + IL_0017: stloc.0 + IL_0018: ldc.i4.0 + IL_0019: conv.i8 + IL_001a: stloc.1 + IL_001b: ldarg.0 + IL_001c: stloc.2 + IL_001d: br.s IL_002f - IL_009d: ldloc.3 - IL_009e: call void assembly::set_c(int64) - IL_00a3: ldloc.3 - IL_00a4: ldarg.1 - IL_00a5: add - IL_00a6: stloc.3 - IL_00a7: ldloc.s V_4 - IL_00a9: ldc.i4.1 - IL_00aa: conv.i8 - IL_00ab: add - IL_00ac: stloc.s V_4 - IL_00ae: ldloc.s V_4 - IL_00b0: ldloc.2 - IL_00b1: blt.un.s IL_009d + IL_001f: ldloc.2 + IL_0020: call void assembly::set_c(int64) + IL_0025: ldloc.2 + IL_0026: ldc.i4.2 + IL_0027: conv.i8 + IL_0028: add + IL_0029: stloc.2 + IL_002a: ldloc.1 + IL_002b: ldc.i4.1 + IL_002c: conv.i8 + IL_002d: add + IL_002e: stloc.1 + IL_002f: ldloc.1 + IL_0030: ldloc.0 + IL_0031: blt.un.s IL_001f - IL_00b3: ret + IL_0033: ret } - .method public static void f11(int64 start, - int64 finish) cil managed + .method public static void f8(int64 step) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 5 - .locals init (int64 V_0, - int64 V_1, + .locals init (uint64 V_0, + uint64 V_1, int64 V_2) IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: conv.i8 - IL_0003: ldarg.1 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, + IL_0001: brtrue.s IL_0012 + + IL_0003: ldc.i4.1 + IL_0004: conv.i8 + IL_0005: ldarg.0 + IL_0006: ldc.i4.s 10 + IL_0008: conv.i8 + IL_0009: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, int64, int64) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: conv.i8 - IL_000c: stloc.0 - IL_000d: ldc.i4.0 - IL_000e: conv.i8 - IL_000f: stloc.1 - IL_0010: ldarg.0 - IL_0011: stloc.2 - IL_0012: br.s IL_0024 + IL_000e: pop + IL_000f: nop + IL_0010: br.s IL_0013 - IL_0014: ldloc.2 - IL_0015: call void assembly::set_c(int64) - IL_001a: ldloc.2 - IL_001b: ldc.i4.0 - IL_001c: conv.i8 - IL_001d: add - IL_001e: stloc.2 - IL_001f: ldloc.1 - IL_0020: ldc.i4.1 - IL_0021: conv.i8 - IL_0022: add - IL_0023: stloc.1 - IL_0024: ldloc.1 - IL_0025: ldloc.0 - IL_0026: blt.un.s IL_0014 + IL_0012: nop + IL_0013: ldc.i4.0 + IL_0014: conv.i8 + IL_0015: ldarg.0 + IL_0016: bge.s IL_0023 - IL_0028: ret - } + IL_0018: ldc.i4.s 9 + IL_001a: conv.i8 + IL_001b: ldarg.0 + IL_001c: div.un + IL_001d: ldc.i4.1 + IL_001e: conv.i8 + IL_001f: add.ovf.un + IL_0020: nop + IL_0021: br.s IL_0026 - .method public static void f12() cil managed - { - - .maxstack 5 - .locals init (int64 V_0, - int64 V_1, - int64 V_2) - IL_0000: ldc.i4.1 - IL_0001: conv.i8 - IL_0002: ldc.i4.0 - IL_0003: conv.i8 - IL_0004: ldc.i4.s 10 - IL_0006: conv.i8 - IL_0007: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt64(int64, - int64, - int64) - IL_000c: pop - IL_000d: ldc.i4.0 - IL_000e: conv.i8 - IL_000f: stloc.0 - IL_0010: ldc.i4.0 - IL_0011: conv.i8 - IL_0012: stloc.1 - IL_0013: ldc.i4.1 - IL_0014: conv.i8 - IL_0015: stloc.2 - IL_0016: br.s IL_0028 + IL_0023: ldc.i4.0 + IL_0024: conv.i8 + IL_0025: nop + IL_0026: stloc.0 + IL_0027: ldc.i4.0 + IL_0028: conv.i8 + IL_0029: stloc.1 + IL_002a: ldc.i4.1 + IL_002b: conv.i8 + IL_002c: stloc.2 + IL_002d: br.s IL_003e - IL_0018: ldloc.2 - IL_0019: call void assembly::set_c(int64) - IL_001e: ldloc.2 - IL_001f: ldc.i4.0 - IL_0020: conv.i8 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.1 - IL_0024: ldc.i4.1 - IL_0025: conv.i8 - IL_0026: add - IL_0027: stloc.1 - IL_0028: ldloc.1 - IL_0029: ldloc.0 - IL_002a: blt.un.s IL_0018 + IL_002f: ldloc.2 + IL_0030: call void assembly::set_c(int64) + IL_0035: ldloc.2 + IL_0036: ldarg.0 + IL_0037: add + IL_0038: stloc.2 + IL_0039: ldloc.1 + IL_003a: ldc.i4.1 + IL_003b: conv.i8 + IL_003c: add + IL_003d: stloc.1 + IL_003e: ldloc.1 + IL_003f: ldloc.0 + IL_0040: blt.un.s IL_002f - IL_002c: ret + IL_0042: ret } - .method public static void f13() cil managed + .method public static void f9(int64 finish) cil managed { .maxstack 4 .locals init (uint64 V_0, - int64 V_1) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.s 10 - IL_0005: conv.i8 - IL_0006: stloc.1 - IL_0007: br.s IL_0019 + uint64 V_1, + int64 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.1 + IL_0002: conv.i8 + IL_0003: bge.s IL_000a - IL_0009: ldloc.1 - IL_000a: call void assembly::set_c(int64) - IL_000f: ldloc.1 - IL_0010: ldc.i4.m1 - IL_0011: conv.i8 - IL_0012: add - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: ldc.i4.1 - IL_0016: conv.i8 - IL_0017: add - IL_0018: stloc.0 - IL_0019: ldloc.0 - IL_001a: ldc.i4.s 10 - IL_001c: conv.i8 - IL_001d: blt.un.s IL_0009 + IL_0005: ldc.i4.0 + IL_0006: conv.i8 + IL_0007: nop + IL_0008: br.s IL_0015 - IL_001f: ret + IL_000a: ldarg.0 + IL_000b: ldc.i4.1 + IL_000c: conv.i8 + IL_000d: sub + IL_000e: ldc.i4.2 + IL_000f: conv.i8 + IL_0010: div.un + IL_0011: ldc.i4.1 + IL_0012: conv.i8 + IL_0013: add.ovf.un + IL_0014: nop + IL_0015: stloc.0 + IL_0016: ldc.i4.0 + IL_0017: conv.i8 + IL_0018: stloc.1 + IL_0019: ldc.i4.1 + IL_001a: conv.i8 + IL_001b: stloc.2 + IL_001c: br.s IL_002e + + IL_001e: ldloc.2 + IL_001f: call void assembly::set_c(int64) + IL_0024: ldloc.2 + IL_0025: ldc.i4.2 + IL_0026: conv.i8 + IL_0027: add + IL_0028: stloc.2 + IL_0029: ldloc.1 + IL_002a: ldc.i4.1 + IL_002b: conv.i8 + IL_002c: add + IL_002d: stloc.1 + IL_002e: ldloc.1 + IL_002f: ldloc.0 + IL_0030: blt.un.s IL_001e + + IL_0032: ret } - .method public static void f14() cil managed + .method public specialname static int64 get_c() cil managed { - .maxstack 4 - .locals init (uint64 V_0, - int64 V_1) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.s 10 - IL_0005: conv.i8 - IL_0006: stloc.1 - IL_0007: br.s IL_001a - - IL_0009: ldloc.1 - IL_000a: call void assembly::set_c(int64) - IL_000f: ldloc.1 - IL_0010: ldc.i4.s -2 - IL_0012: conv.i8 - IL_0013: add - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldloc.0 - IL_001b: ldc.i4.5 - IL_001c: conv.i8 - IL_001d: blt.un.s IL_0009 - - IL_001f: ret + .maxstack 8 + IL_0000: ldsfld int64 assembly::c@1 + IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static void set_c(int64 '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 int64 assembly::c@1 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -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..d1483b3c304 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 @@ -33,21 +33,15 @@ 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 public specialname static native int get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld native int ''.$assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(native int 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld native int ''.$assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -152,438 +146,651 @@ IL_0045: ret } - .method public static void f2(native int start) cil managed + .method public static void f10(native int start, + native int step, + native int finish) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) - .maxstack 4 + .maxstack 5 .locals init (native int V_0, bool V_1, native int V_2, native int V_3, native int V_4) - IL_0000: ldc.i8 0xa - IL_0009: conv.i - IL_000a: ldarg.0 - IL_000b: bge.s IL_001a + IL_0000: ldarg.1 + IL_0001: ldc.i8 0x0 + IL_000a: conv.i + IL_000b: bne.un.s IL_0019 - IL_000d: ldc.i8 0x0 - IL_0016: conv.i - IL_0017: nop - IL_0018: br.s IL_0027 + IL_000d: ldarg.2 + IL_000e: ldarg.1 + IL_000f: ldarg.2 + IL_0010: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, + native int, + native int) + IL_0015: pop + IL_0016: nop + IL_0017: br.s IL_001a - IL_001a: ldc.i8 0xa + IL_0019: nop + IL_001a: ldc.i8 0x0 IL_0023: conv.i - IL_0024: ldarg.0 - IL_0025: sub - IL_0026: nop - IL_0027: stloc.0 - IL_0028: sizeof [runtime]System.IntPtr - IL_002e: ldc.i4.4 - IL_002f: bne.un.s IL_0041 - - IL_0031: ldloc.0 - IL_0032: ldc.i8 0xffffffff - IL_003b: conv.u - IL_003c: ceq - IL_003e: nop - IL_003f: br.s IL_004f + IL_0024: ldarg.1 + IL_0025: bge.s IL_0040 - IL_0041: ldloc.0 - IL_0042: ldc.i8 0xffffffffffffffff - IL_004b: conv.u - IL_004c: ceq - IL_004e: nop - IL_004f: brfalse.s IL_0094 + IL_0027: ldarg.2 + IL_0028: ldarg.2 + IL_0029: bge.s IL_0038 - IL_0051: ldc.i4.1 - IL_0052: stloc.1 - IL_0053: ldc.i8 0x0 - IL_005c: conv.i - IL_005d: stloc.2 - IL_005e: ldarg.0 - IL_005f: stloc.3 - IL_0060: br.s IL_0090 + IL_002b: ldc.i8 0x0 + IL_0034: conv.i + IL_0035: nop + IL_0036: br.s IL_0065 - IL_0062: ldloc.3 - IL_0063: call void assembly::set_c(native int) - IL_0068: ldloc.3 - IL_0069: ldc.i8 0x1 - IL_0072: conv.i - IL_0073: add - IL_0074: stloc.3 - IL_0075: ldloc.2 - IL_0076: ldc.i8 0x1 - IL_007f: conv.i - IL_0080: add - IL_0081: stloc.2 - IL_0082: ldloc.2 - IL_0083: ldc.i8 0x0 - IL_008c: conv.i - IL_008d: cgt.un - IL_008f: stloc.1 - IL_0090: ldloc.1 - IL_0091: brtrue.s IL_0062 + IL_0038: ldarg.2 + IL_0039: ldarg.2 + IL_003a: sub + IL_003b: ldarg.1 + IL_003c: div.un + IL_003d: nop + IL_003e: br.s IL_0065 - IL_0093: ret + IL_0040: ldarg.2 + IL_0041: ldarg.2 + IL_0042: bge.s IL_0051 - IL_0094: ldc.i8 0xa - IL_009d: conv.i - IL_009e: ldarg.0 - IL_009f: bge.s IL_00ae + IL_0044: ldc.i8 0x0 + IL_004d: conv.i + IL_004e: nop + IL_004f: br.s IL_0065 - IL_00a1: ldc.i8 0x0 - IL_00aa: conv.i - IL_00ab: nop - IL_00ac: br.s IL_00c6 + IL_0051: ldarg.2 + IL_0052: ldarg.2 + IL_0053: sub + IL_0054: ldarg.1 + IL_0055: not + IL_0056: ldc.i8 0x1 + IL_005f: conv.i + IL_0060: add + IL_0061: div.un + IL_0062: nop + IL_0063: br.s IL_0065 - IL_00ae: ldc.i8 0xa - IL_00b7: conv.i - IL_00b8: ldarg.0 - IL_00b9: sub - IL_00ba: ldc.i8 0x1 - IL_00c3: conv.i - IL_00c4: add.ovf.un - IL_00c5: nop - IL_00c6: stloc.2 - IL_00c7: ldc.i8 0x0 - IL_00d0: conv.i - IL_00d1: stloc.3 - IL_00d2: ldarg.0 - IL_00d3: stloc.s V_4 - IL_00d5: br.s IL_00fa + IL_0065: stloc.0 + IL_0066: sizeof [runtime]System.IntPtr + IL_006c: ldc.i4.4 + IL_006d: bne.un.s IL_007f - IL_00d7: ldloc.s V_4 - IL_00d9: call void assembly::set_c(native int) - IL_00de: ldloc.s V_4 - IL_00e0: ldc.i8 0x1 - IL_00e9: conv.i - IL_00ea: add - IL_00eb: stloc.s V_4 - IL_00ed: ldloc.3 - IL_00ee: ldc.i8 0x1 - IL_00f7: conv.i - IL_00f8: add - IL_00f9: stloc.3 - IL_00fa: ldloc.3 - IL_00fb: ldloc.2 - IL_00fc: blt.un.s IL_00d7 + IL_006f: ldloc.0 + IL_0070: ldc.i8 0xffffffff + IL_0079: conv.u + IL_007a: ceq + IL_007c: nop + IL_007d: br.s IL_008d - IL_00fe: ret - } + IL_007f: ldloc.0 + IL_0080: ldc.i8 0xffffffffffffffff + IL_0089: conv.u + IL_008a: ceq + IL_008c: nop + IL_008d: brfalse.s IL_00c9 - .method public static void f3(native int finish) cil managed - { - - .maxstack 4 - .locals init (native int V_0, - bool V_1, - native int V_2, - native int V_3, - native int V_4) - IL_0000: ldarg.0 - IL_0001: ldc.i8 0x1 - IL_000a: conv.i - IL_000b: bge.s IL_001a + IL_008f: ldc.i4.1 + IL_0090: stloc.1 + IL_0091: ldc.i8 0x0 + IL_009a: conv.i + IL_009b: stloc.2 + IL_009c: ldarg.2 + IL_009d: stloc.3 + IL_009e: br.s IL_00c5 - IL_000d: ldc.i8 0x0 - IL_0016: conv.i - IL_0017: nop - IL_0018: br.s IL_0027 + IL_00a0: ldloc.3 + IL_00a1: call void assembly::set_c(native int) + IL_00a6: ldloc.3 + IL_00a7: ldarg.1 + IL_00a8: add + IL_00a9: stloc.3 + IL_00aa: ldloc.2 + IL_00ab: ldc.i8 0x1 + IL_00b4: conv.i + IL_00b5: add + IL_00b6: stloc.2 + IL_00b7: ldloc.2 + IL_00b8: ldc.i8 0x0 + IL_00c1: conv.i + IL_00c2: cgt.un + IL_00c4: stloc.1 + IL_00c5: ldloc.1 + IL_00c6: brtrue.s IL_00a0 - IL_001a: ldarg.0 - IL_001b: ldc.i8 0x1 - IL_0024: conv.i - IL_0025: sub - IL_0026: nop - IL_0027: stloc.0 - IL_0028: sizeof [runtime]System.IntPtr - IL_002e: ldc.i4.4 - IL_002f: bne.un.s IL_0041 + IL_00c8: ret - IL_0031: ldloc.0 - IL_0032: ldc.i8 0xffffffff - IL_003b: conv.u - IL_003c: ceq - IL_003e: nop - IL_003f: br.s IL_004f + IL_00c9: ldc.i8 0x0 + IL_00d2: conv.i + IL_00d3: ldarg.1 + IL_00d4: bge.s IL_00fa - IL_0041: ldloc.0 - IL_0042: ldc.i8 0xffffffffffffffff - IL_004b: conv.u - IL_004c: ceq - IL_004e: nop - IL_004f: brfalse.s IL_009d + IL_00d6: ldarg.2 + IL_00d7: ldarg.2 + IL_00d8: bge.s IL_00e7 - IL_0051: ldc.i4.1 - IL_0052: stloc.1 - IL_0053: ldc.i8 0x0 - IL_005c: conv.i - IL_005d: stloc.2 - IL_005e: ldc.i8 0x1 - IL_0067: conv.i - IL_0068: stloc.3 - IL_0069: br.s IL_0099 + IL_00da: ldc.i8 0x0 + IL_00e3: conv.i + IL_00e4: nop + IL_00e5: br.s IL_012a - IL_006b: ldloc.3 - IL_006c: call void assembly::set_c(native int) - IL_0071: ldloc.3 - IL_0072: ldc.i8 0x1 - IL_007b: conv.i - IL_007c: add - IL_007d: stloc.3 - IL_007e: ldloc.2 - IL_007f: ldc.i8 0x1 - IL_0088: conv.i - IL_0089: add - IL_008a: stloc.2 - IL_008b: ldloc.2 - IL_008c: ldc.i8 0x0 - IL_0095: conv.i - IL_0096: cgt.un - IL_0098: stloc.1 - IL_0099: ldloc.1 - IL_009a: brtrue.s IL_006b + IL_00e7: ldarg.2 + IL_00e8: ldarg.2 + IL_00e9: sub + IL_00ea: ldarg.1 + IL_00eb: div.un + IL_00ec: ldc.i8 0x1 + IL_00f5: conv.i + IL_00f6: add.ovf.un + IL_00f7: nop + IL_00f8: br.s IL_012a - IL_009c: ret + IL_00fa: ldarg.2 + IL_00fb: ldarg.2 + IL_00fc: bge.s IL_010b - IL_009d: ldarg.0 - IL_009e: ldc.i8 0x1 - IL_00a7: conv.i - IL_00a8: bge.s IL_00b7 + IL_00fe: ldc.i8 0x0 + IL_0107: conv.i + IL_0108: nop + IL_0109: br.s IL_012a - IL_00aa: ldc.i8 0x0 - IL_00b3: conv.i - IL_00b4: nop - IL_00b5: br.s IL_00cf + IL_010b: ldarg.2 + IL_010c: ldarg.2 + IL_010d: sub + IL_010e: ldarg.1 + IL_010f: not + IL_0110: ldc.i8 0x1 + IL_0119: conv.i + IL_011a: add + IL_011b: div.un + IL_011c: ldc.i8 0x1 + IL_0125: conv.i + IL_0126: add.ovf.un + IL_0127: nop + IL_0128: br.s IL_012a - IL_00b7: ldarg.0 - IL_00b8: ldc.i8 0x1 - IL_00c1: conv.i - IL_00c2: sub - IL_00c3: ldc.i8 0x1 - IL_00cc: conv.i - IL_00cd: add.ovf.un - IL_00ce: nop - IL_00cf: stloc.2 - IL_00d0: ldc.i8 0x0 - IL_00d9: conv.i - IL_00da: stloc.3 - IL_00db: ldc.i8 0x1 - IL_00e4: conv.i - IL_00e5: stloc.s V_4 - IL_00e7: br.s IL_010c + IL_012a: stloc.2 + IL_012b: ldc.i8 0x0 + IL_0134: conv.i + IL_0135: stloc.3 + IL_0136: ldarg.2 + IL_0137: stloc.s V_4 + IL_0139: br.s IL_0155 - IL_00e9: ldloc.s V_4 - IL_00eb: call void assembly::set_c(native int) - IL_00f0: ldloc.s V_4 - IL_00f2: ldc.i8 0x1 - IL_00fb: conv.i - IL_00fc: add - IL_00fd: stloc.s V_4 - IL_00ff: ldloc.3 - IL_0100: ldc.i8 0x1 - IL_0109: conv.i - IL_010a: add - IL_010b: stloc.3 - IL_010c: ldloc.3 - IL_010d: ldloc.2 - IL_010e: blt.un.s IL_00e9 + IL_013b: ldloc.s V_4 + IL_013d: call void assembly::set_c(native int) + IL_0142: ldloc.s V_4 + IL_0144: ldarg.1 + IL_0145: add + IL_0146: stloc.s V_4 + IL_0148: ldloc.3 + IL_0149: ldc.i8 0x1 + IL_0152: conv.i + IL_0153: add + IL_0154: stloc.3 + IL_0155: ldloc.3 + IL_0156: ldloc.2 + IL_0157: blt.un.s IL_013b - IL_0110: ret + IL_0159: ret } - .method public static void f4(native int start, - native int finish) cil managed + .method public static void f11(native int start, + native int finish) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + .maxstack 5 + .locals init (native int V_0, + native int V_1, + native int V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i8 0x0 + IL_000a: conv.i + IL_000b: ldarg.1 + IL_000c: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, + native int, + native int) + IL_0011: pop + IL_0012: ldc.i8 0x0 + IL_001b: conv.i + IL_001c: stloc.0 + IL_001d: ldc.i8 0x0 + IL_0026: conv.i + IL_0027: stloc.1 + IL_0028: ldarg.0 + IL_0029: stloc.2 + IL_002a: br.s IL_004c + + IL_002c: ldloc.2 + IL_002d: call void assembly::set_c(native int) + IL_0032: ldloc.2 + IL_0033: ldc.i8 0x0 + IL_003c: conv.i + IL_003d: add + IL_003e: stloc.2 + IL_003f: ldloc.1 + IL_0040: ldc.i8 0x1 + IL_0049: conv.i + IL_004a: add + IL_004b: stloc.1 + IL_004c: ldloc.1 + IL_004d: ldloc.0 + IL_004e: blt.un.s IL_002c + + IL_0050: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (native int V_0, + native int V_1, + native int V_2) + IL_0000: ldc.i8 0x1 + IL_0009: conv.i + IL_000a: ldc.i8 0x0 + IL_0013: conv.i + IL_0014: ldc.i8 0xa + IL_001d: conv.i + IL_001e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, + native int, + native int) + IL_0023: pop + IL_0024: ldc.i8 0x0 + IL_002d: conv.i + IL_002e: stloc.0 + IL_002f: ldc.i8 0x0 + IL_0038: conv.i + IL_0039: stloc.1 + IL_003a: ldc.i8 0x1 + IL_0043: conv.i + IL_0044: stloc.2 + IL_0045: br.s IL_0067 + + IL_0047: ldloc.2 + IL_0048: call void assembly::set_c(native int) + IL_004d: ldloc.2 + IL_004e: ldc.i8 0x0 + IL_0057: conv.i + IL_0058: add + IL_0059: stloc.2 + IL_005a: ldloc.1 + IL_005b: ldc.i8 0x1 + IL_0064: conv.i + IL_0065: add + IL_0066: stloc.1 + IL_0067: ldloc.1 + IL_0068: ldloc.0 + IL_0069: blt.un.s IL_0047 + + IL_006b: ret + } + + .method public static void f13() cil managed + { + .maxstack 4 .locals init (native int V_0, bool V_1, native int V_2, native int V_3, native int V_4) - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: bge.s IL_0011 + IL_0000: ldc.i8 0xa + IL_0009: conv.i + IL_000a: ldc.i8 0x1 + IL_0013: conv.i + IL_0014: bge.s IL_0023 - IL_0004: ldc.i8 0x0 - IL_000d: conv.i - IL_000e: nop - IL_000f: br.s IL_0015 + IL_0016: ldc.i8 0x0 + IL_001f: conv.i + IL_0020: nop + IL_0021: br.s IL_0039 - IL_0011: ldarg.1 - IL_0012: ldarg.0 - IL_0013: sub - IL_0014: nop - IL_0015: stloc.0 - IL_0016: sizeof [runtime]System.IntPtr - IL_001c: ldc.i4.4 - IL_001d: bne.un.s IL_002f + IL_0023: ldc.i8 0xa + IL_002c: conv.i + IL_002d: ldc.i8 0x1 + IL_0036: conv.i + IL_0037: sub + IL_0038: nop + IL_0039: stloc.0 + IL_003a: sizeof [runtime]System.IntPtr + IL_0040: ldc.i4.4 + IL_0041: bne.un.s IL_0053 - IL_001f: ldloc.0 - IL_0020: ldc.i8 0xffffffff - IL_0029: conv.u - IL_002a: ceq - IL_002c: nop - IL_002d: br.s IL_003d - - IL_002f: ldloc.0 - IL_0030: ldc.i8 0xffffffffffffffff - IL_0039: conv.u - IL_003a: ceq - IL_003c: nop - IL_003d: brfalse.s IL_0082 + IL_0043: ldloc.0 + IL_0044: ldc.i8 0xffffffff + IL_004d: conv.u + IL_004e: ceq + IL_0050: nop + IL_0051: br.s IL_0061 - IL_003f: ldc.i4.1 - IL_0040: stloc.1 - IL_0041: ldc.i8 0x0 - IL_004a: conv.i - IL_004b: stloc.2 - IL_004c: ldarg.0 - IL_004d: stloc.3 - IL_004e: br.s IL_007e + IL_0053: ldloc.0 + IL_0054: ldc.i8 0xffffffffffffffff + IL_005d: conv.u + IL_005e: ceq + IL_0060: nop + IL_0061: brfalse.s IL_00af - IL_0050: ldloc.3 - IL_0051: call void assembly::set_c(native int) - IL_0056: ldloc.3 - IL_0057: ldc.i8 0x1 - IL_0060: conv.i - IL_0061: add - IL_0062: stloc.3 - IL_0063: ldloc.2 - IL_0064: ldc.i8 0x1 - IL_006d: conv.i - IL_006e: add + IL_0063: ldc.i4.1 + IL_0064: stloc.1 + IL_0065: ldc.i8 0x0 + IL_006e: conv.i IL_006f: stloc.2 - IL_0070: ldloc.2 - IL_0071: ldc.i8 0x0 - IL_007a: conv.i - IL_007b: cgt.un - IL_007d: stloc.1 - IL_007e: ldloc.1 - IL_007f: brtrue.s IL_0050 + IL_0070: ldc.i8 0xa + IL_0079: conv.i + IL_007a: stloc.3 + IL_007b: br.s IL_00ab - IL_0081: ret + IL_007d: ldloc.3 + IL_007e: call void assembly::set_c(native int) + IL_0083: ldloc.3 + IL_0084: ldc.i8 0xffffffffffffffff + IL_008d: conv.i + IL_008e: add + IL_008f: stloc.3 + IL_0090: ldloc.2 + IL_0091: ldc.i8 0x1 + IL_009a: conv.i + IL_009b: add + IL_009c: stloc.2 + IL_009d: ldloc.2 + IL_009e: ldc.i8 0x0 + IL_00a7: conv.i + IL_00a8: cgt.un + IL_00aa: stloc.1 + IL_00ab: ldloc.1 + IL_00ac: brtrue.s IL_007d - IL_0082: ldarg.1 - IL_0083: ldarg.0 - IL_0084: bge.s IL_0093 + IL_00ae: ret - IL_0086: ldc.i8 0x0 - IL_008f: conv.i - IL_0090: nop - IL_0091: br.s IL_00a2 + IL_00af: ldc.i8 0xa + IL_00b8: conv.i + IL_00b9: ldc.i8 0x1 + IL_00c2: conv.i + IL_00c3: bge.s IL_00d2 - IL_0093: ldarg.1 - IL_0094: ldarg.0 - IL_0095: sub - IL_0096: ldc.i8 0x1 - IL_009f: conv.i - IL_00a0: add.ovf.un - IL_00a1: nop - IL_00a2: stloc.2 - IL_00a3: ldc.i8 0x0 - IL_00ac: conv.i - IL_00ad: stloc.3 - IL_00ae: ldarg.0 - IL_00af: stloc.s V_4 - IL_00b1: br.s IL_00d6 + IL_00c5: ldc.i8 0x0 + IL_00ce: conv.i + IL_00cf: nop + IL_00d0: br.s IL_00f3 - IL_00b3: ldloc.s V_4 - IL_00b5: call void assembly::set_c(native int) - IL_00ba: ldloc.s V_4 - IL_00bc: ldc.i8 0x1 - IL_00c5: conv.i - IL_00c6: add - IL_00c7: stloc.s V_4 - IL_00c9: ldloc.3 - IL_00ca: ldc.i8 0x1 - IL_00d3: conv.i - IL_00d4: add - IL_00d5: stloc.3 - IL_00d6: ldloc.3 - IL_00d7: ldloc.2 - IL_00d8: blt.un.s IL_00b3 + IL_00d2: ldc.i8 0xa + IL_00db: conv.i + IL_00dc: ldc.i8 0x1 + IL_00e5: conv.i + IL_00e6: sub + IL_00e7: ldc.i8 0x1 + IL_00f0: conv.i + IL_00f1: add.ovf.un + IL_00f2: nop + IL_00f3: stloc.2 + IL_00f4: ldc.i8 0x0 + IL_00fd: conv.i + IL_00fe: stloc.3 + IL_00ff: ldc.i8 0xa + IL_0108: conv.i + IL_0109: stloc.s V_4 + IL_010b: br.s IL_0130 - IL_00da: ret + IL_010d: ldloc.s V_4 + IL_010f: call void assembly::set_c(native int) + IL_0114: ldloc.s V_4 + IL_0116: ldc.i8 0xffffffffffffffff + IL_011f: conv.i + IL_0120: add + IL_0121: stloc.s V_4 + IL_0123: ldloc.3 + IL_0124: ldc.i8 0x1 + IL_012d: conv.i + IL_012e: add + IL_012f: stloc.3 + IL_0130: ldloc.3 + IL_0131: ldloc.2 + IL_0132: blt.un.s IL_010d + + IL_0134: ret } - .method public static void f5() cil managed + .method public static void f14() cil managed { - .maxstack 4 + .maxstack 5 .locals init (native int V_0, - native int V_1) - IL_0000: ldc.i8 0x0 + bool V_1, + native int V_2, + native int V_3, + native int V_4) + IL_0000: ldc.i8 0xfffffffffffffffe IL_0009: conv.i - IL_000a: stloc.0 - IL_000b: ldc.i8 0x1 - IL_0014: conv.i - IL_0015: stloc.1 - IL_0016: br.s IL_0038 - - IL_0018: ldloc.1 - IL_0019: call void assembly::set_c(native int) - IL_001e: ldloc.1 - IL_001f: ldc.i8 0x1 - IL_0028: conv.i - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.0 - IL_002c: ldc.i8 0x1 - IL_0035: conv.i - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ldc.i8 0xa - IL_0042: conv.u - IL_0043: blt.un.s IL_0018 + IL_000a: ldc.i8 0x0 + IL_0013: conv.i + IL_0014: bne.un.s IL_003d - IL_0045: ret - } + IL_0016: ldc.i8 0xa + IL_001f: conv.i + IL_0020: ldc.i8 0xfffffffffffffffe + IL_0029: conv.i + IL_002a: ldc.i8 0x1 + IL_0033: conv.i + IL_0034: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, + native int, + native int) + IL_0039: pop + IL_003a: nop + IL_003b: br.s IL_003e - .method public static void f6() cil managed - { - - .maxstack 4 - .locals init (native int V_0, - native int V_1) - IL_0000: ldc.i8 0x0 - IL_0009: conv.i - IL_000a: stloc.0 - IL_000b: ldc.i8 0x1 - IL_0014: conv.i - IL_0015: stloc.1 - IL_0016: br.s IL_0038 + IL_003d: nop + IL_003e: ldc.i8 0x0 + IL_0047: conv.i + IL_0048: ldc.i8 0xfffffffffffffffe + IL_0051: conv.i + IL_0052: bge.s IL_009d - IL_0018: ldloc.1 - IL_0019: call void assembly::set_c(native int) - IL_001e: ldloc.1 - IL_001f: ldc.i8 0x2 - IL_0028: conv.i - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.0 - IL_002c: ldc.i8 0x1 - IL_0035: conv.i - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ldc.i8 0x5 - IL_0042: conv.u - IL_0043: blt.un.s IL_0018 + IL_0054: ldc.i8 0x1 + IL_005d: conv.i + IL_005e: ldc.i8 0xa + IL_0067: conv.i + IL_0068: bge.s IL_007a - IL_0045: ret - } + IL_006a: ldc.i8 0x0 + IL_0073: conv.i + IL_0074: nop + IL_0075: br IL_00ef - .method public static void f7(native int start) cil managed - { - + IL_007a: ldc.i8 0x1 + IL_0083: conv.i + IL_0084: ldc.i8 0xa + IL_008d: conv.i + IL_008e: sub + IL_008f: ldc.i8 0xfffffffffffffffe + IL_0098: conv.i + IL_0099: div.un + IL_009a: nop + IL_009b: br.s IL_00ef + + IL_009d: ldc.i8 0xa + IL_00a6: conv.i + IL_00a7: ldc.i8 0x1 + IL_00b0: conv.i + IL_00b1: bge.s IL_00c0 + + IL_00b3: ldc.i8 0x0 + IL_00bc: conv.i + IL_00bd: nop + IL_00be: br.s IL_00ef + + IL_00c0: ldc.i8 0xa + IL_00c9: conv.i + IL_00ca: ldc.i8 0x1 + IL_00d3: conv.i + IL_00d4: sub + IL_00d5: ldc.i8 0xfffffffffffffffe + IL_00de: conv.i + IL_00df: not + IL_00e0: ldc.i8 0x1 + IL_00e9: conv.i + IL_00ea: add + IL_00eb: div.un + IL_00ec: nop + IL_00ed: br.s IL_00ef + + IL_00ef: stloc.0 + IL_00f0: sizeof [runtime]System.IntPtr + IL_00f6: ldc.i4.4 + IL_00f7: bne.un.s IL_0109 + + IL_00f9: ldloc.0 + IL_00fa: ldc.i8 0xffffffff + IL_0103: conv.u + IL_0104: ceq + IL_0106: nop + IL_0107: br.s IL_0117 + + IL_0109: ldloc.0 + IL_010a: ldc.i8 0xffffffffffffffff + IL_0113: conv.u + IL_0114: ceq + IL_0116: nop + IL_0117: brfalse.s IL_0165 + + IL_0119: ldc.i4.1 + IL_011a: stloc.1 + IL_011b: ldc.i8 0x0 + IL_0124: conv.i + IL_0125: stloc.2 + IL_0126: ldc.i8 0xa + IL_012f: conv.i + IL_0130: stloc.3 + IL_0131: br.s IL_0161 + + IL_0133: ldloc.3 + IL_0134: call void assembly::set_c(native int) + IL_0139: ldloc.3 + IL_013a: ldc.i8 0xfffffffffffffffe + IL_0143: conv.i + IL_0144: add + IL_0145: stloc.3 + IL_0146: ldloc.2 + IL_0147: ldc.i8 0x1 + IL_0150: conv.i + IL_0151: add + IL_0152: stloc.2 + IL_0153: ldloc.2 + IL_0154: ldc.i8 0x0 + IL_015d: conv.i + IL_015e: cgt.un + IL_0160: stloc.1 + IL_0161: ldloc.1 + IL_0162: brtrue.s IL_0133 + + IL_0164: ret + + IL_0165: ldc.i8 0x0 + IL_016e: conv.i + IL_016f: ldc.i8 0xfffffffffffffffe + IL_0178: conv.i + IL_0179: bge.s IL_01cf + + IL_017b: ldc.i8 0x1 + IL_0184: conv.i + IL_0185: ldc.i8 0xa + IL_018e: conv.i + IL_018f: bge.s IL_01a1 + + IL_0191: ldc.i8 0x0 + IL_019a: conv.i + IL_019b: nop + IL_019c: br IL_022c + + IL_01a1: ldc.i8 0x1 + IL_01aa: conv.i + IL_01ab: ldc.i8 0xa + IL_01b4: conv.i + IL_01b5: sub + IL_01b6: ldc.i8 0xfffffffffffffffe + IL_01bf: conv.i + IL_01c0: div.un + IL_01c1: ldc.i8 0x1 + IL_01ca: conv.i + IL_01cb: add.ovf.un + IL_01cc: nop + IL_01cd: br.s IL_022c + + IL_01cf: ldc.i8 0xa + IL_01d8: conv.i + IL_01d9: ldc.i8 0x1 + IL_01e2: conv.i + IL_01e3: bge.s IL_01f2 + + IL_01e5: ldc.i8 0x0 + IL_01ee: conv.i + IL_01ef: nop + IL_01f0: br.s IL_022c + + IL_01f2: ldc.i8 0xa + IL_01fb: conv.i + IL_01fc: ldc.i8 0x1 + IL_0205: conv.i + IL_0206: sub + IL_0207: ldc.i8 0xfffffffffffffffe + IL_0210: conv.i + IL_0211: not + IL_0212: ldc.i8 0x1 + IL_021b: conv.i + IL_021c: add + IL_021d: div.un + IL_021e: ldc.i8 0x1 + IL_0227: conv.i + IL_0228: add.ovf.un + IL_0229: nop + IL_022a: br.s IL_022c + + IL_022c: stloc.2 + IL_022d: ldc.i8 0x0 + IL_0236: conv.i + IL_0237: stloc.3 + IL_0238: ldc.i8 0xa + IL_0241: conv.i + IL_0242: stloc.s V_4 + IL_0244: br.s IL_0269 + + IL_0246: ldloc.s V_4 + IL_0248: call void assembly::set_c(native int) + IL_024d: ldloc.s V_4 + IL_024f: ldc.i8 0xfffffffffffffffe + IL_0258: conv.i + IL_0259: add + IL_025a: stloc.s V_4 + IL_025c: ldloc.3 + IL_025d: ldc.i8 0x1 + IL_0266: conv.i + IL_0267: add + IL_0268: stloc.3 + IL_0269: ldloc.3 + IL_026a: ldloc.2 + IL_026b: blt.un.s IL_0246 + + IL_026d: ret + } + + .method public static void f2(native int start) cil managed + { + .maxstack 4 .locals init (native int V_0, - native int V_1, - native int V_2) + bool V_1, + native int V_2, + native int V_3, + native int V_4) IL_0000: ldc.i8 0xa IL_0009: conv.i IL_000a: ldarg.0 @@ -592,265 +799,117 @@ IL_000d: ldc.i8 0x0 IL_0016: conv.i IL_0017: nop - IL_0018: br.s IL_003d + IL_0018: br.s IL_0027 IL_001a: ldc.i8 0xa IL_0023: conv.i IL_0024: ldarg.0 IL_0025: sub - IL_0026: ldc.i8 0x2 - IL_002f: conv.i - IL_0030: div.un - IL_0031: ldc.i8 0x1 - IL_003a: conv.i - IL_003b: add.ovf.un - IL_003c: nop - IL_003d: stloc.0 - IL_003e: ldc.i8 0x0 - IL_0047: conv.i - IL_0048: stloc.1 - IL_0049: ldarg.0 - IL_004a: stloc.2 - IL_004b: br.s IL_006d + IL_0026: nop + IL_0027: stloc.0 + IL_0028: sizeof [runtime]System.IntPtr + IL_002e: ldc.i4.4 + IL_002f: bne.un.s IL_0041 - IL_004d: ldloc.2 - IL_004e: call void assembly::set_c(native int) - IL_0053: ldloc.2 - IL_0054: ldc.i8 0x2 - IL_005d: conv.i - IL_005e: add - IL_005f: stloc.2 - IL_0060: ldloc.1 - IL_0061: ldc.i8 0x1 - IL_006a: conv.i - IL_006b: add - IL_006c: stloc.1 - IL_006d: ldloc.1 - IL_006e: ldloc.0 - IL_006f: blt.un.s IL_004d + IL_0031: ldloc.0 + IL_0032: ldc.i8 0xffffffff + IL_003b: conv.u + IL_003c: ceq + IL_003e: nop + IL_003f: br.s IL_004f - IL_0071: ret - } + IL_0041: ldloc.0 + IL_0042: ldc.i8 0xffffffffffffffff + IL_004b: conv.u + IL_004c: ceq + IL_004e: nop + IL_004f: brfalse.s IL_0094 - .method public static void f8(native int step) cil managed - { - - .maxstack 5 - .locals init (native int V_0, - bool V_1, - native int V_2, - native int V_3, - native int V_4) - IL_0000: ldarg.0 - IL_0001: ldc.i8 0x0 - IL_000a: conv.i - IL_000b: bne.un.s IL_002b - - IL_000d: ldc.i8 0x1 - IL_0016: conv.i - IL_0017: ldarg.0 - IL_0018: ldc.i8 0xa - IL_0021: conv.i - IL_0022: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, - native int, - native int) - IL_0027: pop - IL_0028: nop - IL_0029: br.s IL_002c - - IL_002b: nop - IL_002c: ldc.i8 0x0 - IL_0035: conv.i - IL_0036: ldarg.0 - IL_0037: bge.s IL_0076 - - IL_0039: ldc.i8 0xa - IL_0042: conv.i - IL_0043: ldc.i8 0x1 - IL_004c: conv.i - IL_004d: bge.s IL_005c - - IL_004f: ldc.i8 0x0 - IL_0058: conv.i - IL_0059: nop - IL_005a: br.s IL_00bf - - IL_005c: ldc.i8 0xa - IL_0065: conv.i - IL_0066: ldc.i8 0x1 - IL_006f: conv.i - IL_0070: sub - IL_0071: ldarg.0 - IL_0072: div.un - IL_0073: nop - IL_0074: br.s IL_00bf + IL_0051: ldc.i4.1 + IL_0052: stloc.1 + IL_0053: ldc.i8 0x0 + IL_005c: conv.i + IL_005d: stloc.2 + IL_005e: ldarg.0 + IL_005f: stloc.3 + IL_0060: br.s IL_0090 + IL_0062: ldloc.3 + IL_0063: call void assembly::set_c(native int) + IL_0068: ldloc.3 + IL_0069: ldc.i8 0x1 + IL_0072: conv.i + IL_0073: add + IL_0074: stloc.3 + IL_0075: ldloc.2 IL_0076: ldc.i8 0x1 IL_007f: conv.i - IL_0080: ldc.i8 0xa - IL_0089: conv.i - IL_008a: bge.s IL_0099 - - IL_008c: ldc.i8 0x0 - IL_0095: conv.i - IL_0096: nop - IL_0097: br.s IL_00bf - - IL_0099: ldc.i8 0x1 - IL_00a2: conv.i - IL_00a3: ldc.i8 0xa - IL_00ac: conv.i - IL_00ad: sub - IL_00ae: ldarg.0 - IL_00af: not - IL_00b0: ldc.i8 0x1 - IL_00b9: conv.i - IL_00ba: add - IL_00bb: div.un - IL_00bc: nop - IL_00bd: br.s IL_00bf - - IL_00bf: stloc.0 - IL_00c0: sizeof [runtime]System.IntPtr - IL_00c6: ldc.i4.4 - IL_00c7: bne.un.s IL_00d9 - - IL_00c9: ldloc.0 - IL_00ca: ldc.i8 0xffffffff - IL_00d3: conv.u - IL_00d4: ceq - IL_00d6: nop - IL_00d7: br.s IL_00e7 - - IL_00d9: ldloc.0 - IL_00da: ldc.i8 0xffffffffffffffff - IL_00e3: conv.u - IL_00e4: ceq - IL_00e6: nop - IL_00e7: brfalse.s IL_012c - - IL_00e9: ldc.i4.1 - IL_00ea: stloc.1 - IL_00eb: ldc.i8 0x0 - IL_00f4: conv.i - IL_00f5: stloc.2 - IL_00f6: ldc.i8 0x1 - IL_00ff: conv.i - IL_0100: stloc.3 - IL_0101: br.s IL_0128 - - IL_0103: ldloc.3 - IL_0104: call void assembly::set_c(native int) - IL_0109: ldloc.3 - IL_010a: ldarg.0 - IL_010b: add - IL_010c: stloc.3 - IL_010d: ldloc.2 - IL_010e: ldc.i8 0x1 - IL_0117: conv.i - IL_0118: add - IL_0119: stloc.2 - IL_011a: ldloc.2 - IL_011b: ldc.i8 0x0 - IL_0124: conv.i - IL_0125: cgt.un - IL_0127: stloc.1 - IL_0128: ldloc.1 - IL_0129: brtrue.s IL_0103 - - IL_012b: ret - - IL_012c: ldc.i8 0x0 - IL_0135: conv.i - IL_0136: ldarg.0 - IL_0137: bge.s IL_0184 - - IL_0139: ldc.i8 0xa - IL_0142: conv.i - IL_0143: ldc.i8 0x1 - IL_014c: conv.i - IL_014d: bge.s IL_015f - - IL_014f: ldc.i8 0x0 - IL_0158: conv.i - IL_0159: nop - IL_015a: br IL_01d8 - - IL_015f: ldc.i8 0xa - IL_0168: conv.i - IL_0169: ldc.i8 0x1 - IL_0172: conv.i - IL_0173: sub - IL_0174: ldarg.0 - IL_0175: div.un - IL_0176: ldc.i8 0x1 - IL_017f: conv.i - IL_0180: add.ovf.un - IL_0181: nop - IL_0182: br.s IL_01d8 + IL_0080: add + IL_0081: stloc.2 + IL_0082: ldloc.2 + IL_0083: ldc.i8 0x0 + IL_008c: conv.i + IL_008d: cgt.un + IL_008f: stloc.1 + IL_0090: ldloc.1 + IL_0091: brtrue.s IL_0062 - IL_0184: ldc.i8 0x1 - IL_018d: conv.i - IL_018e: ldc.i8 0xa - IL_0197: conv.i - IL_0198: bge.s IL_01a7 + IL_0093: ret - IL_019a: ldc.i8 0x0 - IL_01a3: conv.i - IL_01a4: nop - IL_01a5: br.s IL_01d8 + IL_0094: ldc.i8 0xa + IL_009d: conv.i + IL_009e: ldarg.0 + IL_009f: bge.s IL_00ae - IL_01a7: ldc.i8 0x1 - IL_01b0: conv.i - IL_01b1: ldc.i8 0xa - IL_01ba: conv.i - IL_01bb: sub - IL_01bc: ldarg.0 - IL_01bd: not - IL_01be: ldc.i8 0x1 - IL_01c7: conv.i - IL_01c8: add - IL_01c9: div.un - IL_01ca: ldc.i8 0x1 - IL_01d3: conv.i - IL_01d4: add.ovf.un - IL_01d5: nop - IL_01d6: br.s IL_01d8 + IL_00a1: ldc.i8 0x0 + IL_00aa: conv.i + IL_00ab: nop + IL_00ac: br.s IL_00c6 - IL_01d8: stloc.2 - IL_01d9: ldc.i8 0x0 - IL_01e2: conv.i - IL_01e3: stloc.3 - IL_01e4: ldc.i8 0x1 - IL_01ed: conv.i - IL_01ee: stloc.s V_4 - IL_01f0: br.s IL_020c + IL_00ae: ldc.i8 0xa + IL_00b7: conv.i + IL_00b8: ldarg.0 + IL_00b9: sub + IL_00ba: ldc.i8 0x1 + IL_00c3: conv.i + IL_00c4: add.ovf.un + IL_00c5: nop + IL_00c6: stloc.2 + IL_00c7: ldc.i8 0x0 + IL_00d0: conv.i + IL_00d1: stloc.3 + IL_00d2: ldarg.0 + IL_00d3: stloc.s V_4 + IL_00d5: br.s IL_00fa - IL_01f2: ldloc.s V_4 - IL_01f4: call void assembly::set_c(native int) - IL_01f9: ldloc.s V_4 - IL_01fb: ldarg.0 - IL_01fc: add - IL_01fd: stloc.s V_4 - IL_01ff: ldloc.3 - IL_0200: ldc.i8 0x1 - IL_0209: conv.i - IL_020a: add - IL_020b: stloc.3 - IL_020c: ldloc.3 - IL_020d: ldloc.2 - IL_020e: blt.un.s IL_01f2 + IL_00d7: ldloc.s V_4 + IL_00d9: call void assembly::set_c(native int) + IL_00de: ldloc.s V_4 + IL_00e0: ldc.i8 0x1 + IL_00e9: conv.i + IL_00ea: add + IL_00eb: stloc.s V_4 + IL_00ed: ldloc.3 + IL_00ee: ldc.i8 0x1 + IL_00f7: conv.i + IL_00f8: add + IL_00f9: stloc.3 + IL_00fa: ldloc.3 + IL_00fb: ldloc.2 + IL_00fc: blt.un.s IL_00d7 - IL_0210: ret + IL_00fe: ret } - .method public static void f9(native int finish) cil managed + .method public static void f3(native int finish) cil managed { .maxstack 4 .locals init (native int V_0, - native int V_1, - native int V_2) + bool V_1, + native int V_2, + native int V_3, + native int V_4) IL_0000: ldarg.0 IL_0001: ldc.i8 0x1 IL_000a: conv.i @@ -859,462 +918,351 @@ IL_000d: ldc.i8 0x0 IL_0016: conv.i IL_0017: nop - IL_0018: br.s IL_003d + IL_0018: br.s IL_0027 IL_001a: ldarg.0 IL_001b: ldc.i8 0x1 IL_0024: conv.i IL_0025: sub - IL_0026: ldc.i8 0x2 - IL_002f: conv.i - IL_0030: div.un - IL_0031: ldc.i8 0x1 - IL_003a: conv.i - IL_003b: add.ovf.un - IL_003c: nop - IL_003d: stloc.0 - IL_003e: ldc.i8 0x0 - IL_0047: conv.i - IL_0048: stloc.1 - IL_0049: ldc.i8 0x1 - IL_0052: conv.i - IL_0053: stloc.2 - IL_0054: br.s IL_0076 - - IL_0056: ldloc.2 - IL_0057: call void assembly::set_c(native int) - IL_005c: ldloc.2 - IL_005d: ldc.i8 0x2 - IL_0066: conv.i - IL_0067: add - IL_0068: stloc.2 - IL_0069: ldloc.1 - IL_006a: ldc.i8 0x1 - IL_0073: conv.i - IL_0074: add - IL_0075: stloc.1 - IL_0076: ldloc.1 - IL_0077: ldloc.0 - IL_0078: blt.un.s IL_0056 - - IL_007a: ret - } - - .method public static void f10(native int start, - native int step, - native int finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (native int V_0, - bool V_1, - native int V_2, - native int V_3, - native int V_4) - IL_0000: ldarg.1 - IL_0001: ldc.i8 0x0 - IL_000a: conv.i - IL_000b: bne.un.s IL_0019 - - IL_000d: ldarg.2 - IL_000e: ldarg.1 - IL_000f: ldarg.2 - IL_0010: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, - native int, - native int) - IL_0015: pop - IL_0016: nop - IL_0017: br.s IL_001a - - IL_0019: nop - IL_001a: ldc.i8 0x0 - IL_0023: conv.i - IL_0024: ldarg.1 - IL_0025: bge.s IL_0040 - - IL_0027: ldarg.2 - IL_0028: ldarg.2 - IL_0029: bge.s IL_0038 - - IL_002b: ldc.i8 0x0 - IL_0034: conv.i - IL_0035: nop - IL_0036: br.s IL_0065 - - IL_0038: ldarg.2 - IL_0039: ldarg.2 - IL_003a: sub - IL_003b: ldarg.1 - IL_003c: div.un - IL_003d: nop - IL_003e: br.s IL_0065 + IL_0026: nop + IL_0027: stloc.0 + IL_0028: sizeof [runtime]System.IntPtr + IL_002e: ldc.i4.4 + IL_002f: bne.un.s IL_0041 - IL_0040: ldarg.2 - IL_0041: ldarg.2 - IL_0042: bge.s IL_0051 + IL_0031: ldloc.0 + IL_0032: ldc.i8 0xffffffff + IL_003b: conv.u + IL_003c: ceq + IL_003e: nop + IL_003f: br.s IL_004f - IL_0044: ldc.i8 0x0 - IL_004d: conv.i + IL_0041: ldloc.0 + IL_0042: ldc.i8 0xffffffffffffffff + IL_004b: conv.u + IL_004c: ceq IL_004e: nop - IL_004f: br.s IL_0065 + IL_004f: brfalse.s IL_009d - IL_0051: ldarg.2 - IL_0052: ldarg.2 - IL_0053: sub - IL_0054: ldarg.1 - IL_0055: not - IL_0056: ldc.i8 0x1 - IL_005f: conv.i - IL_0060: add - IL_0061: div.un - IL_0062: nop - IL_0063: br.s IL_0065 + IL_0051: ldc.i4.1 + IL_0052: stloc.1 + IL_0053: ldc.i8 0x0 + IL_005c: conv.i + IL_005d: stloc.2 + IL_005e: ldc.i8 0x1 + IL_0067: conv.i + IL_0068: stloc.3 + IL_0069: br.s IL_0099 - IL_0065: stloc.0 - IL_0066: sizeof [runtime]System.IntPtr - IL_006c: ldc.i4.4 - IL_006d: bne.un.s IL_007f + IL_006b: ldloc.3 + IL_006c: call void assembly::set_c(native int) + IL_0071: ldloc.3 + IL_0072: ldc.i8 0x1 + IL_007b: conv.i + IL_007c: add + IL_007d: stloc.3 + IL_007e: ldloc.2 + IL_007f: ldc.i8 0x1 + IL_0088: conv.i + IL_0089: add + IL_008a: stloc.2 + IL_008b: ldloc.2 + IL_008c: ldc.i8 0x0 + IL_0095: conv.i + IL_0096: cgt.un + IL_0098: stloc.1 + IL_0099: ldloc.1 + IL_009a: brtrue.s IL_006b - IL_006f: ldloc.0 - IL_0070: ldc.i8 0xffffffff - IL_0079: conv.u - IL_007a: ceq - IL_007c: nop - IL_007d: br.s IL_008d + IL_009c: ret - IL_007f: ldloc.0 - IL_0080: ldc.i8 0xffffffffffffffff - IL_0089: conv.u - IL_008a: ceq - IL_008c: nop - IL_008d: brfalse.s IL_00c9 + IL_009d: ldarg.0 + IL_009e: ldc.i8 0x1 + IL_00a7: conv.i + IL_00a8: bge.s IL_00b7 - IL_008f: ldc.i4.1 - IL_0090: stloc.1 - IL_0091: ldc.i8 0x0 - IL_009a: conv.i - IL_009b: stloc.2 - IL_009c: ldarg.2 - IL_009d: stloc.3 - IL_009e: br.s IL_00c5 + IL_00aa: ldc.i8 0x0 + IL_00b3: conv.i + IL_00b4: nop + IL_00b5: br.s IL_00cf - IL_00a0: ldloc.3 - IL_00a1: call void assembly::set_c(native int) - IL_00a6: ldloc.3 - IL_00a7: ldarg.1 - IL_00a8: add - IL_00a9: stloc.3 - IL_00aa: ldloc.2 - IL_00ab: ldc.i8 0x1 - IL_00b4: conv.i - IL_00b5: add - IL_00b6: stloc.2 - IL_00b7: ldloc.2 - IL_00b8: ldc.i8 0x0 + IL_00b7: ldarg.0 + IL_00b8: ldc.i8 0x1 IL_00c1: conv.i - IL_00c2: cgt.un - IL_00c4: stloc.1 - IL_00c5: ldloc.1 - IL_00c6: brtrue.s IL_00a0 - - IL_00c8: ret + IL_00c2: sub + IL_00c3: ldc.i8 0x1 + IL_00cc: conv.i + IL_00cd: add.ovf.un + IL_00ce: nop + IL_00cf: stloc.2 + IL_00d0: ldc.i8 0x0 + IL_00d9: conv.i + IL_00da: stloc.3 + IL_00db: ldc.i8 0x1 + IL_00e4: conv.i + IL_00e5: stloc.s V_4 + IL_00e7: br.s IL_010c - IL_00c9: ldc.i8 0x0 - IL_00d2: conv.i - IL_00d3: ldarg.1 - IL_00d4: bge.s IL_00fa + IL_00e9: ldloc.s V_4 + IL_00eb: call void assembly::set_c(native int) + IL_00f0: ldloc.s V_4 + IL_00f2: ldc.i8 0x1 + IL_00fb: conv.i + IL_00fc: add + IL_00fd: stloc.s V_4 + IL_00ff: ldloc.3 + IL_0100: ldc.i8 0x1 + IL_0109: conv.i + IL_010a: add + IL_010b: stloc.3 + IL_010c: ldloc.3 + IL_010d: ldloc.2 + IL_010e: blt.un.s IL_00e9 - IL_00d6: ldarg.2 - IL_00d7: ldarg.2 - IL_00d8: bge.s IL_00e7 + IL_0110: ret + } - IL_00da: ldc.i8 0x0 - IL_00e3: conv.i - IL_00e4: nop - IL_00e5: br.s IL_012a + .method public static void f4(native int start, + native int finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 4 + .locals init (native int V_0, + bool V_1, + native int V_2, + native int V_3, + native int V_4) + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: bge.s IL_0011 - IL_00e7: ldarg.2 - IL_00e8: ldarg.2 - IL_00e9: sub - IL_00ea: ldarg.1 - IL_00eb: div.un - IL_00ec: ldc.i8 0x1 - IL_00f5: conv.i - IL_00f6: add.ovf.un - IL_00f7: nop - IL_00f8: br.s IL_012a + IL_0004: ldc.i8 0x0 + IL_000d: conv.i + IL_000e: nop + IL_000f: br.s IL_0015 - IL_00fa: ldarg.2 - IL_00fb: ldarg.2 - IL_00fc: bge.s IL_010b + IL_0011: ldarg.1 + IL_0012: ldarg.0 + IL_0013: sub + IL_0014: nop + IL_0015: stloc.0 + IL_0016: sizeof [runtime]System.IntPtr + IL_001c: ldc.i4.4 + IL_001d: bne.un.s IL_002f - IL_00fe: ldc.i8 0x0 - IL_0107: conv.i - IL_0108: nop - IL_0109: br.s IL_012a + IL_001f: ldloc.0 + IL_0020: ldc.i8 0xffffffff + IL_0029: conv.u + IL_002a: ceq + IL_002c: nop + IL_002d: br.s IL_003d - IL_010b: ldarg.2 - IL_010c: ldarg.2 - IL_010d: sub - IL_010e: ldarg.1 - IL_010f: not - IL_0110: ldc.i8 0x1 - IL_0119: conv.i - IL_011a: add - IL_011b: div.un - IL_011c: ldc.i8 0x1 - IL_0125: conv.i - IL_0126: add.ovf.un - IL_0127: nop - IL_0128: br.s IL_012a + IL_002f: ldloc.0 + IL_0030: ldc.i8 0xffffffffffffffff + IL_0039: conv.u + IL_003a: ceq + IL_003c: nop + IL_003d: brfalse.s IL_0082 - IL_012a: stloc.2 - IL_012b: ldc.i8 0x0 - IL_0134: conv.i - IL_0135: stloc.3 - IL_0136: ldarg.2 - IL_0137: stloc.s V_4 - IL_0139: br.s IL_0155 + IL_003f: ldc.i4.1 + IL_0040: stloc.1 + IL_0041: ldc.i8 0x0 + IL_004a: conv.i + IL_004b: stloc.2 + IL_004c: ldarg.0 + IL_004d: stloc.3 + IL_004e: br.s IL_007e - IL_013b: ldloc.s V_4 - IL_013d: call void assembly::set_c(native int) - IL_0142: ldloc.s V_4 - IL_0144: ldarg.1 - IL_0145: add - IL_0146: stloc.s V_4 - IL_0148: ldloc.3 - IL_0149: ldc.i8 0x1 - IL_0152: conv.i - IL_0153: add - IL_0154: stloc.3 - IL_0155: ldloc.3 - IL_0156: ldloc.2 - IL_0157: blt.un.s IL_013b + IL_0050: ldloc.3 + IL_0051: call void assembly::set_c(native int) + IL_0056: ldloc.3 + IL_0057: ldc.i8 0x1 + IL_0060: conv.i + IL_0061: add + IL_0062: stloc.3 + IL_0063: ldloc.2 + IL_0064: ldc.i8 0x1 + IL_006d: conv.i + IL_006e: add + IL_006f: stloc.2 + IL_0070: ldloc.2 + IL_0071: ldc.i8 0x0 + IL_007a: conv.i + IL_007b: cgt.un + IL_007d: stloc.1 + IL_007e: ldloc.1 + IL_007f: brtrue.s IL_0050 - IL_0159: ret - } + IL_0081: ret - .method public static void f11(native int start, - native int finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 5 - .locals init (native int V_0, - native int V_1, - native int V_2) - IL_0000: ldarg.0 - IL_0001: ldc.i8 0x0 - IL_000a: conv.i - IL_000b: ldarg.1 - IL_000c: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, - native int, - native int) - IL_0011: pop - IL_0012: ldc.i8 0x0 - IL_001b: conv.i - IL_001c: stloc.0 - IL_001d: ldc.i8 0x0 - IL_0026: conv.i - IL_0027: stloc.1 - IL_0028: ldarg.0 - IL_0029: stloc.2 - IL_002a: br.s IL_004c + IL_0082: ldarg.1 + IL_0083: ldarg.0 + IL_0084: bge.s IL_0093 - IL_002c: ldloc.2 - IL_002d: call void assembly::set_c(native int) - IL_0032: ldloc.2 - IL_0033: ldc.i8 0x0 - IL_003c: conv.i - IL_003d: add - IL_003e: stloc.2 - IL_003f: ldloc.1 - IL_0040: ldc.i8 0x1 - IL_0049: conv.i - IL_004a: add - IL_004b: stloc.1 - IL_004c: ldloc.1 - IL_004d: ldloc.0 - IL_004e: blt.un.s IL_002c + IL_0086: ldc.i8 0x0 + IL_008f: conv.i + IL_0090: nop + IL_0091: br.s IL_00a2 - IL_0050: ret + IL_0093: ldarg.1 + IL_0094: ldarg.0 + IL_0095: sub + IL_0096: ldc.i8 0x1 + IL_009f: conv.i + IL_00a0: add.ovf.un + IL_00a1: nop + IL_00a2: stloc.2 + IL_00a3: ldc.i8 0x0 + IL_00ac: conv.i + IL_00ad: stloc.3 + IL_00ae: ldarg.0 + IL_00af: stloc.s V_4 + IL_00b1: br.s IL_00d6 + + IL_00b3: ldloc.s V_4 + IL_00b5: call void assembly::set_c(native int) + IL_00ba: ldloc.s V_4 + IL_00bc: ldc.i8 0x1 + IL_00c5: conv.i + IL_00c6: add + IL_00c7: stloc.s V_4 + IL_00c9: ldloc.3 + IL_00ca: ldc.i8 0x1 + IL_00d3: conv.i + IL_00d4: add + IL_00d5: stloc.3 + IL_00d6: ldloc.3 + IL_00d7: ldloc.2 + IL_00d8: blt.un.s IL_00b3 + + IL_00da: ret } - .method public static void f12() cil managed + .method public static void f5() cil managed { - .maxstack 5 + .maxstack 4 .locals init (native int V_0, - native int V_1, - native int V_2) - IL_0000: ldc.i8 0x1 + native int V_1) + IL_0000: ldc.i8 0x0 IL_0009: conv.i - IL_000a: ldc.i8 0x0 - IL_0013: conv.i - IL_0014: ldc.i8 0xa - IL_001d: conv.i - IL_001e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, - native int, - native int) - IL_0023: pop - IL_0024: ldc.i8 0x0 - IL_002d: conv.i - IL_002e: stloc.0 - IL_002f: ldc.i8 0x0 - IL_0038: conv.i - IL_0039: stloc.1 - IL_003a: ldc.i8 0x1 - IL_0043: conv.i - IL_0044: stloc.2 - IL_0045: br.s IL_0067 + IL_000a: stloc.0 + IL_000b: ldc.i8 0x1 + IL_0014: conv.i + IL_0015: stloc.1 + IL_0016: br.s IL_0038 - IL_0047: ldloc.2 - IL_0048: call void assembly::set_c(native int) - IL_004d: ldloc.2 - IL_004e: ldc.i8 0x0 - IL_0057: conv.i - IL_0058: add - IL_0059: stloc.2 - IL_005a: ldloc.1 - IL_005b: ldc.i8 0x1 - IL_0064: conv.i - IL_0065: add - IL_0066: stloc.1 - IL_0067: ldloc.1 - IL_0068: ldloc.0 - IL_0069: blt.un.s IL_0047 + IL_0018: ldloc.1 + IL_0019: call void assembly::set_c(native int) + IL_001e: ldloc.1 + IL_001f: ldc.i8 0x1 + IL_0028: conv.i + IL_0029: add + IL_002a: stloc.1 + IL_002b: ldloc.0 + IL_002c: ldc.i8 0x1 + IL_0035: conv.i + IL_0036: add + IL_0037: stloc.0 + IL_0038: ldloc.0 + IL_0039: ldc.i8 0xa + IL_0042: conv.u + IL_0043: blt.un.s IL_0018 - IL_006b: ret + IL_0045: ret } - .method public static void f13() cil managed + .method public static void f6() cil managed { .maxstack 4 .locals init (native int V_0, - bool V_1, - native int V_2, - native int V_3, - native int V_4) - IL_0000: ldc.i8 0xa + native int V_1) + IL_0000: ldc.i8 0x0 IL_0009: conv.i - IL_000a: ldc.i8 0x1 - IL_0013: conv.i - IL_0014: bge.s IL_0023 - - IL_0016: ldc.i8 0x0 - IL_001f: conv.i - IL_0020: nop - IL_0021: br.s IL_0039 - - IL_0023: ldc.i8 0xa - IL_002c: conv.i - IL_002d: ldc.i8 0x1 - IL_0036: conv.i - IL_0037: sub - IL_0038: nop - IL_0039: stloc.0 - IL_003a: sizeof [runtime]System.IntPtr - IL_0040: ldc.i4.4 - IL_0041: bne.un.s IL_0053 - - IL_0043: ldloc.0 - IL_0044: ldc.i8 0xffffffff - IL_004d: conv.u - IL_004e: ceq - IL_0050: nop - IL_0051: br.s IL_0061 - - IL_0053: ldloc.0 - IL_0054: ldc.i8 0xffffffffffffffff - IL_005d: conv.u - IL_005e: ceq - IL_0060: nop - IL_0061: brfalse.s IL_00af - - IL_0063: ldc.i4.1 - IL_0064: stloc.1 - IL_0065: ldc.i8 0x0 - IL_006e: conv.i - IL_006f: stloc.2 - IL_0070: ldc.i8 0xa - IL_0079: conv.i - IL_007a: stloc.3 - IL_007b: br.s IL_00ab + IL_000a: stloc.0 + IL_000b: ldc.i8 0x1 + IL_0014: conv.i + IL_0015: stloc.1 + IL_0016: br.s IL_0038 - IL_007d: ldloc.3 - IL_007e: call void assembly::set_c(native int) - IL_0083: ldloc.3 - IL_0084: ldc.i8 0xffffffffffffffff - IL_008d: conv.i - IL_008e: add - IL_008f: stloc.3 - IL_0090: ldloc.2 - IL_0091: ldc.i8 0x1 - IL_009a: conv.i - IL_009b: add - IL_009c: stloc.2 - IL_009d: ldloc.2 - IL_009e: ldc.i8 0x0 - IL_00a7: conv.i - IL_00a8: cgt.un - IL_00aa: stloc.1 - IL_00ab: ldloc.1 - IL_00ac: brtrue.s IL_007d + IL_0018: ldloc.1 + IL_0019: call void assembly::set_c(native int) + IL_001e: ldloc.1 + IL_001f: ldc.i8 0x2 + IL_0028: conv.i + IL_0029: add + IL_002a: stloc.1 + IL_002b: ldloc.0 + IL_002c: ldc.i8 0x1 + IL_0035: conv.i + IL_0036: add + IL_0037: stloc.0 + IL_0038: ldloc.0 + IL_0039: ldc.i8 0x5 + IL_0042: conv.u + IL_0043: blt.un.s IL_0018 - IL_00ae: ret + IL_0045: ret + } - IL_00af: ldc.i8 0xa - IL_00b8: conv.i - IL_00b9: ldc.i8 0x1 - IL_00c2: conv.i - IL_00c3: bge.s IL_00d2 + .method public static void f7(native int start) cil managed + { + + .maxstack 4 + .locals init (native int V_0, + native int V_1, + native int V_2) + IL_0000: ldc.i8 0xa + IL_0009: conv.i + IL_000a: ldarg.0 + IL_000b: bge.s IL_001a - IL_00c5: ldc.i8 0x0 - IL_00ce: conv.i - IL_00cf: nop - IL_00d0: br.s IL_00f3 + IL_000d: ldc.i8 0x0 + IL_0016: conv.i + IL_0017: nop + IL_0018: br.s IL_003d - IL_00d2: ldc.i8 0xa - IL_00db: conv.i - IL_00dc: ldc.i8 0x1 - IL_00e5: conv.i - IL_00e6: sub - IL_00e7: ldc.i8 0x1 - IL_00f0: conv.i - IL_00f1: add.ovf.un - IL_00f2: nop - IL_00f3: stloc.2 - IL_00f4: ldc.i8 0x0 - IL_00fd: conv.i - IL_00fe: stloc.3 - IL_00ff: ldc.i8 0xa - IL_0108: conv.i - IL_0109: stloc.s V_4 - IL_010b: br.s IL_0130 + IL_001a: ldc.i8 0xa + IL_0023: conv.i + IL_0024: ldarg.0 + IL_0025: sub + IL_0026: ldc.i8 0x2 + IL_002f: conv.i + IL_0030: div.un + IL_0031: ldc.i8 0x1 + IL_003a: conv.i + IL_003b: add.ovf.un + IL_003c: nop + IL_003d: stloc.0 + IL_003e: ldc.i8 0x0 + IL_0047: conv.i + IL_0048: stloc.1 + IL_0049: ldarg.0 + IL_004a: stloc.2 + IL_004b: br.s IL_006d - IL_010d: ldloc.s V_4 - IL_010f: call void assembly::set_c(native int) - IL_0114: ldloc.s V_4 - IL_0116: ldc.i8 0xffffffffffffffff - IL_011f: conv.i - IL_0120: add - IL_0121: stloc.s V_4 - IL_0123: ldloc.3 - IL_0124: ldc.i8 0x1 - IL_012d: conv.i - IL_012e: add - IL_012f: stloc.3 - IL_0130: ldloc.3 - IL_0131: ldloc.2 - IL_0132: blt.un.s IL_010d + IL_004d: ldloc.2 + IL_004e: call void assembly::set_c(native int) + IL_0053: ldloc.2 + IL_0054: ldc.i8 0x2 + IL_005d: conv.i + IL_005e: add + IL_005f: stloc.2 + IL_0060: ldloc.1 + IL_0061: ldc.i8 0x1 + IL_006a: conv.i + IL_006b: add + IL_006c: stloc.1 + IL_006d: ldloc.1 + IL_006e: ldloc.0 + IL_006f: blt.un.s IL_004d - IL_0134: ret + IL_0071: ret } - .method public static void f14() cil managed + .method public static void f8(native int step) cil managed { .maxstack 5 @@ -1323,217 +1271,280 @@ native int V_2, native int V_3, native int V_4) - IL_0000: ldc.i8 0xfffffffffffffffe - IL_0009: conv.i - IL_000a: ldc.i8 0x0 - IL_0013: conv.i - IL_0014: bne.un.s IL_003d + IL_0000: ldarg.0 + IL_0001: ldc.i8 0x0 + IL_000a: conv.i + IL_000b: bne.un.s IL_002b - IL_0016: ldc.i8 0xa - IL_001f: conv.i - IL_0020: ldc.i8 0xfffffffffffffffe - IL_0029: conv.i - IL_002a: ldc.i8 0x1 - IL_0033: conv.i - IL_0034: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, + IL_000d: ldc.i8 0x1 + IL_0016: conv.i + IL_0017: ldarg.0 + IL_0018: ldc.i8 0xa + IL_0021: conv.i + IL_0022: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, native int, native int) - IL_0039: pop - IL_003a: nop - IL_003b: br.s IL_003e + IL_0027: pop + IL_0028: nop + IL_0029: br.s IL_002c - IL_003d: nop - IL_003e: ldc.i8 0x0 - IL_0047: conv.i - IL_0048: ldc.i8 0xfffffffffffffffe - IL_0051: conv.i - IL_0052: bge.s IL_009d + IL_002b: nop + IL_002c: ldc.i8 0x0 + IL_0035: conv.i + IL_0036: ldarg.0 + IL_0037: bge.s IL_0076 - IL_0054: ldc.i8 0x1 - IL_005d: conv.i - IL_005e: ldc.i8 0xa - IL_0067: conv.i - IL_0068: bge.s IL_007a + IL_0039: ldc.i8 0xa + IL_0042: conv.i + IL_0043: ldc.i8 0x1 + IL_004c: conv.i + IL_004d: bge.s IL_005c - IL_006a: ldc.i8 0x0 - IL_0073: conv.i - IL_0074: nop - IL_0075: br IL_00ef + IL_004f: ldc.i8 0x0 + IL_0058: conv.i + IL_0059: nop + IL_005a: br.s IL_00bf - IL_007a: ldc.i8 0x1 - IL_0083: conv.i - IL_0084: ldc.i8 0xa - IL_008d: conv.i - IL_008e: sub - IL_008f: ldc.i8 0xfffffffffffffffe - IL_0098: conv.i - IL_0099: div.un - IL_009a: nop - IL_009b: br.s IL_00ef + IL_005c: ldc.i8 0xa + IL_0065: conv.i + IL_0066: ldc.i8 0x1 + IL_006f: conv.i + IL_0070: sub + IL_0071: ldarg.0 + IL_0072: div.un + IL_0073: nop + IL_0074: br.s IL_00bf - IL_009d: ldc.i8 0xa - IL_00a6: conv.i - IL_00a7: ldc.i8 0x1 - IL_00b0: conv.i - IL_00b1: bge.s IL_00c0 + IL_0076: ldc.i8 0x1 + IL_007f: conv.i + IL_0080: ldc.i8 0xa + IL_0089: conv.i + IL_008a: bge.s IL_0099 - IL_00b3: ldc.i8 0x0 - IL_00bc: conv.i - IL_00bd: nop - IL_00be: br.s IL_00ef + IL_008c: ldc.i8 0x0 + IL_0095: conv.i + IL_0096: nop + IL_0097: br.s IL_00bf - IL_00c0: ldc.i8 0xa - IL_00c9: conv.i - IL_00ca: ldc.i8 0x1 - IL_00d3: conv.i - IL_00d4: sub - IL_00d5: ldc.i8 0xfffffffffffffffe - IL_00de: conv.i - IL_00df: not - IL_00e0: ldc.i8 0x1 - IL_00e9: conv.i - IL_00ea: add - IL_00eb: div.un - IL_00ec: nop - IL_00ed: br.s IL_00ef + IL_0099: ldc.i8 0x1 + IL_00a2: conv.i + IL_00a3: ldc.i8 0xa + IL_00ac: conv.i + IL_00ad: sub + IL_00ae: ldarg.0 + IL_00af: not + IL_00b0: ldc.i8 0x1 + IL_00b9: conv.i + IL_00ba: add + IL_00bb: div.un + IL_00bc: nop + IL_00bd: br.s IL_00bf - IL_00ef: stloc.0 - IL_00f0: sizeof [runtime]System.IntPtr - IL_00f6: ldc.i4.4 - IL_00f7: bne.un.s IL_0109 + IL_00bf: stloc.0 + IL_00c0: sizeof [runtime]System.IntPtr + IL_00c6: ldc.i4.4 + IL_00c7: bne.un.s IL_00d9 - IL_00f9: ldloc.0 - IL_00fa: ldc.i8 0xffffffff - IL_0103: conv.u - IL_0104: ceq - IL_0106: nop - IL_0107: br.s IL_0117 + IL_00c9: ldloc.0 + IL_00ca: ldc.i8 0xffffffff + IL_00d3: conv.u + IL_00d4: ceq + IL_00d6: nop + IL_00d7: br.s IL_00e7 - IL_0109: ldloc.0 - IL_010a: ldc.i8 0xffffffffffffffff - IL_0113: conv.u - IL_0114: ceq - IL_0116: nop - IL_0117: brfalse.s IL_0165 + IL_00d9: ldloc.0 + IL_00da: ldc.i8 0xffffffffffffffff + IL_00e3: conv.u + IL_00e4: ceq + IL_00e6: nop + IL_00e7: brfalse.s IL_012c - IL_0119: ldc.i4.1 - IL_011a: stloc.1 + IL_00e9: ldc.i4.1 + IL_00ea: stloc.1 + IL_00eb: ldc.i8 0x0 + IL_00f4: conv.i + IL_00f5: stloc.2 + IL_00f6: ldc.i8 0x1 + IL_00ff: conv.i + IL_0100: stloc.3 + IL_0101: br.s IL_0128 + + IL_0103: ldloc.3 + IL_0104: call void assembly::set_c(native int) + IL_0109: ldloc.3 + IL_010a: ldarg.0 + IL_010b: add + IL_010c: stloc.3 + IL_010d: ldloc.2 + IL_010e: ldc.i8 0x1 + IL_0117: conv.i + IL_0118: add + IL_0119: stloc.2 + IL_011a: ldloc.2 IL_011b: ldc.i8 0x0 IL_0124: conv.i - IL_0125: stloc.2 - IL_0126: ldc.i8 0xa - IL_012f: conv.i - IL_0130: stloc.3 - IL_0131: br.s IL_0161 + IL_0125: cgt.un + IL_0127: stloc.1 + IL_0128: ldloc.1 + IL_0129: brtrue.s IL_0103 - IL_0133: ldloc.3 - IL_0134: call void assembly::set_c(native int) - IL_0139: ldloc.3 - IL_013a: ldc.i8 0xfffffffffffffffe - IL_0143: conv.i - IL_0144: add - IL_0145: stloc.3 - IL_0146: ldloc.2 - IL_0147: ldc.i8 0x1 - IL_0150: conv.i - IL_0151: add - IL_0152: stloc.2 - IL_0153: ldloc.2 - IL_0154: ldc.i8 0x0 - IL_015d: conv.i - IL_015e: cgt.un - IL_0160: stloc.1 - IL_0161: ldloc.1 - IL_0162: brtrue.s IL_0133 + IL_012b: ret - IL_0164: ret + IL_012c: ldc.i8 0x0 + IL_0135: conv.i + IL_0136: ldarg.0 + IL_0137: bge.s IL_0184 - IL_0165: ldc.i8 0x0 - IL_016e: conv.i - IL_016f: ldc.i8 0xfffffffffffffffe - IL_0178: conv.i - IL_0179: bge.s IL_01cf + IL_0139: ldc.i8 0xa + IL_0142: conv.i + IL_0143: ldc.i8 0x1 + IL_014c: conv.i + IL_014d: bge.s IL_015f - IL_017b: ldc.i8 0x1 - IL_0184: conv.i - IL_0185: ldc.i8 0xa - IL_018e: conv.i - IL_018f: bge.s IL_01a1 + IL_014f: ldc.i8 0x0 + IL_0158: conv.i + IL_0159: nop + IL_015a: br IL_01d8 - IL_0191: ldc.i8 0x0 - IL_019a: conv.i - IL_019b: nop - IL_019c: br IL_022c + IL_015f: ldc.i8 0xa + IL_0168: conv.i + IL_0169: ldc.i8 0x1 + IL_0172: conv.i + IL_0173: sub + IL_0174: ldarg.0 + IL_0175: div.un + IL_0176: ldc.i8 0x1 + IL_017f: conv.i + IL_0180: add.ovf.un + IL_0181: nop + IL_0182: br.s IL_01d8 - IL_01a1: ldc.i8 0x1 - IL_01aa: conv.i - IL_01ab: ldc.i8 0xa - IL_01b4: conv.i - IL_01b5: sub - IL_01b6: ldc.i8 0xfffffffffffffffe - IL_01bf: conv.i - IL_01c0: div.un - IL_01c1: ldc.i8 0x1 - IL_01ca: conv.i - IL_01cb: add.ovf.un - IL_01cc: nop - IL_01cd: br.s IL_022c + IL_0184: ldc.i8 0x1 + IL_018d: conv.i + IL_018e: ldc.i8 0xa + IL_0197: conv.i + IL_0198: bge.s IL_01a7 - IL_01cf: ldc.i8 0xa - IL_01d8: conv.i - IL_01d9: ldc.i8 0x1 + IL_019a: ldc.i8 0x0 + IL_01a3: conv.i + IL_01a4: nop + IL_01a5: br.s IL_01d8 + + IL_01a7: ldc.i8 0x1 + IL_01b0: conv.i + IL_01b1: ldc.i8 0xa + IL_01ba: conv.i + IL_01bb: sub + IL_01bc: ldarg.0 + IL_01bd: not + IL_01be: ldc.i8 0x1 + IL_01c7: conv.i + IL_01c8: add + IL_01c9: div.un + IL_01ca: ldc.i8 0x1 + IL_01d3: conv.i + IL_01d4: add.ovf.un + IL_01d5: nop + IL_01d6: br.s IL_01d8 + + IL_01d8: stloc.2 + IL_01d9: ldc.i8 0x0 IL_01e2: conv.i - IL_01e3: bge.s IL_01f2 + IL_01e3: stloc.3 + IL_01e4: ldc.i8 0x1 + IL_01ed: conv.i + IL_01ee: stloc.s V_4 + IL_01f0: br.s IL_020c - IL_01e5: ldc.i8 0x0 - IL_01ee: conv.i - IL_01ef: nop - IL_01f0: br.s IL_022c + IL_01f2: ldloc.s V_4 + IL_01f4: call void assembly::set_c(native int) + IL_01f9: ldloc.s V_4 + IL_01fb: ldarg.0 + IL_01fc: add + IL_01fd: stloc.s V_4 + IL_01ff: ldloc.3 + IL_0200: ldc.i8 0x1 + IL_0209: conv.i + IL_020a: add + IL_020b: stloc.3 + IL_020c: ldloc.3 + IL_020d: ldloc.2 + IL_020e: blt.un.s IL_01f2 - IL_01f2: ldc.i8 0xa - IL_01fb: conv.i - IL_01fc: ldc.i8 0x1 - IL_0205: conv.i - IL_0206: sub - IL_0207: ldc.i8 0xfffffffffffffffe - IL_0210: conv.i - IL_0211: not - IL_0212: ldc.i8 0x1 - IL_021b: conv.i - IL_021c: add - IL_021d: div.un - IL_021e: ldc.i8 0x1 - IL_0227: conv.i - IL_0228: add.ovf.un - IL_0229: nop - IL_022a: br.s IL_022c + IL_0210: ret + } - IL_022c: stloc.2 - IL_022d: ldc.i8 0x0 - IL_0236: conv.i - IL_0237: stloc.3 - IL_0238: ldc.i8 0xa - IL_0241: conv.i - IL_0242: stloc.s V_4 - IL_0244: br.s IL_0269 + .method public static void f9(native int finish) cil managed + { + + .maxstack 4 + .locals init (native int V_0, + native int V_1, + native int V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i8 0x1 + IL_000a: conv.i + IL_000b: bge.s IL_001a - IL_0246: ldloc.s V_4 - IL_0248: call void assembly::set_c(native int) - IL_024d: ldloc.s V_4 - IL_024f: ldc.i8 0xfffffffffffffffe - IL_0258: conv.i - IL_0259: add - IL_025a: stloc.s V_4 - IL_025c: ldloc.3 - IL_025d: ldc.i8 0x1 - IL_0266: conv.i - IL_0267: add - IL_0268: stloc.3 - IL_0269: ldloc.3 - IL_026a: ldloc.2 - IL_026b: blt.un.s IL_0246 + IL_000d: ldc.i8 0x0 + IL_0016: conv.i + IL_0017: nop + IL_0018: br.s IL_003d - IL_026d: ret + IL_001a: ldarg.0 + IL_001b: ldc.i8 0x1 + IL_0024: conv.i + IL_0025: sub + IL_0026: ldc.i8 0x2 + IL_002f: conv.i + IL_0030: div.un + IL_0031: ldc.i8 0x1 + IL_003a: conv.i + IL_003b: add.ovf.un + IL_003c: nop + IL_003d: stloc.0 + IL_003e: ldc.i8 0x0 + IL_0047: conv.i + IL_0048: stloc.1 + IL_0049: ldc.i8 0x1 + IL_0052: conv.i + IL_0053: stloc.2 + IL_0054: br.s IL_0076 + + IL_0056: ldloc.2 + IL_0057: call void assembly::set_c(native int) + IL_005c: ldloc.2 + IL_005d: ldc.i8 0x2 + IL_0066: conv.i + IL_0067: add + IL_0068: stloc.2 + IL_0069: ldloc.1 + IL_006a: ldc.i8 0x1 + IL_0073: conv.i + IL_0074: add + IL_0075: stloc.1 + IL_0076: ldloc.1 + IL_0077: ldloc.0 + IL_0078: blt.un.s IL_0056 + + IL_007a: ret + } + + .method public specialname static native int get_c() cil managed + { + + .maxstack 8 + IL_0000: ldsfld native int ''.$assembly::c@1 + IL_0005: ret + } + + .method public specialname static void set_c(native int 'value') cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld native int ''.$assembly::c@1 + IL_0006: ret } .property native int c() @@ -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..44dabef2ffd 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 @@ -35,21 +35,15 @@ .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 native int c@1 .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 native int get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld native int assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(native int 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld native int assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -154,438 +148,651 @@ IL_0045: ret } - .method public static void f2(native int start) cil managed + .method public static void f10(native int start, + native int step, + native int finish) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) - .maxstack 4 + .maxstack 5 .locals init (native int V_0, bool V_1, native int V_2, native int V_3, native int V_4) - IL_0000: ldc.i8 0xa - IL_0009: conv.i - IL_000a: ldarg.0 - IL_000b: bge.s IL_001a + IL_0000: ldarg.1 + IL_0001: ldc.i8 0x0 + IL_000a: conv.i + IL_000b: bne.un.s IL_0019 - IL_000d: ldc.i8 0x0 - IL_0016: conv.i - IL_0017: nop - IL_0018: br.s IL_0027 + IL_000d: ldarg.2 + IL_000e: ldarg.1 + IL_000f: ldarg.2 + IL_0010: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, + native int, + native int) + IL_0015: pop + IL_0016: nop + IL_0017: br.s IL_001a - IL_001a: ldc.i8 0xa + IL_0019: nop + IL_001a: ldc.i8 0x0 IL_0023: conv.i - IL_0024: ldarg.0 - IL_0025: sub - IL_0026: nop - IL_0027: stloc.0 - IL_0028: sizeof [runtime]System.IntPtr - IL_002e: ldc.i4.4 - IL_002f: bne.un.s IL_0041 + IL_0024: ldarg.1 + IL_0025: bge.s IL_0040 - IL_0031: ldloc.0 - IL_0032: ldc.i8 0xffffffff - IL_003b: conv.u - IL_003c: ceq - IL_003e: nop - IL_003f: br.s IL_004f + IL_0027: ldarg.2 + IL_0028: ldarg.2 + IL_0029: bge.s IL_0038 - IL_0041: ldloc.0 - IL_0042: ldc.i8 0xffffffffffffffff - IL_004b: conv.u - IL_004c: ceq - IL_004e: nop - IL_004f: brfalse.s IL_0094 + IL_002b: ldc.i8 0x0 + IL_0034: conv.i + IL_0035: nop + IL_0036: br.s IL_0065 - IL_0051: ldc.i4.1 - IL_0052: stloc.1 - IL_0053: ldc.i8 0x0 - IL_005c: conv.i - IL_005d: stloc.2 - IL_005e: ldarg.0 - IL_005f: stloc.3 - IL_0060: br.s IL_0090 + IL_0038: ldarg.2 + IL_0039: ldarg.2 + IL_003a: sub + IL_003b: ldarg.1 + IL_003c: div.un + IL_003d: nop + IL_003e: br.s IL_0065 - IL_0062: ldloc.3 - IL_0063: call void assembly::set_c(native int) - IL_0068: ldloc.3 - IL_0069: ldc.i8 0x1 - IL_0072: conv.i - IL_0073: add - IL_0074: stloc.3 - IL_0075: ldloc.2 - IL_0076: ldc.i8 0x1 - IL_007f: conv.i - IL_0080: add - IL_0081: stloc.2 - IL_0082: ldloc.2 - IL_0083: ldc.i8 0x0 - IL_008c: conv.i - IL_008d: cgt.un - IL_008f: stloc.1 - IL_0090: ldloc.1 - IL_0091: brtrue.s IL_0062 + IL_0040: ldarg.2 + IL_0041: ldarg.2 + IL_0042: bge.s IL_0051 - IL_0093: ret + IL_0044: ldc.i8 0x0 + IL_004d: conv.i + IL_004e: nop + IL_004f: br.s IL_0065 - IL_0094: ldc.i8 0xa - IL_009d: conv.i - IL_009e: ldarg.0 - IL_009f: bge.s IL_00ae + IL_0051: ldarg.2 + IL_0052: ldarg.2 + IL_0053: sub + IL_0054: ldarg.1 + IL_0055: not + IL_0056: ldc.i8 0x1 + IL_005f: conv.i + IL_0060: add + IL_0061: div.un + IL_0062: nop + IL_0063: br.s IL_0065 - IL_00a1: ldc.i8 0x0 - IL_00aa: conv.i - IL_00ab: nop - IL_00ac: br.s IL_00c6 + IL_0065: stloc.0 + IL_0066: sizeof [runtime]System.IntPtr + IL_006c: ldc.i4.4 + IL_006d: bne.un.s IL_007f - IL_00ae: ldc.i8 0xa - IL_00b7: conv.i - IL_00b8: ldarg.0 - IL_00b9: sub - IL_00ba: ldc.i8 0x1 - IL_00c3: conv.i - IL_00c4: add.ovf.un - IL_00c5: nop - IL_00c6: stloc.2 - IL_00c7: ldc.i8 0x0 - IL_00d0: conv.i - IL_00d1: stloc.3 - IL_00d2: ldarg.0 - IL_00d3: stloc.s V_4 - IL_00d5: br.s IL_00fa + IL_006f: ldloc.0 + IL_0070: ldc.i8 0xffffffff + IL_0079: conv.u + IL_007a: ceq + IL_007c: nop + IL_007d: br.s IL_008d - IL_00d7: ldloc.s V_4 - IL_00d9: call void assembly::set_c(native int) - IL_00de: ldloc.s V_4 - IL_00e0: ldc.i8 0x1 - IL_00e9: conv.i - IL_00ea: add - IL_00eb: stloc.s V_4 - IL_00ed: ldloc.3 - IL_00ee: ldc.i8 0x1 - IL_00f7: conv.i - IL_00f8: add - IL_00f9: stloc.3 - IL_00fa: ldloc.3 - IL_00fb: ldloc.2 - IL_00fc: blt.un.s IL_00d7 + IL_007f: ldloc.0 + IL_0080: ldc.i8 0xffffffffffffffff + IL_0089: conv.u + IL_008a: ceq + IL_008c: nop + IL_008d: brfalse.s IL_00c9 - IL_00fe: ret - } + IL_008f: ldc.i4.1 + IL_0090: stloc.1 + IL_0091: ldc.i8 0x0 + IL_009a: conv.i + IL_009b: stloc.2 + IL_009c: ldarg.2 + IL_009d: stloc.3 + IL_009e: br.s IL_00c5 - .method public static void f3(native int finish) cil managed - { - - .maxstack 4 - .locals init (native int V_0, - bool V_1, - native int V_2, - native int V_3, - native int V_4) - IL_0000: ldarg.0 - IL_0001: ldc.i8 0x1 - IL_000a: conv.i - IL_000b: bge.s IL_001a + IL_00a0: ldloc.3 + IL_00a1: call void assembly::set_c(native int) + IL_00a6: ldloc.3 + IL_00a7: ldarg.1 + IL_00a8: add + IL_00a9: stloc.3 + IL_00aa: ldloc.2 + IL_00ab: ldc.i8 0x1 + IL_00b4: conv.i + IL_00b5: add + IL_00b6: stloc.2 + IL_00b7: ldloc.2 + IL_00b8: ldc.i8 0x0 + IL_00c1: conv.i + IL_00c2: cgt.un + IL_00c4: stloc.1 + IL_00c5: ldloc.1 + IL_00c6: brtrue.s IL_00a0 - IL_000d: ldc.i8 0x0 - IL_0016: conv.i - IL_0017: nop - IL_0018: br.s IL_0027 + IL_00c8: ret - IL_001a: ldarg.0 - IL_001b: ldc.i8 0x1 - IL_0024: conv.i - IL_0025: sub - IL_0026: nop - IL_0027: stloc.0 - IL_0028: sizeof [runtime]System.IntPtr - IL_002e: ldc.i4.4 - IL_002f: bne.un.s IL_0041 + IL_00c9: ldc.i8 0x0 + IL_00d2: conv.i + IL_00d3: ldarg.1 + IL_00d4: bge.s IL_00fa - IL_0031: ldloc.0 - IL_0032: ldc.i8 0xffffffff - IL_003b: conv.u - IL_003c: ceq - IL_003e: nop - IL_003f: br.s IL_004f + IL_00d6: ldarg.2 + IL_00d7: ldarg.2 + IL_00d8: bge.s IL_00e7 - IL_0041: ldloc.0 - IL_0042: ldc.i8 0xffffffffffffffff - IL_004b: conv.u - IL_004c: ceq - IL_004e: nop - IL_004f: brfalse.s IL_009d - - IL_0051: ldc.i4.1 - IL_0052: stloc.1 - IL_0053: ldc.i8 0x0 - IL_005c: conv.i - IL_005d: stloc.2 - IL_005e: ldc.i8 0x1 - IL_0067: conv.i - IL_0068: stloc.3 - IL_0069: br.s IL_0099 + IL_00da: ldc.i8 0x0 + IL_00e3: conv.i + IL_00e4: nop + IL_00e5: br.s IL_012a - IL_006b: ldloc.3 - IL_006c: call void assembly::set_c(native int) - IL_0071: ldloc.3 - IL_0072: ldc.i8 0x1 - IL_007b: conv.i - IL_007c: add - IL_007d: stloc.3 - IL_007e: ldloc.2 - IL_007f: ldc.i8 0x1 - IL_0088: conv.i - IL_0089: add - IL_008a: stloc.2 - IL_008b: ldloc.2 - IL_008c: ldc.i8 0x0 - IL_0095: conv.i - IL_0096: cgt.un - IL_0098: stloc.1 - IL_0099: ldloc.1 - IL_009a: brtrue.s IL_006b + IL_00e7: ldarg.2 + IL_00e8: ldarg.2 + IL_00e9: sub + IL_00ea: ldarg.1 + IL_00eb: div.un + IL_00ec: ldc.i8 0x1 + IL_00f5: conv.i + IL_00f6: add.ovf.un + IL_00f7: nop + IL_00f8: br.s IL_012a - IL_009c: ret + IL_00fa: ldarg.2 + IL_00fb: ldarg.2 + IL_00fc: bge.s IL_010b - IL_009d: ldarg.0 - IL_009e: ldc.i8 0x1 - IL_00a7: conv.i - IL_00a8: bge.s IL_00b7 + IL_00fe: ldc.i8 0x0 + IL_0107: conv.i + IL_0108: nop + IL_0109: br.s IL_012a - IL_00aa: ldc.i8 0x0 - IL_00b3: conv.i - IL_00b4: nop - IL_00b5: br.s IL_00cf + IL_010b: ldarg.2 + IL_010c: ldarg.2 + IL_010d: sub + IL_010e: ldarg.1 + IL_010f: not + IL_0110: ldc.i8 0x1 + IL_0119: conv.i + IL_011a: add + IL_011b: div.un + IL_011c: ldc.i8 0x1 + IL_0125: conv.i + IL_0126: add.ovf.un + IL_0127: nop + IL_0128: br.s IL_012a - IL_00b7: ldarg.0 - IL_00b8: ldc.i8 0x1 - IL_00c1: conv.i - IL_00c2: sub - IL_00c3: ldc.i8 0x1 - IL_00cc: conv.i - IL_00cd: add.ovf.un - IL_00ce: nop - IL_00cf: stloc.2 - IL_00d0: ldc.i8 0x0 - IL_00d9: conv.i - IL_00da: stloc.3 - IL_00db: ldc.i8 0x1 - IL_00e4: conv.i - IL_00e5: stloc.s V_4 - IL_00e7: br.s IL_010c + IL_012a: stloc.2 + IL_012b: ldc.i8 0x0 + IL_0134: conv.i + IL_0135: stloc.3 + IL_0136: ldarg.2 + IL_0137: stloc.s V_4 + IL_0139: br.s IL_0155 - IL_00e9: ldloc.s V_4 - IL_00eb: call void assembly::set_c(native int) - IL_00f0: ldloc.s V_4 - IL_00f2: ldc.i8 0x1 - IL_00fb: conv.i - IL_00fc: add - IL_00fd: stloc.s V_4 - IL_00ff: ldloc.3 - IL_0100: ldc.i8 0x1 - IL_0109: conv.i - IL_010a: add - IL_010b: stloc.3 - IL_010c: ldloc.3 - IL_010d: ldloc.2 - IL_010e: blt.un.s IL_00e9 + IL_013b: ldloc.s V_4 + IL_013d: call void assembly::set_c(native int) + IL_0142: ldloc.s V_4 + IL_0144: ldarg.1 + IL_0145: add + IL_0146: stloc.s V_4 + IL_0148: ldloc.3 + IL_0149: ldc.i8 0x1 + IL_0152: conv.i + IL_0153: add + IL_0154: stloc.3 + IL_0155: ldloc.3 + IL_0156: ldloc.2 + IL_0157: blt.un.s IL_013b - IL_0110: ret + IL_0159: ret } - .method public static void f4(native int start, - native int finish) cil managed + .method public static void f11(native int start, + native int finish) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + .maxstack 5 + .locals init (native int V_0, + native int V_1, + native int V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i8 0x0 + IL_000a: conv.i + IL_000b: ldarg.1 + IL_000c: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, + native int, + native int) + IL_0011: pop + IL_0012: ldc.i8 0x0 + IL_001b: conv.i + IL_001c: stloc.0 + IL_001d: ldc.i8 0x0 + IL_0026: conv.i + IL_0027: stloc.1 + IL_0028: ldarg.0 + IL_0029: stloc.2 + IL_002a: br.s IL_004c + + IL_002c: ldloc.2 + IL_002d: call void assembly::set_c(native int) + IL_0032: ldloc.2 + IL_0033: ldc.i8 0x0 + IL_003c: conv.i + IL_003d: add + IL_003e: stloc.2 + IL_003f: ldloc.1 + IL_0040: ldc.i8 0x1 + IL_0049: conv.i + IL_004a: add + IL_004b: stloc.1 + IL_004c: ldloc.1 + IL_004d: ldloc.0 + IL_004e: blt.un.s IL_002c + + IL_0050: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (native int V_0, + native int V_1, + native int V_2) + IL_0000: ldc.i8 0x1 + IL_0009: conv.i + IL_000a: ldc.i8 0x0 + IL_0013: conv.i + IL_0014: ldc.i8 0xa + IL_001d: conv.i + IL_001e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, + native int, + native int) + IL_0023: pop + IL_0024: ldc.i8 0x0 + IL_002d: conv.i + IL_002e: stloc.0 + IL_002f: ldc.i8 0x0 + IL_0038: conv.i + IL_0039: stloc.1 + IL_003a: ldc.i8 0x1 + IL_0043: conv.i + IL_0044: stloc.2 + IL_0045: br.s IL_0067 + + IL_0047: ldloc.2 + IL_0048: call void assembly::set_c(native int) + IL_004d: ldloc.2 + IL_004e: ldc.i8 0x0 + IL_0057: conv.i + IL_0058: add + IL_0059: stloc.2 + IL_005a: ldloc.1 + IL_005b: ldc.i8 0x1 + IL_0064: conv.i + IL_0065: add + IL_0066: stloc.1 + IL_0067: ldloc.1 + IL_0068: ldloc.0 + IL_0069: blt.un.s IL_0047 + + IL_006b: ret + } + + .method public static void f13() cil managed + { + .maxstack 4 .locals init (native int V_0, bool V_1, native int V_2, native int V_3, native int V_4) - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: bge.s IL_0011 - - IL_0004: ldc.i8 0x0 - IL_000d: conv.i - IL_000e: nop - IL_000f: br.s IL_0015 + IL_0000: ldc.i8 0xa + IL_0009: conv.i + IL_000a: ldc.i8 0x1 + IL_0013: conv.i + IL_0014: bge.s IL_0023 - IL_0011: ldarg.1 - IL_0012: ldarg.0 - IL_0013: sub - IL_0014: nop - IL_0015: stloc.0 - IL_0016: sizeof [runtime]System.IntPtr - IL_001c: ldc.i4.4 - IL_001d: bne.un.s IL_002f + IL_0016: ldc.i8 0x0 + IL_001f: conv.i + IL_0020: nop + IL_0021: br.s IL_0039 - IL_001f: ldloc.0 - IL_0020: ldc.i8 0xffffffff - IL_0029: conv.u - IL_002a: ceq - IL_002c: nop - IL_002d: br.s IL_003d + IL_0023: ldc.i8 0xa + IL_002c: conv.i + IL_002d: ldc.i8 0x1 + IL_0036: conv.i + IL_0037: sub + IL_0038: nop + IL_0039: stloc.0 + IL_003a: sizeof [runtime]System.IntPtr + IL_0040: ldc.i4.4 + IL_0041: bne.un.s IL_0053 - IL_002f: ldloc.0 - IL_0030: ldc.i8 0xffffffffffffffff - IL_0039: conv.u - IL_003a: ceq - IL_003c: nop - IL_003d: brfalse.s IL_0082 + IL_0043: ldloc.0 + IL_0044: ldc.i8 0xffffffff + IL_004d: conv.u + IL_004e: ceq + IL_0050: nop + IL_0051: br.s IL_0061 - IL_003f: ldc.i4.1 - IL_0040: stloc.1 - IL_0041: ldc.i8 0x0 - IL_004a: conv.i - IL_004b: stloc.2 - IL_004c: ldarg.0 - IL_004d: stloc.3 - IL_004e: br.s IL_007e + IL_0053: ldloc.0 + IL_0054: ldc.i8 0xffffffffffffffff + IL_005d: conv.u + IL_005e: ceq + IL_0060: nop + IL_0061: brfalse.s IL_00af - IL_0050: ldloc.3 - IL_0051: call void assembly::set_c(native int) - IL_0056: ldloc.3 - IL_0057: ldc.i8 0x1 - IL_0060: conv.i - IL_0061: add - IL_0062: stloc.3 - IL_0063: ldloc.2 - IL_0064: ldc.i8 0x1 - IL_006d: conv.i - IL_006e: add + IL_0063: ldc.i4.1 + IL_0064: stloc.1 + IL_0065: ldc.i8 0x0 + IL_006e: conv.i IL_006f: stloc.2 - IL_0070: ldloc.2 - IL_0071: ldc.i8 0x0 - IL_007a: conv.i - IL_007b: cgt.un - IL_007d: stloc.1 - IL_007e: ldloc.1 - IL_007f: brtrue.s IL_0050 + IL_0070: ldc.i8 0xa + IL_0079: conv.i + IL_007a: stloc.3 + IL_007b: br.s IL_00ab - IL_0081: ret + IL_007d: ldloc.3 + IL_007e: call void assembly::set_c(native int) + IL_0083: ldloc.3 + IL_0084: ldc.i8 0xffffffffffffffff + IL_008d: conv.i + IL_008e: add + IL_008f: stloc.3 + IL_0090: ldloc.2 + IL_0091: ldc.i8 0x1 + IL_009a: conv.i + IL_009b: add + IL_009c: stloc.2 + IL_009d: ldloc.2 + IL_009e: ldc.i8 0x0 + IL_00a7: conv.i + IL_00a8: cgt.un + IL_00aa: stloc.1 + IL_00ab: ldloc.1 + IL_00ac: brtrue.s IL_007d - IL_0082: ldarg.1 - IL_0083: ldarg.0 - IL_0084: bge.s IL_0093 + IL_00ae: ret - IL_0086: ldc.i8 0x0 - IL_008f: conv.i - IL_0090: nop - IL_0091: br.s IL_00a2 + IL_00af: ldc.i8 0xa + IL_00b8: conv.i + IL_00b9: ldc.i8 0x1 + IL_00c2: conv.i + IL_00c3: bge.s IL_00d2 - IL_0093: ldarg.1 - IL_0094: ldarg.0 - IL_0095: sub - IL_0096: ldc.i8 0x1 - IL_009f: conv.i - IL_00a0: add.ovf.un - IL_00a1: nop - IL_00a2: stloc.2 - IL_00a3: ldc.i8 0x0 - IL_00ac: conv.i - IL_00ad: stloc.3 - IL_00ae: ldarg.0 - IL_00af: stloc.s V_4 - IL_00b1: br.s IL_00d6 + IL_00c5: ldc.i8 0x0 + IL_00ce: conv.i + IL_00cf: nop + IL_00d0: br.s IL_00f3 - IL_00b3: ldloc.s V_4 - IL_00b5: call void assembly::set_c(native int) - IL_00ba: ldloc.s V_4 - IL_00bc: ldc.i8 0x1 - IL_00c5: conv.i - IL_00c6: add - IL_00c7: stloc.s V_4 - IL_00c9: ldloc.3 - IL_00ca: ldc.i8 0x1 - IL_00d3: conv.i - IL_00d4: add - IL_00d5: stloc.3 - IL_00d6: ldloc.3 - IL_00d7: ldloc.2 - IL_00d8: blt.un.s IL_00b3 + IL_00d2: ldc.i8 0xa + IL_00db: conv.i + IL_00dc: ldc.i8 0x1 + IL_00e5: conv.i + IL_00e6: sub + IL_00e7: ldc.i8 0x1 + IL_00f0: conv.i + IL_00f1: add.ovf.un + IL_00f2: nop + IL_00f3: stloc.2 + IL_00f4: ldc.i8 0x0 + IL_00fd: conv.i + IL_00fe: stloc.3 + IL_00ff: ldc.i8 0xa + IL_0108: conv.i + IL_0109: stloc.s V_4 + IL_010b: br.s IL_0130 - IL_00da: ret + IL_010d: ldloc.s V_4 + IL_010f: call void assembly::set_c(native int) + IL_0114: ldloc.s V_4 + IL_0116: ldc.i8 0xffffffffffffffff + IL_011f: conv.i + IL_0120: add + IL_0121: stloc.s V_4 + IL_0123: ldloc.3 + IL_0124: ldc.i8 0x1 + IL_012d: conv.i + IL_012e: add + IL_012f: stloc.3 + IL_0130: ldloc.3 + IL_0131: ldloc.2 + IL_0132: blt.un.s IL_010d + + IL_0134: ret } - .method public static void f5() cil managed + .method public static void f14() cil managed { - .maxstack 4 + .maxstack 5 .locals init (native int V_0, - native int V_1) - IL_0000: ldc.i8 0x0 + bool V_1, + native int V_2, + native int V_3, + native int V_4) + IL_0000: ldc.i8 0xfffffffffffffffe IL_0009: conv.i - IL_000a: stloc.0 - IL_000b: ldc.i8 0x1 - IL_0014: conv.i - IL_0015: stloc.1 - IL_0016: br.s IL_0038 + IL_000a: ldc.i8 0x0 + IL_0013: conv.i + IL_0014: bne.un.s IL_003d - IL_0018: ldloc.1 - IL_0019: call void assembly::set_c(native int) - IL_001e: ldloc.1 - IL_001f: ldc.i8 0x1 - IL_0028: conv.i - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.0 - IL_002c: ldc.i8 0x1 - IL_0035: conv.i - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ldc.i8 0xa - IL_0042: conv.u - IL_0043: blt.un.s IL_0018 + IL_0016: ldc.i8 0xa + IL_001f: conv.i + IL_0020: ldc.i8 0xfffffffffffffffe + IL_0029: conv.i + IL_002a: ldc.i8 0x1 + IL_0033: conv.i + IL_0034: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, + native int, + native int) + IL_0039: pop + IL_003a: nop + IL_003b: br.s IL_003e + + IL_003d: nop + IL_003e: ldc.i8 0x0 + IL_0047: conv.i + IL_0048: ldc.i8 0xfffffffffffffffe + IL_0051: conv.i + IL_0052: bge.s IL_009d + + IL_0054: ldc.i8 0x1 + IL_005d: conv.i + IL_005e: ldc.i8 0xa + IL_0067: conv.i + IL_0068: bge.s IL_007a + + IL_006a: ldc.i8 0x0 + IL_0073: conv.i + IL_0074: nop + IL_0075: br IL_00ef + + IL_007a: ldc.i8 0x1 + IL_0083: conv.i + IL_0084: ldc.i8 0xa + IL_008d: conv.i + IL_008e: sub + IL_008f: ldc.i8 0xfffffffffffffffe + IL_0098: conv.i + IL_0099: div.un + IL_009a: nop + IL_009b: br.s IL_00ef + + IL_009d: ldc.i8 0xa + IL_00a6: conv.i + IL_00a7: ldc.i8 0x1 + IL_00b0: conv.i + IL_00b1: bge.s IL_00c0 + + IL_00b3: ldc.i8 0x0 + IL_00bc: conv.i + IL_00bd: nop + IL_00be: br.s IL_00ef + + IL_00c0: ldc.i8 0xa + IL_00c9: conv.i + IL_00ca: ldc.i8 0x1 + IL_00d3: conv.i + IL_00d4: sub + IL_00d5: ldc.i8 0xfffffffffffffffe + IL_00de: conv.i + IL_00df: not + IL_00e0: ldc.i8 0x1 + IL_00e9: conv.i + IL_00ea: add + IL_00eb: div.un + IL_00ec: nop + IL_00ed: br.s IL_00ef + + IL_00ef: stloc.0 + IL_00f0: sizeof [runtime]System.IntPtr + IL_00f6: ldc.i4.4 + IL_00f7: bne.un.s IL_0109 + + IL_00f9: ldloc.0 + IL_00fa: ldc.i8 0xffffffff + IL_0103: conv.u + IL_0104: ceq + IL_0106: nop + IL_0107: br.s IL_0117 + + IL_0109: ldloc.0 + IL_010a: ldc.i8 0xffffffffffffffff + IL_0113: conv.u + IL_0114: ceq + IL_0116: nop + IL_0117: brfalse.s IL_0165 + + IL_0119: ldc.i4.1 + IL_011a: stloc.1 + IL_011b: ldc.i8 0x0 + IL_0124: conv.i + IL_0125: stloc.2 + IL_0126: ldc.i8 0xa + IL_012f: conv.i + IL_0130: stloc.3 + IL_0131: br.s IL_0161 + + IL_0133: ldloc.3 + IL_0134: call void assembly::set_c(native int) + IL_0139: ldloc.3 + IL_013a: ldc.i8 0xfffffffffffffffe + IL_0143: conv.i + IL_0144: add + IL_0145: stloc.3 + IL_0146: ldloc.2 + IL_0147: ldc.i8 0x1 + IL_0150: conv.i + IL_0151: add + IL_0152: stloc.2 + IL_0153: ldloc.2 + IL_0154: ldc.i8 0x0 + IL_015d: conv.i + IL_015e: cgt.un + IL_0160: stloc.1 + IL_0161: ldloc.1 + IL_0162: brtrue.s IL_0133 + + IL_0164: ret + + IL_0165: ldc.i8 0x0 + IL_016e: conv.i + IL_016f: ldc.i8 0xfffffffffffffffe + IL_0178: conv.i + IL_0179: bge.s IL_01cf + + IL_017b: ldc.i8 0x1 + IL_0184: conv.i + IL_0185: ldc.i8 0xa + IL_018e: conv.i + IL_018f: bge.s IL_01a1 + + IL_0191: ldc.i8 0x0 + IL_019a: conv.i + IL_019b: nop + IL_019c: br IL_022c + + IL_01a1: ldc.i8 0x1 + IL_01aa: conv.i + IL_01ab: ldc.i8 0xa + IL_01b4: conv.i + IL_01b5: sub + IL_01b6: ldc.i8 0xfffffffffffffffe + IL_01bf: conv.i + IL_01c0: div.un + IL_01c1: ldc.i8 0x1 + IL_01ca: conv.i + IL_01cb: add.ovf.un + IL_01cc: nop + IL_01cd: br.s IL_022c + + IL_01cf: ldc.i8 0xa + IL_01d8: conv.i + IL_01d9: ldc.i8 0x1 + IL_01e2: conv.i + IL_01e3: bge.s IL_01f2 - IL_0045: ret - } + IL_01e5: ldc.i8 0x0 + IL_01ee: conv.i + IL_01ef: nop + IL_01f0: br.s IL_022c - .method public static void f6() cil managed - { - - .maxstack 4 - .locals init (native int V_0, - native int V_1) - IL_0000: ldc.i8 0x0 - IL_0009: conv.i - IL_000a: stloc.0 - IL_000b: ldc.i8 0x1 - IL_0014: conv.i - IL_0015: stloc.1 - IL_0016: br.s IL_0038 + IL_01f2: ldc.i8 0xa + IL_01fb: conv.i + IL_01fc: ldc.i8 0x1 + IL_0205: conv.i + IL_0206: sub + IL_0207: ldc.i8 0xfffffffffffffffe + IL_0210: conv.i + IL_0211: not + IL_0212: ldc.i8 0x1 + IL_021b: conv.i + IL_021c: add + IL_021d: div.un + IL_021e: ldc.i8 0x1 + IL_0227: conv.i + IL_0228: add.ovf.un + IL_0229: nop + IL_022a: br.s IL_022c - IL_0018: ldloc.1 - IL_0019: call void assembly::set_c(native int) - IL_001e: ldloc.1 - IL_001f: ldc.i8 0x2 - IL_0028: conv.i - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.0 - IL_002c: ldc.i8 0x1 - IL_0035: conv.i - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ldc.i8 0x5 - IL_0042: conv.u - IL_0043: blt.un.s IL_0018 + IL_022c: stloc.2 + IL_022d: ldc.i8 0x0 + IL_0236: conv.i + IL_0237: stloc.3 + IL_0238: ldc.i8 0xa + IL_0241: conv.i + IL_0242: stloc.s V_4 + IL_0244: br.s IL_0269 - IL_0045: ret + IL_0246: ldloc.s V_4 + IL_0248: call void assembly::set_c(native int) + IL_024d: ldloc.s V_4 + IL_024f: ldc.i8 0xfffffffffffffffe + IL_0258: conv.i + IL_0259: add + IL_025a: stloc.s V_4 + IL_025c: ldloc.3 + IL_025d: ldc.i8 0x1 + IL_0266: conv.i + IL_0267: add + IL_0268: stloc.3 + IL_0269: ldloc.3 + IL_026a: ldloc.2 + IL_026b: blt.un.s IL_0246 + + IL_026d: ret } - .method public static void f7(native int start) cil managed + .method public static void f2(native int start) cil managed { .maxstack 4 .locals init (native int V_0, - native int V_1, - native int V_2) + bool V_1, + native int V_2, + native int V_3, + native int V_4) IL_0000: ldc.i8 0xa IL_0009: conv.i IL_000a: ldarg.0 @@ -594,265 +801,117 @@ IL_000d: ldc.i8 0x0 IL_0016: conv.i IL_0017: nop - IL_0018: br.s IL_003d + IL_0018: br.s IL_0027 IL_001a: ldc.i8 0xa IL_0023: conv.i IL_0024: ldarg.0 IL_0025: sub - IL_0026: ldc.i8 0x2 - IL_002f: conv.i - IL_0030: div.un - IL_0031: ldc.i8 0x1 - IL_003a: conv.i - IL_003b: add.ovf.un - IL_003c: nop - IL_003d: stloc.0 - IL_003e: ldc.i8 0x0 - IL_0047: conv.i - IL_0048: stloc.1 - IL_0049: ldarg.0 - IL_004a: stloc.2 - IL_004b: br.s IL_006d - - IL_004d: ldloc.2 - IL_004e: call void assembly::set_c(native int) - IL_0053: ldloc.2 - IL_0054: ldc.i8 0x2 - IL_005d: conv.i - IL_005e: add - IL_005f: stloc.2 - IL_0060: ldloc.1 - IL_0061: ldc.i8 0x1 - IL_006a: conv.i - IL_006b: add - IL_006c: stloc.1 - IL_006d: ldloc.1 - IL_006e: ldloc.0 - IL_006f: blt.un.s IL_004d - - IL_0071: ret - } - - .method public static void f8(native int step) cil managed - { - - .maxstack 5 - .locals init (native int V_0, - bool V_1, - native int V_2, - native int V_3, - native int V_4) - IL_0000: ldarg.0 - IL_0001: ldc.i8 0x0 - IL_000a: conv.i - IL_000b: bne.un.s IL_002b - - IL_000d: ldc.i8 0x1 - IL_0016: conv.i - IL_0017: ldarg.0 - IL_0018: ldc.i8 0xa - IL_0021: conv.i - IL_0022: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, - native int, - native int) - IL_0027: pop - IL_0028: nop - IL_0029: br.s IL_002c - - IL_002b: nop - IL_002c: ldc.i8 0x0 - IL_0035: conv.i - IL_0036: ldarg.0 - IL_0037: bge.s IL_0076 - - IL_0039: ldc.i8 0xa - IL_0042: conv.i - IL_0043: ldc.i8 0x1 - IL_004c: conv.i - IL_004d: bge.s IL_005c - - IL_004f: ldc.i8 0x0 - IL_0058: conv.i - IL_0059: nop - IL_005a: br.s IL_00bf - - IL_005c: ldc.i8 0xa - IL_0065: conv.i - IL_0066: ldc.i8 0x1 - IL_006f: conv.i - IL_0070: sub - IL_0071: ldarg.0 - IL_0072: div.un - IL_0073: nop - IL_0074: br.s IL_00bf - - IL_0076: ldc.i8 0x1 - IL_007f: conv.i - IL_0080: ldc.i8 0xa - IL_0089: conv.i - IL_008a: bge.s IL_0099 - - IL_008c: ldc.i8 0x0 - IL_0095: conv.i - IL_0096: nop - IL_0097: br.s IL_00bf - - IL_0099: ldc.i8 0x1 - IL_00a2: conv.i - IL_00a3: ldc.i8 0xa - IL_00ac: conv.i - IL_00ad: sub - IL_00ae: ldarg.0 - IL_00af: not - IL_00b0: ldc.i8 0x1 - IL_00b9: conv.i - IL_00ba: add - IL_00bb: div.un - IL_00bc: nop - IL_00bd: br.s IL_00bf - - IL_00bf: stloc.0 - IL_00c0: sizeof [runtime]System.IntPtr - IL_00c6: ldc.i4.4 - IL_00c7: bne.un.s IL_00d9 - - IL_00c9: ldloc.0 - IL_00ca: ldc.i8 0xffffffff - IL_00d3: conv.u - IL_00d4: ceq - IL_00d6: nop - IL_00d7: br.s IL_00e7 - - IL_00d9: ldloc.0 - IL_00da: ldc.i8 0xffffffffffffffff - IL_00e3: conv.u - IL_00e4: ceq - IL_00e6: nop - IL_00e7: brfalse.s IL_012c - - IL_00e9: ldc.i4.1 - IL_00ea: stloc.1 - IL_00eb: ldc.i8 0x0 - IL_00f4: conv.i - IL_00f5: stloc.2 - IL_00f6: ldc.i8 0x1 - IL_00ff: conv.i - IL_0100: stloc.3 - IL_0101: br.s IL_0128 - - IL_0103: ldloc.3 - IL_0104: call void assembly::set_c(native int) - IL_0109: ldloc.3 - IL_010a: ldarg.0 - IL_010b: add - IL_010c: stloc.3 - IL_010d: ldloc.2 - IL_010e: ldc.i8 0x1 - IL_0117: conv.i - IL_0118: add - IL_0119: stloc.2 - IL_011a: ldloc.2 - IL_011b: ldc.i8 0x0 - IL_0124: conv.i - IL_0125: cgt.un - IL_0127: stloc.1 - IL_0128: ldloc.1 - IL_0129: brtrue.s IL_0103 - - IL_012b: ret + IL_0026: nop + IL_0027: stloc.0 + IL_0028: sizeof [runtime]System.IntPtr + IL_002e: ldc.i4.4 + IL_002f: bne.un.s IL_0041 - IL_012c: ldc.i8 0x0 - IL_0135: conv.i - IL_0136: ldarg.0 - IL_0137: bge.s IL_0184 + IL_0031: ldloc.0 + IL_0032: ldc.i8 0xffffffff + IL_003b: conv.u + IL_003c: ceq + IL_003e: nop + IL_003f: br.s IL_004f - IL_0139: ldc.i8 0xa - IL_0142: conv.i - IL_0143: ldc.i8 0x1 - IL_014c: conv.i - IL_014d: bge.s IL_015f + IL_0041: ldloc.0 + IL_0042: ldc.i8 0xffffffffffffffff + IL_004b: conv.u + IL_004c: ceq + IL_004e: nop + IL_004f: brfalse.s IL_0094 - IL_014f: ldc.i8 0x0 - IL_0158: conv.i - IL_0159: nop - IL_015a: br IL_01d8 + IL_0051: ldc.i4.1 + IL_0052: stloc.1 + IL_0053: ldc.i8 0x0 + IL_005c: conv.i + IL_005d: stloc.2 + IL_005e: ldarg.0 + IL_005f: stloc.3 + IL_0060: br.s IL_0090 - IL_015f: ldc.i8 0xa - IL_0168: conv.i - IL_0169: ldc.i8 0x1 - IL_0172: conv.i - IL_0173: sub - IL_0174: ldarg.0 - IL_0175: div.un - IL_0176: ldc.i8 0x1 - IL_017f: conv.i - IL_0180: add.ovf.un - IL_0181: nop - IL_0182: br.s IL_01d8 + IL_0062: ldloc.3 + IL_0063: call void assembly::set_c(native int) + IL_0068: ldloc.3 + IL_0069: ldc.i8 0x1 + IL_0072: conv.i + IL_0073: add + IL_0074: stloc.3 + IL_0075: ldloc.2 + IL_0076: ldc.i8 0x1 + IL_007f: conv.i + IL_0080: add + IL_0081: stloc.2 + IL_0082: ldloc.2 + IL_0083: ldc.i8 0x0 + IL_008c: conv.i + IL_008d: cgt.un + IL_008f: stloc.1 + IL_0090: ldloc.1 + IL_0091: brtrue.s IL_0062 - IL_0184: ldc.i8 0x1 - IL_018d: conv.i - IL_018e: ldc.i8 0xa - IL_0197: conv.i - IL_0198: bge.s IL_01a7 + IL_0093: ret - IL_019a: ldc.i8 0x0 - IL_01a3: conv.i - IL_01a4: nop - IL_01a5: br.s IL_01d8 + IL_0094: ldc.i8 0xa + IL_009d: conv.i + IL_009e: ldarg.0 + IL_009f: bge.s IL_00ae - IL_01a7: ldc.i8 0x1 - IL_01b0: conv.i - IL_01b1: ldc.i8 0xa - IL_01ba: conv.i - IL_01bb: sub - IL_01bc: ldarg.0 - IL_01bd: not - IL_01be: ldc.i8 0x1 - IL_01c7: conv.i - IL_01c8: add - IL_01c9: div.un - IL_01ca: ldc.i8 0x1 - IL_01d3: conv.i - IL_01d4: add.ovf.un - IL_01d5: nop - IL_01d6: br.s IL_01d8 + IL_00a1: ldc.i8 0x0 + IL_00aa: conv.i + IL_00ab: nop + IL_00ac: br.s IL_00c6 - IL_01d8: stloc.2 - IL_01d9: ldc.i8 0x0 - IL_01e2: conv.i - IL_01e3: stloc.3 - IL_01e4: ldc.i8 0x1 - IL_01ed: conv.i - IL_01ee: stloc.s V_4 - IL_01f0: br.s IL_020c + IL_00ae: ldc.i8 0xa + IL_00b7: conv.i + IL_00b8: ldarg.0 + IL_00b9: sub + IL_00ba: ldc.i8 0x1 + IL_00c3: conv.i + IL_00c4: add.ovf.un + IL_00c5: nop + IL_00c6: stloc.2 + IL_00c7: ldc.i8 0x0 + IL_00d0: conv.i + IL_00d1: stloc.3 + IL_00d2: ldarg.0 + IL_00d3: stloc.s V_4 + IL_00d5: br.s IL_00fa - IL_01f2: ldloc.s V_4 - IL_01f4: call void assembly::set_c(native int) - IL_01f9: ldloc.s V_4 - IL_01fb: ldarg.0 - IL_01fc: add - IL_01fd: stloc.s V_4 - IL_01ff: ldloc.3 - IL_0200: ldc.i8 0x1 - IL_0209: conv.i - IL_020a: add - IL_020b: stloc.3 - IL_020c: ldloc.3 - IL_020d: ldloc.2 - IL_020e: blt.un.s IL_01f2 + IL_00d7: ldloc.s V_4 + IL_00d9: call void assembly::set_c(native int) + IL_00de: ldloc.s V_4 + IL_00e0: ldc.i8 0x1 + IL_00e9: conv.i + IL_00ea: add + IL_00eb: stloc.s V_4 + IL_00ed: ldloc.3 + IL_00ee: ldc.i8 0x1 + IL_00f7: conv.i + IL_00f8: add + IL_00f9: stloc.3 + IL_00fa: ldloc.3 + IL_00fb: ldloc.2 + IL_00fc: blt.un.s IL_00d7 - IL_0210: ret + IL_00fe: ret } - .method public static void f9(native int finish) cil managed + .method public static void f3(native int finish) cil managed { .maxstack 4 .locals init (native int V_0, - native int V_1, - native int V_2) + bool V_1, + native int V_2, + native int V_3, + native int V_4) IL_0000: ldarg.0 IL_0001: ldc.i8 0x1 IL_000a: conv.i @@ -861,462 +920,351 @@ IL_000d: ldc.i8 0x0 IL_0016: conv.i IL_0017: nop - IL_0018: br.s IL_003d + IL_0018: br.s IL_0027 IL_001a: ldarg.0 IL_001b: ldc.i8 0x1 IL_0024: conv.i IL_0025: sub - IL_0026: ldc.i8 0x2 - IL_002f: conv.i - IL_0030: div.un - IL_0031: ldc.i8 0x1 - IL_003a: conv.i - IL_003b: add.ovf.un - IL_003c: nop - IL_003d: stloc.0 - IL_003e: ldc.i8 0x0 - IL_0047: conv.i - IL_0048: stloc.1 - IL_0049: ldc.i8 0x1 - IL_0052: conv.i - IL_0053: stloc.2 - IL_0054: br.s IL_0076 + IL_0026: nop + IL_0027: stloc.0 + IL_0028: sizeof [runtime]System.IntPtr + IL_002e: ldc.i4.4 + IL_002f: bne.un.s IL_0041 - IL_0056: ldloc.2 - IL_0057: call void assembly::set_c(native int) - IL_005c: ldloc.2 - IL_005d: ldc.i8 0x2 - IL_0066: conv.i - IL_0067: add - IL_0068: stloc.2 - IL_0069: ldloc.1 - IL_006a: ldc.i8 0x1 - IL_0073: conv.i - IL_0074: add - IL_0075: stloc.1 - IL_0076: ldloc.1 - IL_0077: ldloc.0 - IL_0078: blt.un.s IL_0056 + IL_0031: ldloc.0 + IL_0032: ldc.i8 0xffffffff + IL_003b: conv.u + IL_003c: ceq + IL_003e: nop + IL_003f: br.s IL_004f + + IL_0041: ldloc.0 + IL_0042: ldc.i8 0xffffffffffffffff + IL_004b: conv.u + IL_004c: ceq + IL_004e: nop + IL_004f: brfalse.s IL_009d + + IL_0051: ldc.i4.1 + IL_0052: stloc.1 + IL_0053: ldc.i8 0x0 + IL_005c: conv.i + IL_005d: stloc.2 + IL_005e: ldc.i8 0x1 + IL_0067: conv.i + IL_0068: stloc.3 + IL_0069: br.s IL_0099 + + IL_006b: ldloc.3 + IL_006c: call void assembly::set_c(native int) + IL_0071: ldloc.3 + IL_0072: ldc.i8 0x1 + IL_007b: conv.i + IL_007c: add + IL_007d: stloc.3 + IL_007e: ldloc.2 + IL_007f: ldc.i8 0x1 + IL_0088: conv.i + IL_0089: add + IL_008a: stloc.2 + IL_008b: ldloc.2 + IL_008c: ldc.i8 0x0 + IL_0095: conv.i + IL_0096: cgt.un + IL_0098: stloc.1 + IL_0099: ldloc.1 + IL_009a: brtrue.s IL_006b + + IL_009c: ret + + IL_009d: ldarg.0 + IL_009e: ldc.i8 0x1 + IL_00a7: conv.i + IL_00a8: bge.s IL_00b7 + + IL_00aa: ldc.i8 0x0 + IL_00b3: conv.i + IL_00b4: nop + IL_00b5: br.s IL_00cf + + IL_00b7: ldarg.0 + IL_00b8: ldc.i8 0x1 + IL_00c1: conv.i + IL_00c2: sub + IL_00c3: ldc.i8 0x1 + IL_00cc: conv.i + IL_00cd: add.ovf.un + IL_00ce: nop + IL_00cf: stloc.2 + IL_00d0: ldc.i8 0x0 + IL_00d9: conv.i + IL_00da: stloc.3 + IL_00db: ldc.i8 0x1 + IL_00e4: conv.i + IL_00e5: stloc.s V_4 + IL_00e7: br.s IL_010c - IL_007a: ret + IL_00e9: ldloc.s V_4 + IL_00eb: call void assembly::set_c(native int) + IL_00f0: ldloc.s V_4 + IL_00f2: ldc.i8 0x1 + IL_00fb: conv.i + IL_00fc: add + IL_00fd: stloc.s V_4 + IL_00ff: ldloc.3 + IL_0100: ldc.i8 0x1 + IL_0109: conv.i + IL_010a: add + IL_010b: stloc.3 + IL_010c: ldloc.3 + IL_010d: ldloc.2 + IL_010e: blt.un.s IL_00e9 + + IL_0110: ret } - .method public static void f10(native int start, - native int step, - native int finish) cil managed + .method public static void f4(native int start, + native int finish) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 + .maxstack 4 .locals init (native int V_0, bool V_1, native int V_2, native int V_3, native int V_4) IL_0000: ldarg.1 - IL_0001: ldc.i8 0x0 - IL_000a: conv.i - IL_000b: bne.un.s IL_0019 - - IL_000d: ldarg.2 - IL_000e: ldarg.1 - IL_000f: ldarg.2 - IL_0010: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, - native int, - native int) - IL_0015: pop - IL_0016: nop - IL_0017: br.s IL_001a - - IL_0019: nop - IL_001a: ldc.i8 0x0 - IL_0023: conv.i - IL_0024: ldarg.1 - IL_0025: bge.s IL_0040 - - IL_0027: ldarg.2 - IL_0028: ldarg.2 - IL_0029: bge.s IL_0038 - - IL_002b: ldc.i8 0x0 - IL_0034: conv.i - IL_0035: nop - IL_0036: br.s IL_0065 - - IL_0038: ldarg.2 - IL_0039: ldarg.2 - IL_003a: sub - IL_003b: ldarg.1 - IL_003c: div.un - IL_003d: nop - IL_003e: br.s IL_0065 - - IL_0040: ldarg.2 - IL_0041: ldarg.2 - IL_0042: bge.s IL_0051 - - IL_0044: ldc.i8 0x0 - IL_004d: conv.i - IL_004e: nop - IL_004f: br.s IL_0065 - - IL_0051: ldarg.2 - IL_0052: ldarg.2 - IL_0053: sub - IL_0054: ldarg.1 - IL_0055: not - IL_0056: ldc.i8 0x1 - IL_005f: conv.i - IL_0060: add - IL_0061: div.un - IL_0062: nop - IL_0063: br.s IL_0065 - - IL_0065: stloc.0 - IL_0066: sizeof [runtime]System.IntPtr - IL_006c: ldc.i4.4 - IL_006d: bne.un.s IL_007f - - IL_006f: ldloc.0 - IL_0070: ldc.i8 0xffffffff - IL_0079: conv.u - IL_007a: ceq - IL_007c: nop - IL_007d: br.s IL_008d - - IL_007f: ldloc.0 - IL_0080: ldc.i8 0xffffffffffffffff - IL_0089: conv.u - IL_008a: ceq - IL_008c: nop - IL_008d: brfalse.s IL_00c9 - - IL_008f: ldc.i4.1 - IL_0090: stloc.1 - IL_0091: ldc.i8 0x0 - IL_009a: conv.i - IL_009b: stloc.2 - IL_009c: ldarg.2 - IL_009d: stloc.3 - IL_009e: br.s IL_00c5 - - IL_00a0: ldloc.3 - IL_00a1: call void assembly::set_c(native int) - IL_00a6: ldloc.3 - IL_00a7: ldarg.1 - IL_00a8: add - IL_00a9: stloc.3 - IL_00aa: ldloc.2 - IL_00ab: ldc.i8 0x1 - IL_00b4: conv.i - IL_00b5: add - IL_00b6: stloc.2 - IL_00b7: ldloc.2 - IL_00b8: ldc.i8 0x0 - IL_00c1: conv.i - IL_00c2: cgt.un - IL_00c4: stloc.1 - IL_00c5: ldloc.1 - IL_00c6: brtrue.s IL_00a0 + IL_0001: ldarg.0 + IL_0002: bge.s IL_0011 - IL_00c8: ret + IL_0004: ldc.i8 0x0 + IL_000d: conv.i + IL_000e: nop + IL_000f: br.s IL_0015 - IL_00c9: ldc.i8 0x0 - IL_00d2: conv.i - IL_00d3: ldarg.1 - IL_00d4: bge.s IL_00fa + IL_0011: ldarg.1 + IL_0012: ldarg.0 + IL_0013: sub + IL_0014: nop + IL_0015: stloc.0 + IL_0016: sizeof [runtime]System.IntPtr + IL_001c: ldc.i4.4 + IL_001d: bne.un.s IL_002f - IL_00d6: ldarg.2 - IL_00d7: ldarg.2 - IL_00d8: bge.s IL_00e7 + IL_001f: ldloc.0 + IL_0020: ldc.i8 0xffffffff + IL_0029: conv.u + IL_002a: ceq + IL_002c: nop + IL_002d: br.s IL_003d - IL_00da: ldc.i8 0x0 - IL_00e3: conv.i - IL_00e4: nop - IL_00e5: br.s IL_012a + IL_002f: ldloc.0 + IL_0030: ldc.i8 0xffffffffffffffff + IL_0039: conv.u + IL_003a: ceq + IL_003c: nop + IL_003d: brfalse.s IL_0082 - IL_00e7: ldarg.2 - IL_00e8: ldarg.2 - IL_00e9: sub - IL_00ea: ldarg.1 - IL_00eb: div.un - IL_00ec: ldc.i8 0x1 - IL_00f5: conv.i - IL_00f6: add.ovf.un - IL_00f7: nop - IL_00f8: br.s IL_012a + IL_003f: ldc.i4.1 + IL_0040: stloc.1 + IL_0041: ldc.i8 0x0 + IL_004a: conv.i + IL_004b: stloc.2 + IL_004c: ldarg.0 + IL_004d: stloc.3 + IL_004e: br.s IL_007e - IL_00fa: ldarg.2 - IL_00fb: ldarg.2 - IL_00fc: bge.s IL_010b + IL_0050: ldloc.3 + IL_0051: call void assembly::set_c(native int) + IL_0056: ldloc.3 + IL_0057: ldc.i8 0x1 + IL_0060: conv.i + IL_0061: add + IL_0062: stloc.3 + IL_0063: ldloc.2 + IL_0064: ldc.i8 0x1 + IL_006d: conv.i + IL_006e: add + IL_006f: stloc.2 + IL_0070: ldloc.2 + IL_0071: ldc.i8 0x0 + IL_007a: conv.i + IL_007b: cgt.un + IL_007d: stloc.1 + IL_007e: ldloc.1 + IL_007f: brtrue.s IL_0050 - IL_00fe: ldc.i8 0x0 - IL_0107: conv.i - IL_0108: nop - IL_0109: br.s IL_012a + IL_0081: ret - IL_010b: ldarg.2 - IL_010c: ldarg.2 - IL_010d: sub - IL_010e: ldarg.1 - IL_010f: not - IL_0110: ldc.i8 0x1 - IL_0119: conv.i - IL_011a: add - IL_011b: div.un - IL_011c: ldc.i8 0x1 - IL_0125: conv.i - IL_0126: add.ovf.un - IL_0127: nop - IL_0128: br.s IL_012a + IL_0082: ldarg.1 + IL_0083: ldarg.0 + IL_0084: bge.s IL_0093 - IL_012a: stloc.2 - IL_012b: ldc.i8 0x0 - IL_0134: conv.i - IL_0135: stloc.3 - IL_0136: ldarg.2 - IL_0137: stloc.s V_4 - IL_0139: br.s IL_0155 + IL_0086: ldc.i8 0x0 + IL_008f: conv.i + IL_0090: nop + IL_0091: br.s IL_00a2 - IL_013b: ldloc.s V_4 - IL_013d: call void assembly::set_c(native int) - IL_0142: ldloc.s V_4 - IL_0144: ldarg.1 - IL_0145: add - IL_0146: stloc.s V_4 - IL_0148: ldloc.3 - IL_0149: ldc.i8 0x1 - IL_0152: conv.i - IL_0153: add - IL_0154: stloc.3 - IL_0155: ldloc.3 - IL_0156: ldloc.2 - IL_0157: blt.un.s IL_013b + IL_0093: ldarg.1 + IL_0094: ldarg.0 + IL_0095: sub + IL_0096: ldc.i8 0x1 + IL_009f: conv.i + IL_00a0: add.ovf.un + IL_00a1: nop + IL_00a2: stloc.2 + IL_00a3: ldc.i8 0x0 + IL_00ac: conv.i + IL_00ad: stloc.3 + IL_00ae: ldarg.0 + IL_00af: stloc.s V_4 + IL_00b1: br.s IL_00d6 - IL_0159: ret + IL_00b3: ldloc.s V_4 + IL_00b5: call void assembly::set_c(native int) + IL_00ba: ldloc.s V_4 + IL_00bc: ldc.i8 0x1 + IL_00c5: conv.i + IL_00c6: add + IL_00c7: stloc.s V_4 + IL_00c9: ldloc.3 + IL_00ca: ldc.i8 0x1 + IL_00d3: conv.i + IL_00d4: add + IL_00d5: stloc.3 + IL_00d6: ldloc.3 + IL_00d7: ldloc.2 + IL_00d8: blt.un.s IL_00b3 + + IL_00da: ret } - .method public static void f11(native int start, - native int finish) cil managed + .method public static void f5() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 + .maxstack 4 .locals init (native int V_0, - native int V_1, - native int V_2) - IL_0000: ldarg.0 - IL_0001: ldc.i8 0x0 - IL_000a: conv.i - IL_000b: ldarg.1 - IL_000c: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, - native int, - native int) - IL_0011: pop - IL_0012: ldc.i8 0x0 - IL_001b: conv.i - IL_001c: stloc.0 - IL_001d: ldc.i8 0x0 - IL_0026: conv.i - IL_0027: stloc.1 - IL_0028: ldarg.0 - IL_0029: stloc.2 - IL_002a: br.s IL_004c + native int V_1) + IL_0000: ldc.i8 0x0 + IL_0009: conv.i + IL_000a: stloc.0 + IL_000b: ldc.i8 0x1 + IL_0014: conv.i + IL_0015: stloc.1 + IL_0016: br.s IL_0038 - IL_002c: ldloc.2 - IL_002d: call void assembly::set_c(native int) - IL_0032: ldloc.2 - IL_0033: ldc.i8 0x0 - IL_003c: conv.i - IL_003d: add - IL_003e: stloc.2 - IL_003f: ldloc.1 - IL_0040: ldc.i8 0x1 - IL_0049: conv.i - IL_004a: add - IL_004b: stloc.1 - IL_004c: ldloc.1 - IL_004d: ldloc.0 - IL_004e: blt.un.s IL_002c + IL_0018: ldloc.1 + IL_0019: call void assembly::set_c(native int) + IL_001e: ldloc.1 + IL_001f: ldc.i8 0x1 + IL_0028: conv.i + IL_0029: add + IL_002a: stloc.1 + IL_002b: ldloc.0 + IL_002c: ldc.i8 0x1 + IL_0035: conv.i + IL_0036: add + IL_0037: stloc.0 + IL_0038: ldloc.0 + IL_0039: ldc.i8 0xa + IL_0042: conv.u + IL_0043: blt.un.s IL_0018 - IL_0050: ret + IL_0045: ret } - .method public static void f12() cil managed + .method public static void f6() cil managed { - .maxstack 5 + .maxstack 4 .locals init (native int V_0, - native int V_1, - native int V_2) - IL_0000: ldc.i8 0x1 + native int V_1) + IL_0000: ldc.i8 0x0 IL_0009: conv.i - IL_000a: ldc.i8 0x0 - IL_0013: conv.i - IL_0014: ldc.i8 0xa - IL_001d: conv.i - IL_001e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, - native int, - native int) - IL_0023: pop - IL_0024: ldc.i8 0x0 - IL_002d: conv.i - IL_002e: stloc.0 - IL_002f: ldc.i8 0x0 - IL_0038: conv.i - IL_0039: stloc.1 - IL_003a: ldc.i8 0x1 - IL_0043: conv.i - IL_0044: stloc.2 - IL_0045: br.s IL_0067 + IL_000a: stloc.0 + IL_000b: ldc.i8 0x1 + IL_0014: conv.i + IL_0015: stloc.1 + IL_0016: br.s IL_0038 - IL_0047: ldloc.2 - IL_0048: call void assembly::set_c(native int) - IL_004d: ldloc.2 - IL_004e: ldc.i8 0x0 - IL_0057: conv.i - IL_0058: add - IL_0059: stloc.2 - IL_005a: ldloc.1 - IL_005b: ldc.i8 0x1 - IL_0064: conv.i - IL_0065: add - IL_0066: stloc.1 - IL_0067: ldloc.1 - IL_0068: ldloc.0 - IL_0069: blt.un.s IL_0047 + IL_0018: ldloc.1 + IL_0019: call void assembly::set_c(native int) + IL_001e: ldloc.1 + IL_001f: ldc.i8 0x2 + IL_0028: conv.i + IL_0029: add + IL_002a: stloc.1 + IL_002b: ldloc.0 + IL_002c: ldc.i8 0x1 + IL_0035: conv.i + IL_0036: add + IL_0037: stloc.0 + IL_0038: ldloc.0 + IL_0039: ldc.i8 0x5 + IL_0042: conv.u + IL_0043: blt.un.s IL_0018 - IL_006b: ret + IL_0045: ret } - .method public static void f13() cil managed + .method public static void f7(native int start) cil managed { .maxstack 4 .locals init (native int V_0, - bool V_1, - native int V_2, - native int V_3, - native int V_4) - IL_0000: ldc.i8 0xa - IL_0009: conv.i - IL_000a: ldc.i8 0x1 - IL_0013: conv.i - IL_0014: bge.s IL_0023 - - IL_0016: ldc.i8 0x0 - IL_001f: conv.i - IL_0020: nop - IL_0021: br.s IL_0039 - - IL_0023: ldc.i8 0xa - IL_002c: conv.i - IL_002d: ldc.i8 0x1 - IL_0036: conv.i - IL_0037: sub - IL_0038: nop - IL_0039: stloc.0 - IL_003a: sizeof [runtime]System.IntPtr - IL_0040: ldc.i4.4 - IL_0041: bne.un.s IL_0053 - - IL_0043: ldloc.0 - IL_0044: ldc.i8 0xffffffff - IL_004d: conv.u - IL_004e: ceq - IL_0050: nop - IL_0051: br.s IL_0061 - - IL_0053: ldloc.0 - IL_0054: ldc.i8 0xffffffffffffffff - IL_005d: conv.u - IL_005e: ceq - IL_0060: nop - IL_0061: brfalse.s IL_00af - - IL_0063: ldc.i4.1 - IL_0064: stloc.1 - IL_0065: ldc.i8 0x0 - IL_006e: conv.i - IL_006f: stloc.2 - IL_0070: ldc.i8 0xa - IL_0079: conv.i - IL_007a: stloc.3 - IL_007b: br.s IL_00ab - - IL_007d: ldloc.3 - IL_007e: call void assembly::set_c(native int) - IL_0083: ldloc.3 - IL_0084: ldc.i8 0xffffffffffffffff - IL_008d: conv.i - IL_008e: add - IL_008f: stloc.3 - IL_0090: ldloc.2 - IL_0091: ldc.i8 0x1 - IL_009a: conv.i - IL_009b: add - IL_009c: stloc.2 - IL_009d: ldloc.2 - IL_009e: ldc.i8 0x0 - IL_00a7: conv.i - IL_00a8: cgt.un - IL_00aa: stloc.1 - IL_00ab: ldloc.1 - IL_00ac: brtrue.s IL_007d - - IL_00ae: ret - - IL_00af: ldc.i8 0xa - IL_00b8: conv.i - IL_00b9: ldc.i8 0x1 - IL_00c2: conv.i - IL_00c3: bge.s IL_00d2 + native int V_1, + native int V_2) + IL_0000: ldc.i8 0xa + IL_0009: conv.i + IL_000a: ldarg.0 + IL_000b: bge.s IL_001a - IL_00c5: ldc.i8 0x0 - IL_00ce: conv.i - IL_00cf: nop - IL_00d0: br.s IL_00f3 + IL_000d: ldc.i8 0x0 + IL_0016: conv.i + IL_0017: nop + IL_0018: br.s IL_003d - IL_00d2: ldc.i8 0xa - IL_00db: conv.i - IL_00dc: ldc.i8 0x1 - IL_00e5: conv.i - IL_00e6: sub - IL_00e7: ldc.i8 0x1 - IL_00f0: conv.i - IL_00f1: add.ovf.un - IL_00f2: nop - IL_00f3: stloc.2 - IL_00f4: ldc.i8 0x0 - IL_00fd: conv.i - IL_00fe: stloc.3 - IL_00ff: ldc.i8 0xa - IL_0108: conv.i - IL_0109: stloc.s V_4 - IL_010b: br.s IL_0130 + IL_001a: ldc.i8 0xa + IL_0023: conv.i + IL_0024: ldarg.0 + IL_0025: sub + IL_0026: ldc.i8 0x2 + IL_002f: conv.i + IL_0030: div.un + IL_0031: ldc.i8 0x1 + IL_003a: conv.i + IL_003b: add.ovf.un + IL_003c: nop + IL_003d: stloc.0 + IL_003e: ldc.i8 0x0 + IL_0047: conv.i + IL_0048: stloc.1 + IL_0049: ldarg.0 + IL_004a: stloc.2 + IL_004b: br.s IL_006d - IL_010d: ldloc.s V_4 - IL_010f: call void assembly::set_c(native int) - IL_0114: ldloc.s V_4 - IL_0116: ldc.i8 0xffffffffffffffff - IL_011f: conv.i - IL_0120: add - IL_0121: stloc.s V_4 - IL_0123: ldloc.3 - IL_0124: ldc.i8 0x1 - IL_012d: conv.i - IL_012e: add - IL_012f: stloc.3 - IL_0130: ldloc.3 - IL_0131: ldloc.2 - IL_0132: blt.un.s IL_010d + IL_004d: ldloc.2 + IL_004e: call void assembly::set_c(native int) + IL_0053: ldloc.2 + IL_0054: ldc.i8 0x2 + IL_005d: conv.i + IL_005e: add + IL_005f: stloc.2 + IL_0060: ldloc.1 + IL_0061: ldc.i8 0x1 + IL_006a: conv.i + IL_006b: add + IL_006c: stloc.1 + IL_006d: ldloc.1 + IL_006e: ldloc.0 + IL_006f: blt.un.s IL_004d - IL_0134: ret + IL_0071: ret } - .method public static void f14() cil managed + .method public static void f8(native int step) cil managed { .maxstack 5 @@ -1325,228 +1273,280 @@ native int V_2, native int V_3, native int V_4) - IL_0000: ldc.i8 0xfffffffffffffffe - IL_0009: conv.i - IL_000a: ldc.i8 0x0 - IL_0013: conv.i - IL_0014: bne.un.s IL_003d + IL_0000: ldarg.0 + IL_0001: ldc.i8 0x0 + IL_000a: conv.i + IL_000b: bne.un.s IL_002b - IL_0016: ldc.i8 0xa - IL_001f: conv.i - IL_0020: ldc.i8 0xfffffffffffffffe - IL_0029: conv.i - IL_002a: ldc.i8 0x1 - IL_0033: conv.i - IL_0034: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, + IL_000d: ldc.i8 0x1 + IL_0016: conv.i + IL_0017: ldarg.0 + IL_0018: ldc.i8 0xa + IL_0021: conv.i + IL_0022: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeIntPtr(native int, native int, native int) - IL_0039: pop - IL_003a: nop - IL_003b: br.s IL_003e + IL_0027: pop + IL_0028: nop + IL_0029: br.s IL_002c - IL_003d: nop - IL_003e: ldc.i8 0x0 - IL_0047: conv.i - IL_0048: ldc.i8 0xfffffffffffffffe - IL_0051: conv.i - IL_0052: bge.s IL_009d + IL_002b: nop + IL_002c: ldc.i8 0x0 + IL_0035: conv.i + IL_0036: ldarg.0 + IL_0037: bge.s IL_0076 - IL_0054: ldc.i8 0x1 - IL_005d: conv.i - IL_005e: ldc.i8 0xa - IL_0067: conv.i - IL_0068: bge.s IL_007a + IL_0039: ldc.i8 0xa + IL_0042: conv.i + IL_0043: ldc.i8 0x1 + IL_004c: conv.i + IL_004d: bge.s IL_005c - IL_006a: ldc.i8 0x0 - IL_0073: conv.i - IL_0074: nop - IL_0075: br IL_00ef + IL_004f: ldc.i8 0x0 + IL_0058: conv.i + IL_0059: nop + IL_005a: br.s IL_00bf - IL_007a: ldc.i8 0x1 - IL_0083: conv.i - IL_0084: ldc.i8 0xa - IL_008d: conv.i - IL_008e: sub - IL_008f: ldc.i8 0xfffffffffffffffe - IL_0098: conv.i - IL_0099: div.un - IL_009a: nop - IL_009b: br.s IL_00ef + IL_005c: ldc.i8 0xa + IL_0065: conv.i + IL_0066: ldc.i8 0x1 + IL_006f: conv.i + IL_0070: sub + IL_0071: ldarg.0 + IL_0072: div.un + IL_0073: nop + IL_0074: br.s IL_00bf - IL_009d: ldc.i8 0xa - IL_00a6: conv.i - IL_00a7: ldc.i8 0x1 - IL_00b0: conv.i - IL_00b1: bge.s IL_00c0 + IL_0076: ldc.i8 0x1 + IL_007f: conv.i + IL_0080: ldc.i8 0xa + IL_0089: conv.i + IL_008a: bge.s IL_0099 - IL_00b3: ldc.i8 0x0 - IL_00bc: conv.i - IL_00bd: nop - IL_00be: br.s IL_00ef + IL_008c: ldc.i8 0x0 + IL_0095: conv.i + IL_0096: nop + IL_0097: br.s IL_00bf - IL_00c0: ldc.i8 0xa - IL_00c9: conv.i - IL_00ca: ldc.i8 0x1 - IL_00d3: conv.i - IL_00d4: sub - IL_00d5: ldc.i8 0xfffffffffffffffe - IL_00de: conv.i - IL_00df: not - IL_00e0: ldc.i8 0x1 - IL_00e9: conv.i - IL_00ea: add - IL_00eb: div.un - IL_00ec: nop - IL_00ed: br.s IL_00ef + IL_0099: ldc.i8 0x1 + IL_00a2: conv.i + IL_00a3: ldc.i8 0xa + IL_00ac: conv.i + IL_00ad: sub + IL_00ae: ldarg.0 + IL_00af: not + IL_00b0: ldc.i8 0x1 + IL_00b9: conv.i + IL_00ba: add + IL_00bb: div.un + IL_00bc: nop + IL_00bd: br.s IL_00bf - IL_00ef: stloc.0 - IL_00f0: sizeof [runtime]System.IntPtr - IL_00f6: ldc.i4.4 - IL_00f7: bne.un.s IL_0109 + IL_00bf: stloc.0 + IL_00c0: sizeof [runtime]System.IntPtr + IL_00c6: ldc.i4.4 + IL_00c7: bne.un.s IL_00d9 - IL_00f9: ldloc.0 - IL_00fa: ldc.i8 0xffffffff - IL_0103: conv.u - IL_0104: ceq - IL_0106: nop - IL_0107: br.s IL_0117 + IL_00c9: ldloc.0 + IL_00ca: ldc.i8 0xffffffff + IL_00d3: conv.u + IL_00d4: ceq + IL_00d6: nop + IL_00d7: br.s IL_00e7 - IL_0109: ldloc.0 - IL_010a: ldc.i8 0xffffffffffffffff - IL_0113: conv.u - IL_0114: ceq - IL_0116: nop - IL_0117: brfalse.s IL_0165 + IL_00d9: ldloc.0 + IL_00da: ldc.i8 0xffffffffffffffff + IL_00e3: conv.u + IL_00e4: ceq + IL_00e6: nop + IL_00e7: brfalse.s IL_012c - IL_0119: ldc.i4.1 - IL_011a: stloc.1 + IL_00e9: ldc.i4.1 + IL_00ea: stloc.1 + IL_00eb: ldc.i8 0x0 + IL_00f4: conv.i + IL_00f5: stloc.2 + IL_00f6: ldc.i8 0x1 + IL_00ff: conv.i + IL_0100: stloc.3 + IL_0101: br.s IL_0128 + + IL_0103: ldloc.3 + IL_0104: call void assembly::set_c(native int) + IL_0109: ldloc.3 + IL_010a: ldarg.0 + IL_010b: add + IL_010c: stloc.3 + IL_010d: ldloc.2 + IL_010e: ldc.i8 0x1 + IL_0117: conv.i + IL_0118: add + IL_0119: stloc.2 + IL_011a: ldloc.2 IL_011b: ldc.i8 0x0 IL_0124: conv.i - IL_0125: stloc.2 - IL_0126: ldc.i8 0xa - IL_012f: conv.i - IL_0130: stloc.3 - IL_0131: br.s IL_0161 + IL_0125: cgt.un + IL_0127: stloc.1 + IL_0128: ldloc.1 + IL_0129: brtrue.s IL_0103 - IL_0133: ldloc.3 - IL_0134: call void assembly::set_c(native int) - IL_0139: ldloc.3 - IL_013a: ldc.i8 0xfffffffffffffffe - IL_0143: conv.i - IL_0144: add - IL_0145: stloc.3 - IL_0146: ldloc.2 - IL_0147: ldc.i8 0x1 - IL_0150: conv.i - IL_0151: add - IL_0152: stloc.2 - IL_0153: ldloc.2 - IL_0154: ldc.i8 0x0 - IL_015d: conv.i - IL_015e: cgt.un - IL_0160: stloc.1 - IL_0161: ldloc.1 - IL_0162: brtrue.s IL_0133 + IL_012b: ret - IL_0164: ret + IL_012c: ldc.i8 0x0 + IL_0135: conv.i + IL_0136: ldarg.0 + IL_0137: bge.s IL_0184 - IL_0165: ldc.i8 0x0 - IL_016e: conv.i - IL_016f: ldc.i8 0xfffffffffffffffe - IL_0178: conv.i - IL_0179: bge.s IL_01cf + IL_0139: ldc.i8 0xa + IL_0142: conv.i + IL_0143: ldc.i8 0x1 + IL_014c: conv.i + IL_014d: bge.s IL_015f - IL_017b: ldc.i8 0x1 - IL_0184: conv.i - IL_0185: ldc.i8 0xa - IL_018e: conv.i - IL_018f: bge.s IL_01a1 + IL_014f: ldc.i8 0x0 + IL_0158: conv.i + IL_0159: nop + IL_015a: br IL_01d8 - IL_0191: ldc.i8 0x0 - IL_019a: conv.i - IL_019b: nop - IL_019c: br IL_022c + IL_015f: ldc.i8 0xa + IL_0168: conv.i + IL_0169: ldc.i8 0x1 + IL_0172: conv.i + IL_0173: sub + IL_0174: ldarg.0 + IL_0175: div.un + IL_0176: ldc.i8 0x1 + IL_017f: conv.i + IL_0180: add.ovf.un + IL_0181: nop + IL_0182: br.s IL_01d8 - IL_01a1: ldc.i8 0x1 - IL_01aa: conv.i - IL_01ab: ldc.i8 0xa - IL_01b4: conv.i - IL_01b5: sub - IL_01b6: ldc.i8 0xfffffffffffffffe - IL_01bf: conv.i - IL_01c0: div.un - IL_01c1: ldc.i8 0x1 - IL_01ca: conv.i - IL_01cb: add.ovf.un - IL_01cc: nop - IL_01cd: br.s IL_022c + IL_0184: ldc.i8 0x1 + IL_018d: conv.i + IL_018e: ldc.i8 0xa + IL_0197: conv.i + IL_0198: bge.s IL_01a7 - IL_01cf: ldc.i8 0xa - IL_01d8: conv.i - IL_01d9: ldc.i8 0x1 + IL_019a: ldc.i8 0x0 + IL_01a3: conv.i + IL_01a4: nop + IL_01a5: br.s IL_01d8 + + IL_01a7: ldc.i8 0x1 + IL_01b0: conv.i + IL_01b1: ldc.i8 0xa + IL_01ba: conv.i + IL_01bb: sub + IL_01bc: ldarg.0 + IL_01bd: not + IL_01be: ldc.i8 0x1 + IL_01c7: conv.i + IL_01c8: add + IL_01c9: div.un + IL_01ca: ldc.i8 0x1 + IL_01d3: conv.i + IL_01d4: add.ovf.un + IL_01d5: nop + IL_01d6: br.s IL_01d8 + + IL_01d8: stloc.2 + IL_01d9: ldc.i8 0x0 IL_01e2: conv.i - IL_01e3: bge.s IL_01f2 + IL_01e3: stloc.3 + IL_01e4: ldc.i8 0x1 + IL_01ed: conv.i + IL_01ee: stloc.s V_4 + IL_01f0: br.s IL_020c - IL_01e5: ldc.i8 0x0 - IL_01ee: conv.i - IL_01ef: nop - IL_01f0: br.s IL_022c + IL_01f2: ldloc.s V_4 + IL_01f4: call void assembly::set_c(native int) + IL_01f9: ldloc.s V_4 + IL_01fb: ldarg.0 + IL_01fc: add + IL_01fd: stloc.s V_4 + IL_01ff: ldloc.3 + IL_0200: ldc.i8 0x1 + IL_0209: conv.i + IL_020a: add + IL_020b: stloc.3 + IL_020c: ldloc.3 + IL_020d: ldloc.2 + IL_020e: blt.un.s IL_01f2 - IL_01f2: ldc.i8 0xa - IL_01fb: conv.i - IL_01fc: ldc.i8 0x1 - IL_0205: conv.i - IL_0206: sub - IL_0207: ldc.i8 0xfffffffffffffffe - IL_0210: conv.i - IL_0211: not - IL_0212: ldc.i8 0x1 - IL_021b: conv.i - IL_021c: add - IL_021d: div.un - IL_021e: ldc.i8 0x1 - IL_0227: conv.i - IL_0228: add.ovf.un - IL_0229: nop - IL_022a: br.s IL_022c + IL_0210: ret + } - IL_022c: stloc.2 - IL_022d: ldc.i8 0x0 - IL_0236: conv.i - IL_0237: stloc.3 - IL_0238: ldc.i8 0xa - IL_0241: conv.i - IL_0242: stloc.s V_4 - IL_0244: br.s IL_0269 + .method public static void f9(native int finish) cil managed + { + + .maxstack 4 + .locals init (native int V_0, + native int V_1, + native int V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i8 0x1 + IL_000a: conv.i + IL_000b: bge.s IL_001a - IL_0246: ldloc.s V_4 - IL_0248: call void assembly::set_c(native int) - IL_024d: ldloc.s V_4 - IL_024f: ldc.i8 0xfffffffffffffffe - IL_0258: conv.i - IL_0259: add - IL_025a: stloc.s V_4 - IL_025c: ldloc.3 - IL_025d: ldc.i8 0x1 - IL_0266: conv.i - IL_0267: add - IL_0268: stloc.3 - IL_0269: ldloc.3 - IL_026a: ldloc.2 - IL_026b: blt.un.s IL_0246 + IL_000d: ldc.i8 0x0 + IL_0016: conv.i + IL_0017: nop + IL_0018: br.s IL_003d - IL_026d: ret + IL_001a: ldarg.0 + IL_001b: ldc.i8 0x1 + IL_0024: conv.i + IL_0025: sub + IL_0026: ldc.i8 0x2 + IL_002f: conv.i + IL_0030: div.un + IL_0031: ldc.i8 0x1 + IL_003a: conv.i + IL_003b: add.ovf.un + IL_003c: nop + IL_003d: stloc.0 + IL_003e: ldc.i8 0x0 + IL_0047: conv.i + IL_0048: stloc.1 + IL_0049: ldc.i8 0x1 + IL_0052: conv.i + IL_0053: stloc.2 + IL_0054: br.s IL_0076 + + IL_0056: ldloc.2 + IL_0057: call void assembly::set_c(native int) + IL_005c: ldloc.2 + IL_005d: ldc.i8 0x2 + IL_0066: conv.i + IL_0067: add + IL_0068: stloc.2 + IL_0069: ldloc.1 + IL_006a: ldc.i8 0x1 + IL_0073: conv.i + IL_0074: add + IL_0075: stloc.1 + IL_0076: ldloc.1 + IL_0077: ldloc.0 + IL_0078: blt.un.s IL_0056 + + IL_007a: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static native int get_c() 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 native int assembly::c@1 + IL_0005: ret + } + + .method public specialname static void set_c(native int 'value') cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld native int assembly::c@1 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -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..23925a24457 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 @@ -33,21 +33,15 @@ 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 public specialname static int8 get_c() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int8 ''.$assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(int8 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int8 ''.$assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -137,6 +131,238 @@ IL_0019: ret } + .method public static void f10(int8 start, + int8 step, + int8 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint16 V_0, + uint16 V_1, + int8 V_2) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeSByte(int8, + int8, + int8) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldc.i4.0 + IL_0011: ldarg.1 + IL_0012: bge.s IL_0027 + + IL_0014: ldarg.2 + IL_0015: ldarg.2 + IL_0016: bge.s IL_001c + + IL_0018: ldc.i4.0 + IL_0019: nop + IL_001a: br.s IL_003d + + IL_001c: ldarg.2 + IL_001d: ldarg.2 + IL_001e: sub + IL_001f: ldarg.1 + IL_0020: div.un + IL_0021: conv.i2 + IL_0022: ldc.i4.1 + IL_0023: add + IL_0024: nop + IL_0025: br.s IL_003d + + IL_0027: ldarg.2 + IL_0028: ldarg.2 + IL_0029: bge.s IL_002f + + IL_002b: ldc.i4.0 + IL_002c: nop + IL_002d: br.s IL_003d + + IL_002f: ldarg.2 + IL_0030: ldarg.2 + IL_0031: sub + IL_0032: ldarg.1 + IL_0033: not + IL_0034: ldc.i4.1 + IL_0035: add + IL_0036: div.un + IL_0037: conv.i2 + IL_0038: ldc.i4.1 + IL_0039: add + IL_003a: nop + IL_003b: br.s IL_003d + + IL_003d: stloc.0 + IL_003e: ldc.i4.0 + IL_003f: stloc.1 + IL_0040: ldarg.2 + IL_0041: stloc.2 + IL_0042: br.s IL_0052 + + IL_0044: ldloc.2 + IL_0045: call void assembly::set_c(int8) + IL_004a: ldloc.2 + IL_004b: ldarg.1 + IL_004c: add + IL_004d: stloc.2 + IL_004e: ldloc.1 + IL_004f: ldc.i4.1 + IL_0050: add + IL_0051: stloc.1 + IL_0052: ldloc.1 + IL_0053: ldloc.0 + IL_0054: blt.un.s IL_0044 + + IL_0056: ret + } + + .method public static void f11(int8 start, + int8 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (int8 V_0, + int8 V_1, + int8 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldarg.1 + IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeSByte(int8, + int8, + int8) + IL_0008: pop + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4.0 + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: stloc.2 + IL_000f: br.s IL_001f + + IL_0011: ldloc.2 + IL_0012: call void assembly::set_c(int8) + IL_0017: ldloc.2 + IL_0018: ldc.i4.0 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldloc.0 + IL_0021: blt.un.s IL_0011 + + IL_0023: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (int8 V_0, + int8 V_1, + int8 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.s 10 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeSByte(int8, + int8, + int8) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: stloc.0 + IL_000c: ldc.i4.0 + IL_000d: stloc.1 + IL_000e: ldc.i4.1 + IL_000f: stloc.2 + IL_0010: br.s IL_0020 + + IL_0012: ldloc.2 + IL_0013: call void assembly::set_c(int8) + IL_0018: ldloc.2 + IL_0019: ldc.i4.0 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldloc.0 + IL_0022: blt.un.s IL_0012 + + IL_0024: ret + } + + .method public static void f13() cil managed + { + + .maxstack 4 + .locals init (uint16 V_0, + int8 V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.s 10 + IL_0004: stloc.1 + IL_0005: br.s IL_0015 + + IL_0007: ldloc.1 + IL_0008: call void assembly::set_c(int8) + IL_000d: ldloc.1 + IL_000e: ldc.i4.m1 + IL_000f: add + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: ldc.i4.1 + IL_0013: add + IL_0014: stloc.0 + IL_0015: ldloc.0 + IL_0016: ldc.i4.s 10 + IL_0018: blt.un.s IL_0007 + + IL_001a: ret + } + + .method public static void f14() cil managed + { + + .maxstack 4 + .locals init (uint16 V_0, + int8 V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.s 10 + IL_0004: stloc.1 + IL_0005: br.s IL_0016 + + IL_0007: ldloc.1 + IL_0008: call void assembly::set_c(int8) + IL_000d: ldloc.1 + IL_000e: ldc.i4.s -2 + IL_0010: add + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldc.i4.1 + IL_0014: add + IL_0015: stloc.0 + IL_0016: ldloc.0 + IL_0017: ldc.i4.5 + IL_0018: blt.un.s IL_0007 + + IL_001a: ret + } + .method public static void f2(int8 start) cil managed { @@ -491,236 +717,21 @@ IL_002a: ret } - .method public static void f10(int8 start, - int8 step, - int8 finish) cil managed + .method public specialname static int8 get_c() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - .maxstack 5 - .locals init (uint16 V_0, - uint16 V_1, - int8 V_2) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeSByte(int8, - int8, - int8) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldc.i4.0 - IL_0011: ldarg.1 - IL_0012: bge.s IL_0027 - - IL_0014: ldarg.2 - IL_0015: ldarg.2 - IL_0016: bge.s IL_001c - - IL_0018: ldc.i4.0 - IL_0019: nop - IL_001a: br.s IL_003d - - IL_001c: ldarg.2 - IL_001d: ldarg.2 - IL_001e: sub - IL_001f: ldarg.1 - IL_0020: div.un - IL_0021: conv.i2 - IL_0022: ldc.i4.1 - IL_0023: add - IL_0024: nop - IL_0025: br.s IL_003d - - IL_0027: ldarg.2 - IL_0028: ldarg.2 - IL_0029: bge.s IL_002f - - IL_002b: ldc.i4.0 - IL_002c: nop - IL_002d: br.s IL_003d - - IL_002f: ldarg.2 - IL_0030: ldarg.2 - IL_0031: sub - IL_0032: ldarg.1 - IL_0033: not - IL_0034: ldc.i4.1 - IL_0035: add - IL_0036: div.un - IL_0037: conv.i2 - IL_0038: ldc.i4.1 - IL_0039: add - IL_003a: nop - IL_003b: br.s IL_003d - - IL_003d: stloc.0 - IL_003e: ldc.i4.0 - IL_003f: stloc.1 - IL_0040: ldarg.2 - IL_0041: stloc.2 - IL_0042: br.s IL_0052 - - IL_0044: ldloc.2 - IL_0045: call void assembly::set_c(int8) - IL_004a: ldloc.2 - IL_004b: ldarg.1 - IL_004c: add - IL_004d: stloc.2 - IL_004e: ldloc.1 - IL_004f: ldc.i4.1 - IL_0050: add - IL_0051: stloc.1 - IL_0052: ldloc.1 - IL_0053: ldloc.0 - IL_0054: blt.un.s IL_0044 - - IL_0056: ret + .maxstack 8 + IL_0000: ldsfld int8 ''.$assembly::c@1 + IL_0005: ret } - .method public static void f11(int8 start, - int8 finish) cil managed + .method public specialname static void set_c(int8 'value') cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 - .locals init (int8 V_0, - int8 V_1, - int8 V_2) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: ldarg.1 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeSByte(int8, - int8, - int8) - IL_0008: pop - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4.0 - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: stloc.2 - IL_000f: br.s IL_001f - - IL_0011: ldloc.2 - IL_0012: call void assembly::set_c(int8) - IL_0017: ldloc.2 - IL_0018: ldc.i4.0 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.0 - IL_0021: blt.un.s IL_0011 - - IL_0023: ret - } - - .method public static void f12() cil managed - { - - .maxstack 5 - .locals init (int8 V_0, - int8 V_1, - int8 V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.0 - IL_0002: ldc.i4.s 10 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeSByte(int8, - int8, - int8) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: ldc.i4.0 - IL_000d: stloc.1 - IL_000e: ldc.i4.1 - IL_000f: stloc.2 - IL_0010: br.s IL_0020 - - IL_0012: ldloc.2 - IL_0013: call void assembly::set_c(int8) - IL_0018: ldloc.2 - IL_0019: ldc.i4.0 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldloc.0 - IL_0022: blt.un.s IL_0012 - - IL_0024: ret - } - - .method public static void f13() cil managed - { - - .maxstack 4 - .locals init (uint16 V_0, - int8 V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.s 10 - IL_0004: stloc.1 - IL_0005: br.s IL_0015 - - IL_0007: ldloc.1 - IL_0008: call void assembly::set_c(int8) - IL_000d: ldloc.1 - IL_000e: ldc.i4.m1 - IL_000f: add - IL_0010: stloc.1 - IL_0011: ldloc.0 - IL_0012: ldc.i4.1 - IL_0013: add - IL_0014: stloc.0 - IL_0015: ldloc.0 - IL_0016: ldc.i4.s 10 - IL_0018: blt.un.s IL_0007 - - IL_001a: ret - } - - .method public static void f14() cil managed - { - - .maxstack 4 - .locals init (uint16 V_0, - int8 V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.s 10 - IL_0004: stloc.1 - IL_0005: br.s IL_0016 - - IL_0007: ldloc.1 - IL_0008: call void assembly::set_c(int8) - IL_000d: ldloc.1 - IL_000e: ldc.i4.s -2 - IL_0010: add - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldc.i4.1 - IL_0014: add - IL_0015: stloc.0 - IL_0016: ldloc.0 - IL_0017: ldc.i4.5 - IL_0018: blt.un.s IL_0007 - - IL_001a: ret + IL_0001: stsfld int8 ''.$assembly::c@1 + IL_0006: ret } .property int8 c() @@ -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..1cf67c50954 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 @@ -35,21 +35,15 @@ .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 int8 c@1 .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 int8 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int8 assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(int8 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int8 assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -139,6 +133,238 @@ IL_0019: ret } + .method public static void f10(int8 start, + int8 step, + int8 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint16 V_0, + uint16 V_1, + int8 V_2) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeSByte(int8, + int8, + int8) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldc.i4.0 + IL_0011: ldarg.1 + IL_0012: bge.s IL_0027 + + IL_0014: ldarg.2 + IL_0015: ldarg.2 + IL_0016: bge.s IL_001c + + IL_0018: ldc.i4.0 + IL_0019: nop + IL_001a: br.s IL_003d + + IL_001c: ldarg.2 + IL_001d: ldarg.2 + IL_001e: sub + IL_001f: ldarg.1 + IL_0020: div.un + IL_0021: conv.i2 + IL_0022: ldc.i4.1 + IL_0023: add + IL_0024: nop + IL_0025: br.s IL_003d + + IL_0027: ldarg.2 + IL_0028: ldarg.2 + IL_0029: bge.s IL_002f + + IL_002b: ldc.i4.0 + IL_002c: nop + IL_002d: br.s IL_003d + + IL_002f: ldarg.2 + IL_0030: ldarg.2 + IL_0031: sub + IL_0032: ldarg.1 + IL_0033: not + IL_0034: ldc.i4.1 + IL_0035: add + IL_0036: div.un + IL_0037: conv.i2 + IL_0038: ldc.i4.1 + IL_0039: add + IL_003a: nop + IL_003b: br.s IL_003d + + IL_003d: stloc.0 + IL_003e: ldc.i4.0 + IL_003f: stloc.1 + IL_0040: ldarg.2 + IL_0041: stloc.2 + IL_0042: br.s IL_0052 + + IL_0044: ldloc.2 + IL_0045: call void assembly::set_c(int8) + IL_004a: ldloc.2 + IL_004b: ldarg.1 + IL_004c: add + IL_004d: stloc.2 + IL_004e: ldloc.1 + IL_004f: ldc.i4.1 + IL_0050: add + IL_0051: stloc.1 + IL_0052: ldloc.1 + IL_0053: ldloc.0 + IL_0054: blt.un.s IL_0044 + + IL_0056: ret + } + + .method public static void f11(int8 start, + int8 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (int8 V_0, + int8 V_1, + int8 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldarg.1 + IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeSByte(int8, + int8, + int8) + IL_0008: pop + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4.0 + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: stloc.2 + IL_000f: br.s IL_001f + + IL_0011: ldloc.2 + IL_0012: call void assembly::set_c(int8) + IL_0017: ldloc.2 + IL_0018: ldc.i4.0 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldloc.0 + IL_0021: blt.un.s IL_0011 + + IL_0023: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (int8 V_0, + int8 V_1, + int8 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.s 10 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeSByte(int8, + int8, + int8) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: stloc.0 + IL_000c: ldc.i4.0 + IL_000d: stloc.1 + IL_000e: ldc.i4.1 + IL_000f: stloc.2 + IL_0010: br.s IL_0020 + + IL_0012: ldloc.2 + IL_0013: call void assembly::set_c(int8) + IL_0018: ldloc.2 + IL_0019: ldc.i4.0 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldloc.0 + IL_0022: blt.un.s IL_0012 + + IL_0024: ret + } + + .method public static void f13() cil managed + { + + .maxstack 4 + .locals init (uint16 V_0, + int8 V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.s 10 + IL_0004: stloc.1 + IL_0005: br.s IL_0015 + + IL_0007: ldloc.1 + IL_0008: call void assembly::set_c(int8) + IL_000d: ldloc.1 + IL_000e: ldc.i4.m1 + IL_000f: add + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: ldc.i4.1 + IL_0013: add + IL_0014: stloc.0 + IL_0015: ldloc.0 + IL_0016: ldc.i4.s 10 + IL_0018: blt.un.s IL_0007 + + IL_001a: ret + } + + .method public static void f14() cil managed + { + + .maxstack 4 + .locals init (uint16 V_0, + int8 V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.s 10 + IL_0004: stloc.1 + IL_0005: br.s IL_0016 + + IL_0007: ldloc.1 + IL_0008: call void assembly::set_c(int8) + IL_000d: ldloc.1 + IL_000e: ldc.i4.s -2 + IL_0010: add + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldc.i4.1 + IL_0014: add + IL_0015: stloc.0 + IL_0016: ldloc.0 + IL_0017: ldc.i4.5 + IL_0018: blt.un.s IL_0007 + + IL_001a: ret + } + .method public static void f2(int8 start) cil managed { @@ -493,247 +719,21 @@ IL_002a: ret } - .method public static void f10(int8 start, - int8 step, - int8 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (uint16 V_0, - uint16 V_1, - int8 V_2) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeSByte(int8, - int8, - int8) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldc.i4.0 - IL_0011: ldarg.1 - IL_0012: bge.s IL_0027 - - IL_0014: ldarg.2 - IL_0015: ldarg.2 - IL_0016: bge.s IL_001c - - IL_0018: ldc.i4.0 - IL_0019: nop - IL_001a: br.s IL_003d - - IL_001c: ldarg.2 - IL_001d: ldarg.2 - IL_001e: sub - IL_001f: ldarg.1 - IL_0020: div.un - IL_0021: conv.i2 - IL_0022: ldc.i4.1 - IL_0023: add - IL_0024: nop - IL_0025: br.s IL_003d - - IL_0027: ldarg.2 - IL_0028: ldarg.2 - IL_0029: bge.s IL_002f - - IL_002b: ldc.i4.0 - IL_002c: nop - IL_002d: br.s IL_003d - - IL_002f: ldarg.2 - IL_0030: ldarg.2 - IL_0031: sub - IL_0032: ldarg.1 - IL_0033: not - IL_0034: ldc.i4.1 - IL_0035: add - IL_0036: div.un - IL_0037: conv.i2 - IL_0038: ldc.i4.1 - IL_0039: add - IL_003a: nop - IL_003b: br.s IL_003d - - IL_003d: stloc.0 - IL_003e: ldc.i4.0 - IL_003f: stloc.1 - IL_0040: ldarg.2 - IL_0041: stloc.2 - IL_0042: br.s IL_0052 - - IL_0044: ldloc.2 - IL_0045: call void assembly::set_c(int8) - IL_004a: ldloc.2 - IL_004b: ldarg.1 - IL_004c: add - IL_004d: stloc.2 - IL_004e: ldloc.1 - IL_004f: ldc.i4.1 - IL_0050: add - IL_0051: stloc.1 - IL_0052: ldloc.1 - IL_0053: ldloc.0 - IL_0054: blt.un.s IL_0044 - - IL_0056: ret - } - - .method public static void f11(int8 start, - int8 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 5 - .locals init (int8 V_0, - int8 V_1, - int8 V_2) - IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: ldarg.1 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeSByte(int8, - int8, - int8) - IL_0008: pop - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4.0 - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: stloc.2 - IL_000f: br.s IL_001f - - IL_0011: ldloc.2 - IL_0012: call void assembly::set_c(int8) - IL_0017: ldloc.2 - IL_0018: ldc.i4.0 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.0 - IL_0021: blt.un.s IL_0011 - - IL_0023: ret - } - - .method public static void f12() cil managed - { - - .maxstack 5 - .locals init (int8 V_0, - int8 V_1, - int8 V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.0 - IL_0002: ldc.i4.s 10 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeSByte(int8, - int8, - int8) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: ldc.i4.0 - IL_000d: stloc.1 - IL_000e: ldc.i4.1 - IL_000f: stloc.2 - IL_0010: br.s IL_0020 - - IL_0012: ldloc.2 - IL_0013: call void assembly::set_c(int8) - IL_0018: ldloc.2 - IL_0019: ldc.i4.0 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldloc.0 - IL_0022: blt.un.s IL_0012 - - IL_0024: ret - } - - .method public static void f13() cil managed - { - - .maxstack 4 - .locals init (uint16 V_0, - int8 V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.s 10 - IL_0004: stloc.1 - IL_0005: br.s IL_0015 - - IL_0007: ldloc.1 - IL_0008: call void assembly::set_c(int8) - IL_000d: ldloc.1 - IL_000e: ldc.i4.m1 - IL_000f: add - IL_0010: stloc.1 - IL_0011: ldloc.0 - IL_0012: ldc.i4.1 - IL_0013: add - IL_0014: stloc.0 - IL_0015: ldloc.0 - IL_0016: ldc.i4.s 10 - IL_0018: blt.un.s IL_0007 - - IL_001a: ret - } - - .method public static void f14() cil managed + .method public specialname static int8 get_c() cil managed { - .maxstack 4 - .locals init (uint16 V_0, - int8 V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.s 10 - IL_0004: stloc.1 - IL_0005: br.s IL_0016 - - IL_0007: ldloc.1 - IL_0008: call void assembly::set_c(int8) - IL_000d: ldloc.1 - IL_000e: ldc.i4.s -2 - IL_0010: add - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldc.i4.1 - IL_0014: add - IL_0015: stloc.0 - IL_0016: ldloc.0 - IL_0017: ldc.i4.5 - IL_0018: blt.un.s IL_0007 - - IL_001a: ret + .maxstack 8 + IL_0000: ldsfld int8 assembly::c@1 + IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static void set_c(int8 '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 int8 assembly::c@1 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -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..6e94cff36d4 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 @@ -33,21 +33,15 @@ 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 public specialname static uint16 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld uint16 ''.$assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(uint16 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld uint16 ''.$assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -137,6 +131,152 @@ IL_0019: ret } + .method public static void f10(uint16 start, + uint16 step, + uint16 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint32 V_0, + uint32 V_1, + uint16 V_2) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt16(uint16, + uint16, + uint16) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldarg.2 + IL_0011: ldarg.2 + IL_0012: bge.un.s IL_0018 + + IL_0014: ldc.i4.0 + IL_0015: nop + IL_0016: br.s IL_0021 + + IL_0018: ldarg.2 + IL_0019: ldarg.2 + IL_001a: sub + IL_001b: ldarg.1 + IL_001c: div.un + IL_001d: conv.u4 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: nop + IL_0021: stloc.0 + IL_0022: ldc.i4.0 + IL_0023: stloc.1 + IL_0024: ldarg.2 + IL_0025: stloc.2 + IL_0026: br.s IL_0036 + + IL_0028: ldloc.2 + IL_0029: call void assembly::set_c(uint16) + IL_002e: ldloc.2 + IL_002f: ldarg.1 + IL_0030: add + IL_0031: stloc.2 + IL_0032: ldloc.1 + IL_0033: ldc.i4.1 + IL_0034: add + IL_0035: stloc.1 + IL_0036: ldloc.1 + IL_0037: ldloc.0 + IL_0038: blt.un.s IL_0028 + + IL_003a: ret + } + + .method public static void f11(uint16 start, + uint16 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (uint16 V_0, + uint16 V_1, + uint16 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldarg.1 + IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt16(uint16, + uint16, + uint16) + IL_0008: pop + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4.0 + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: stloc.2 + IL_000f: br.s IL_001f + + IL_0011: ldloc.2 + IL_0012: call void assembly::set_c(uint16) + IL_0017: ldloc.2 + IL_0018: ldc.i4.0 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldloc.0 + IL_0021: blt.un.s IL_0011 + + IL_0023: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (uint16 V_0, + uint16 V_1, + uint16 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.s 10 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt16(uint16, + uint16, + uint16) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: stloc.0 + IL_000c: ldc.i4.0 + IL_000d: stloc.1 + IL_000e: ldc.i4.1 + IL_000f: stloc.2 + IL_0010: br.s IL_0020 + + IL_0012: ldloc.2 + IL_0013: call void assembly::set_c(uint16) + IL_0018: ldloc.2 + IL_0019: ldc.i4.0 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldloc.0 + IL_0022: blt.un.s IL_0012 + + IL_0024: ret + } + .method public static void f2(uint16 start) cil managed { @@ -482,150 +622,21 @@ IL_002a: ret } - .method public static void f10(uint16 start, - uint16 step, - uint16 finish) cil managed + .method public specialname static uint16 get_c() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - .maxstack 5 - .locals init (uint32 V_0, - uint32 V_1, - uint16 V_2) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt16(uint16, - uint16, - uint16) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldarg.2 - IL_0011: ldarg.2 - IL_0012: bge.un.s IL_0018 - - IL_0014: ldc.i4.0 - IL_0015: nop - IL_0016: br.s IL_0021 - - IL_0018: ldarg.2 - IL_0019: ldarg.2 - IL_001a: sub - IL_001b: ldarg.1 - IL_001c: div.un - IL_001d: conv.u4 - IL_001e: ldc.i4.1 - IL_001f: add - IL_0020: nop - IL_0021: stloc.0 - IL_0022: ldc.i4.0 - IL_0023: stloc.1 - IL_0024: ldarg.2 - IL_0025: stloc.2 - IL_0026: br.s IL_0036 - - IL_0028: ldloc.2 - IL_0029: call void assembly::set_c(uint16) - IL_002e: ldloc.2 - IL_002f: ldarg.1 - IL_0030: add - IL_0031: stloc.2 - IL_0032: ldloc.1 - IL_0033: ldc.i4.1 - IL_0034: add - IL_0035: stloc.1 - IL_0036: ldloc.1 - IL_0037: ldloc.0 - IL_0038: blt.un.s IL_0028 - - IL_003a: ret + .maxstack 8 + IL_0000: ldsfld uint16 ''.$assembly::c@1 + IL_0005: ret } - .method public static void f11(uint16 start, - uint16 finish) cil managed + .method public specialname static void set_c(uint16 'value') cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 - .locals init (uint16 V_0, - uint16 V_1, - uint16 V_2) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: ldarg.1 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt16(uint16, - uint16, - uint16) - IL_0008: pop - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4.0 - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: stloc.2 - IL_000f: br.s IL_001f - - IL_0011: ldloc.2 - IL_0012: call void assembly::set_c(uint16) - IL_0017: ldloc.2 - IL_0018: ldc.i4.0 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.0 - IL_0021: blt.un.s IL_0011 - - IL_0023: ret - } - - .method public static void f12() cil managed - { - - .maxstack 5 - .locals init (uint16 V_0, - uint16 V_1, - uint16 V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.0 - IL_0002: ldc.i4.s 10 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt16(uint16, - uint16, - uint16) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: ldc.i4.0 - IL_000d: stloc.1 - IL_000e: ldc.i4.1 - IL_000f: stloc.2 - IL_0010: br.s IL_0020 - - IL_0012: ldloc.2 - IL_0013: call void assembly::set_c(uint16) - IL_0018: ldloc.2 - IL_0019: ldc.i4.0 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldloc.0 - IL_0022: blt.un.s IL_0012 - - IL_0024: ret + IL_0001: stsfld uint16 ''.$assembly::c@1 + IL_0006: ret } .property uint16 c() @@ -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..6402cf3df2a 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 @@ -35,21 +35,15 @@ .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 uint16 c@1 .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 uint16 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld uint16 assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(uint16 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld uint16 assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -139,6 +133,152 @@ IL_0019: ret } + .method public static void f10(uint16 start, + uint16 step, + uint16 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint32 V_0, + uint32 V_1, + uint16 V_2) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt16(uint16, + uint16, + uint16) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldarg.2 + IL_0011: ldarg.2 + IL_0012: bge.un.s IL_0018 + + IL_0014: ldc.i4.0 + IL_0015: nop + IL_0016: br.s IL_0021 + + IL_0018: ldarg.2 + IL_0019: ldarg.2 + IL_001a: sub + IL_001b: ldarg.1 + IL_001c: div.un + IL_001d: conv.u4 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: nop + IL_0021: stloc.0 + IL_0022: ldc.i4.0 + IL_0023: stloc.1 + IL_0024: ldarg.2 + IL_0025: stloc.2 + IL_0026: br.s IL_0036 + + IL_0028: ldloc.2 + IL_0029: call void assembly::set_c(uint16) + IL_002e: ldloc.2 + IL_002f: ldarg.1 + IL_0030: add + IL_0031: stloc.2 + IL_0032: ldloc.1 + IL_0033: ldc.i4.1 + IL_0034: add + IL_0035: stloc.1 + IL_0036: ldloc.1 + IL_0037: ldloc.0 + IL_0038: blt.un.s IL_0028 + + IL_003a: ret + } + + .method public static void f11(uint16 start, + uint16 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (uint16 V_0, + uint16 V_1, + uint16 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldarg.1 + IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt16(uint16, + uint16, + uint16) + IL_0008: pop + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4.0 + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: stloc.2 + IL_000f: br.s IL_001f + + IL_0011: ldloc.2 + IL_0012: call void assembly::set_c(uint16) + IL_0017: ldloc.2 + IL_0018: ldc.i4.0 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldloc.0 + IL_0021: blt.un.s IL_0011 + + IL_0023: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (uint16 V_0, + uint16 V_1, + uint16 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.s 10 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt16(uint16, + uint16, + uint16) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: stloc.0 + IL_000c: ldc.i4.0 + IL_000d: stloc.1 + IL_000e: ldc.i4.1 + IL_000f: stloc.2 + IL_0010: br.s IL_0020 + + IL_0012: ldloc.2 + IL_0013: call void assembly::set_c(uint16) + IL_0018: ldloc.2 + IL_0019: ldc.i4.0 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldloc.0 + IL_0022: blt.un.s IL_0012 + + IL_0024: ret + } + .method public static void f2(uint16 start) cil managed { @@ -484,161 +624,21 @@ IL_002a: ret } - .method public static void f10(uint16 start, - uint16 step, - uint16 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (uint32 V_0, - uint32 V_1, - uint16 V_2) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt16(uint16, - uint16, - uint16) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldarg.2 - IL_0011: ldarg.2 - IL_0012: bge.un.s IL_0018 - - IL_0014: ldc.i4.0 - IL_0015: nop - IL_0016: br.s IL_0021 - - IL_0018: ldarg.2 - IL_0019: ldarg.2 - IL_001a: sub - IL_001b: ldarg.1 - IL_001c: div.un - IL_001d: conv.u4 - IL_001e: ldc.i4.1 - IL_001f: add - IL_0020: nop - IL_0021: stloc.0 - IL_0022: ldc.i4.0 - IL_0023: stloc.1 - IL_0024: ldarg.2 - IL_0025: stloc.2 - IL_0026: br.s IL_0036 - - IL_0028: ldloc.2 - IL_0029: call void assembly::set_c(uint16) - IL_002e: ldloc.2 - IL_002f: ldarg.1 - IL_0030: add - IL_0031: stloc.2 - IL_0032: ldloc.1 - IL_0033: ldc.i4.1 - IL_0034: add - IL_0035: stloc.1 - IL_0036: ldloc.1 - IL_0037: ldloc.0 - IL_0038: blt.un.s IL_0028 - - IL_003a: ret - } - - .method public static void f11(uint16 start, - uint16 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 5 - .locals init (uint16 V_0, - uint16 V_1, - uint16 V_2) - IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: ldarg.1 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt16(uint16, - uint16, - uint16) - IL_0008: pop - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4.0 - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: stloc.2 - IL_000f: br.s IL_001f - - IL_0011: ldloc.2 - IL_0012: call void assembly::set_c(uint16) - IL_0017: ldloc.2 - IL_0018: ldc.i4.0 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.0 - IL_0021: blt.un.s IL_0011 - - IL_0023: ret - } - - .method public static void f12() cil managed + .method public specialname static uint16 get_c() cil managed { - .maxstack 5 - .locals init (uint16 V_0, - uint16 V_1, - uint16 V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.0 - IL_0002: ldc.i4.s 10 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt16(uint16, - uint16, - uint16) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: ldc.i4.0 - IL_000d: stloc.1 - IL_000e: ldc.i4.1 - IL_000f: stloc.2 - IL_0010: br.s IL_0020 - - IL_0012: ldloc.2 - IL_0013: call void assembly::set_c(uint16) - IL_0018: ldloc.2 - IL_0019: ldc.i4.0 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldloc.0 - IL_0022: blt.un.s IL_0012 - - IL_0024: ret + .maxstack 8 + IL_0000: ldsfld uint16 assembly::c@1 + IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static void set_c(uint16 '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 uint16 assembly::c@1 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -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..9e449b1c745 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 @@ -33,21 +33,15 @@ 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 public specialname static uint32 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld uint32 ''.$assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(uint32 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld uint32 ''.$assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -140,6 +134,156 @@ IL_001c: ret } + .method public static void f10(uint32 start, + uint32 step, + uint32 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + uint32 V_2) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt32(uint32, + uint32, + uint32) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldarg.2 + IL_0011: ldarg.2 + IL_0012: bge.un.s IL_0019 + + IL_0014: ldc.i4.0 + IL_0015: conv.i8 + IL_0016: nop + IL_0017: br.s IL_0023 + + IL_0019: ldarg.2 + IL_001a: ldarg.2 + IL_001b: sub + IL_001c: ldarg.1 + IL_001d: div.un + IL_001e: conv.u8 + IL_001f: ldc.i4.1 + IL_0020: conv.i8 + IL_0021: add + IL_0022: nop + IL_0023: stloc.0 + IL_0024: ldc.i4.0 + IL_0025: conv.i8 + IL_0026: stloc.1 + IL_0027: ldarg.2 + IL_0028: stloc.2 + IL_0029: br.s IL_003a + + IL_002b: ldloc.2 + IL_002c: call void assembly::set_c(uint32) + IL_0031: ldloc.2 + IL_0032: ldarg.1 + IL_0033: add + IL_0034: stloc.2 + IL_0035: ldloc.1 + IL_0036: ldc.i4.1 + IL_0037: conv.i8 + IL_0038: add + IL_0039: stloc.1 + IL_003a: ldloc.1 + IL_003b: ldloc.0 + IL_003c: blt.un.s IL_002b + + IL_003e: ret + } + + .method public static void f11(uint32 start, + uint32 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (uint32 V_0, + uint32 V_1, + uint32 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldarg.1 + IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt32(uint32, + uint32, + uint32) + IL_0008: pop + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4.0 + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: stloc.2 + IL_000f: br.s IL_001f + + IL_0011: ldloc.2 + IL_0012: call void assembly::set_c(uint32) + IL_0017: ldloc.2 + IL_0018: ldc.i4.0 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldloc.0 + IL_0021: blt.un.s IL_0011 + + IL_0023: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (uint32 V_0, + uint32 V_1, + uint32 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.s 10 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt32(uint32, + uint32, + uint32) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: stloc.0 + IL_000c: ldc.i4.0 + IL_000d: stloc.1 + IL_000e: ldc.i4.1 + IL_000f: stloc.2 + IL_0010: br.s IL_0020 + + IL_0012: ldloc.2 + IL_0013: call void assembly::set_c(uint32) + IL_0018: ldloc.2 + IL_0019: ldc.i4.0 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldloc.0 + IL_0022: blt.un.s IL_0012 + + IL_0024: ret + } + .method public static void f2(uint32 start) cil managed { @@ -514,154 +658,21 @@ IL_002e: ret } - .method public static void f10(uint32 start, - uint32 step, - uint32 finish) cil managed + .method public specialname static uint32 get_c() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - uint32 V_2) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt32(uint32, - uint32, - uint32) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldarg.2 - IL_0011: ldarg.2 - IL_0012: bge.un.s IL_0019 - - IL_0014: ldc.i4.0 - IL_0015: conv.i8 - IL_0016: nop - IL_0017: br.s IL_0023 - - IL_0019: ldarg.2 - IL_001a: ldarg.2 - IL_001b: sub - IL_001c: ldarg.1 - IL_001d: div.un - IL_001e: conv.u8 - IL_001f: ldc.i4.1 - IL_0020: conv.i8 - IL_0021: add - IL_0022: nop - IL_0023: stloc.0 - IL_0024: ldc.i4.0 - IL_0025: conv.i8 - IL_0026: stloc.1 - IL_0027: ldarg.2 - IL_0028: stloc.2 - IL_0029: br.s IL_003a - - IL_002b: ldloc.2 - IL_002c: call void assembly::set_c(uint32) - IL_0031: ldloc.2 - IL_0032: ldarg.1 - IL_0033: add - IL_0034: stloc.2 - IL_0035: ldloc.1 - IL_0036: ldc.i4.1 - IL_0037: conv.i8 - IL_0038: add - IL_0039: stloc.1 - IL_003a: ldloc.1 - IL_003b: ldloc.0 - IL_003c: blt.un.s IL_002b - - IL_003e: ret + .maxstack 8 + IL_0000: ldsfld uint32 ''.$assembly::c@1 + IL_0005: ret } - .method public static void f11(uint32 start, - uint32 finish) cil managed + .method public specialname static void set_c(uint32 'value') cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 - .locals init (uint32 V_0, - uint32 V_1, - uint32 V_2) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: ldarg.1 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt32(uint32, - uint32, - uint32) - IL_0008: pop - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4.0 - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: stloc.2 - IL_000f: br.s IL_001f - - IL_0011: ldloc.2 - IL_0012: call void assembly::set_c(uint32) - IL_0017: ldloc.2 - IL_0018: ldc.i4.0 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.0 - IL_0021: blt.un.s IL_0011 - - IL_0023: ret - } - - .method public static void f12() cil managed - { - - .maxstack 5 - .locals init (uint32 V_0, - uint32 V_1, - uint32 V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.0 - IL_0002: ldc.i4.s 10 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt32(uint32, - uint32, - uint32) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: ldc.i4.0 - IL_000d: stloc.1 - IL_000e: ldc.i4.1 - IL_000f: stloc.2 - IL_0010: br.s IL_0020 - - IL_0012: ldloc.2 - IL_0013: call void assembly::set_c(uint32) - IL_0018: ldloc.2 - IL_0019: ldc.i4.0 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldloc.0 - IL_0022: blt.un.s IL_0012 - - IL_0024: ret + IL_0001: stsfld uint32 ''.$assembly::c@1 + IL_0006: ret } .property uint32 c() @@ -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..4187a56cf96 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 @@ -35,21 +35,15 @@ .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 uint32 c@1 .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 uint32 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld uint32 assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(uint32 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld uint32 assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -142,6 +136,156 @@ IL_001c: ret } + .method public static void f10(uint32 start, + uint32 step, + uint32 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + uint32 V_2) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt32(uint32, + uint32, + uint32) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldarg.2 + IL_0011: ldarg.2 + IL_0012: bge.un.s IL_0019 + + IL_0014: ldc.i4.0 + IL_0015: conv.i8 + IL_0016: nop + IL_0017: br.s IL_0023 + + IL_0019: ldarg.2 + IL_001a: ldarg.2 + IL_001b: sub + IL_001c: ldarg.1 + IL_001d: div.un + IL_001e: conv.u8 + IL_001f: ldc.i4.1 + IL_0020: conv.i8 + IL_0021: add + IL_0022: nop + IL_0023: stloc.0 + IL_0024: ldc.i4.0 + IL_0025: conv.i8 + IL_0026: stloc.1 + IL_0027: ldarg.2 + IL_0028: stloc.2 + IL_0029: br.s IL_003a + + IL_002b: ldloc.2 + IL_002c: call void assembly::set_c(uint32) + IL_0031: ldloc.2 + IL_0032: ldarg.1 + IL_0033: add + IL_0034: stloc.2 + IL_0035: ldloc.1 + IL_0036: ldc.i4.1 + IL_0037: conv.i8 + IL_0038: add + IL_0039: stloc.1 + IL_003a: ldloc.1 + IL_003b: ldloc.0 + IL_003c: blt.un.s IL_002b + + IL_003e: ret + } + + .method public static void f11(uint32 start, + uint32 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (uint32 V_0, + uint32 V_1, + uint32 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: ldarg.1 + IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt32(uint32, + uint32, + uint32) + IL_0008: pop + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4.0 + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: stloc.2 + IL_000f: br.s IL_001f + + IL_0011: ldloc.2 + IL_0012: call void assembly::set_c(uint32) + IL_0017: ldloc.2 + IL_0018: ldc.i4.0 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldloc.0 + IL_0021: blt.un.s IL_0011 + + IL_0023: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (uint32 V_0, + uint32 V_1, + uint32 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.s 10 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt32(uint32, + uint32, + uint32) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: stloc.0 + IL_000c: ldc.i4.0 + IL_000d: stloc.1 + IL_000e: ldc.i4.1 + IL_000f: stloc.2 + IL_0010: br.s IL_0020 + + IL_0012: ldloc.2 + IL_0013: call void assembly::set_c(uint32) + IL_0018: ldloc.2 + IL_0019: ldc.i4.0 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldloc.0 + IL_0022: blt.un.s IL_0012 + + IL_0024: ret + } + .method public static void f2(uint32 start) cil managed { @@ -516,165 +660,21 @@ IL_002e: ret } - .method public static void f10(uint32 start, - uint32 step, - uint32 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - uint32 V_2) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt32(uint32, - uint32, - uint32) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldarg.2 - IL_0011: ldarg.2 - IL_0012: bge.un.s IL_0019 - - IL_0014: ldc.i4.0 - IL_0015: conv.i8 - IL_0016: nop - IL_0017: br.s IL_0023 - - IL_0019: ldarg.2 - IL_001a: ldarg.2 - IL_001b: sub - IL_001c: ldarg.1 - IL_001d: div.un - IL_001e: conv.u8 - IL_001f: ldc.i4.1 - IL_0020: conv.i8 - IL_0021: add - IL_0022: nop - IL_0023: stloc.0 - IL_0024: ldc.i4.0 - IL_0025: conv.i8 - IL_0026: stloc.1 - IL_0027: ldarg.2 - IL_0028: stloc.2 - IL_0029: br.s IL_003a - - IL_002b: ldloc.2 - IL_002c: call void assembly::set_c(uint32) - IL_0031: ldloc.2 - IL_0032: ldarg.1 - IL_0033: add - IL_0034: stloc.2 - IL_0035: ldloc.1 - IL_0036: ldc.i4.1 - IL_0037: conv.i8 - IL_0038: add - IL_0039: stloc.1 - IL_003a: ldloc.1 - IL_003b: ldloc.0 - IL_003c: blt.un.s IL_002b - - IL_003e: ret - } - - .method public static void f11(uint32 start, - uint32 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 5 - .locals init (uint32 V_0, - uint32 V_1, - uint32 V_2) - IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: ldarg.1 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt32(uint32, - uint32, - uint32) - IL_0008: pop - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4.0 - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: stloc.2 - IL_000f: br.s IL_001f - - IL_0011: ldloc.2 - IL_0012: call void assembly::set_c(uint32) - IL_0017: ldloc.2 - IL_0018: ldc.i4.0 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: add - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.0 - IL_0021: blt.un.s IL_0011 - - IL_0023: ret - } - - .method public static void f12() cil managed + .method public specialname static uint32 get_c() cil managed { - .maxstack 5 - .locals init (uint32 V_0, - uint32 V_1, - uint32 V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.0 - IL_0002: ldc.i4.s 10 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt32(uint32, - uint32, - uint32) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: ldc.i4.0 - IL_000d: stloc.1 - IL_000e: ldc.i4.1 - IL_000f: stloc.2 - IL_0010: br.s IL_0020 - - IL_0012: ldloc.2 - IL_0013: call void assembly::set_c(uint32) - IL_0018: ldloc.2 - IL_0019: ldc.i4.0 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldloc.0 - IL_0022: blt.un.s IL_0012 - - IL_0024: ret + .maxstack 8 + IL_0000: ldsfld uint32 assembly::c@1 + IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static void set_c(uint32 '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 uint32 assembly::c@1 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -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..73b774e1ee5 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 @@ -33,21 +33,15 @@ 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 public specialname static uint64 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld uint64 ''.$assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(uint64 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld uint64 ''.$assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -152,6 +146,221 @@ IL_001e: ret } + .method public static void f10(uint64 start, + uint64 step, + uint64 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint64 V_0, + bool V_1, + uint64 V_2, + uint64 V_3, + uint64 V_4) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldarg.2 + IL_0011: ldarg.2 + IL_0012: bge.un.s IL_0019 + + IL_0014: ldc.i4.0 + IL_0015: conv.i8 + IL_0016: nop + IL_0017: br.s IL_001f + + IL_0019: ldarg.2 + IL_001a: ldarg.2 + IL_001b: sub + IL_001c: ldarg.1 + IL_001d: div.un + IL_001e: nop + IL_001f: stloc.0 + IL_0020: ldloc.0 + IL_0021: ldc.i4.m1 + IL_0022: conv.i8 + IL_0023: bne.un.s IL_0047 + + IL_0025: ldc.i4.1 + IL_0026: stloc.1 + IL_0027: ldc.i4.0 + IL_0028: conv.i8 + IL_0029: stloc.2 + IL_002a: ldarg.2 + IL_002b: stloc.3 + IL_002c: br.s IL_0043 + + IL_002e: ldloc.3 + IL_002f: call void assembly::set_c(uint64) + IL_0034: ldloc.3 + IL_0035: ldarg.1 + IL_0036: add + IL_0037: stloc.3 + IL_0038: ldloc.2 + IL_0039: ldc.i4.1 + IL_003a: conv.i8 + IL_003b: add + IL_003c: stloc.2 + IL_003d: ldloc.2 + IL_003e: ldc.i4.0 + IL_003f: conv.i8 + IL_0040: cgt.un + IL_0042: stloc.1 + IL_0043: ldloc.1 + IL_0044: brtrue.s IL_002e + + IL_0046: ret + + IL_0047: ldarg.2 + IL_0048: ldarg.2 + IL_0049: bge.un.s IL_0050 + + IL_004b: ldc.i4.0 + IL_004c: conv.i8 + IL_004d: nop + IL_004e: br.s IL_0059 + + IL_0050: ldarg.2 + IL_0051: ldarg.2 + IL_0052: sub + IL_0053: ldarg.1 + IL_0054: div.un + IL_0055: ldc.i4.1 + IL_0056: conv.i8 + IL_0057: add.ovf.un + IL_0058: nop + IL_0059: stloc.2 + IL_005a: ldc.i4.0 + IL_005b: conv.i8 + IL_005c: stloc.3 + IL_005d: ldarg.2 + IL_005e: stloc.s V_4 + IL_0060: br.s IL_0074 + + IL_0062: ldloc.s V_4 + IL_0064: call void assembly::set_c(uint64) + IL_0069: ldloc.s V_4 + IL_006b: ldarg.1 + IL_006c: add + IL_006d: stloc.s V_4 + IL_006f: ldloc.3 + IL_0070: ldc.i4.1 + IL_0071: conv.i8 + IL_0072: add + IL_0073: stloc.3 + IL_0074: ldloc.3 + IL_0075: ldloc.2 + IL_0076: blt.un.s IL_0062 + + IL_0078: ret + } + + .method public static void f11(uint64 start, + uint64 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + uint64 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: conv.i8 + IL_0003: ldarg.1 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: conv.i8 + IL_000c: stloc.0 + IL_000d: ldc.i4.0 + IL_000e: conv.i8 + IL_000f: stloc.1 + IL_0010: ldarg.0 + IL_0011: stloc.2 + IL_0012: br.s IL_0024 + + IL_0014: ldloc.2 + IL_0015: call void assembly::set_c(uint64) + IL_001a: ldloc.2 + IL_001b: ldc.i4.0 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.2 + IL_001f: ldloc.1 + IL_0020: ldc.i4.1 + IL_0021: conv.i8 + IL_0022: add + IL_0023: stloc.1 + IL_0024: ldloc.1 + IL_0025: ldloc.0 + IL_0026: blt.un.s IL_0014 + + IL_0028: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + uint64 V_2) + IL_0000: ldc.i4.1 + IL_0001: conv.i8 + IL_0002: ldc.i4.0 + IL_0003: conv.i8 + IL_0004: ldc.i4.s 10 + IL_0006: conv.i8 + IL_0007: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_000c: pop + IL_000d: ldc.i4.0 + IL_000e: conv.i8 + IL_000f: stloc.0 + IL_0010: ldc.i4.0 + IL_0011: conv.i8 + IL_0012: stloc.1 + IL_0013: ldc.i4.1 + IL_0014: conv.i8 + IL_0015: stloc.2 + IL_0016: br.s IL_0028 + + IL_0018: ldloc.2 + IL_0019: call void assembly::set_c(uint64) + IL_001e: ldloc.2 + IL_001f: ldc.i4.0 + IL_0020: conv.i8 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.1 + IL_0024: ldc.i4.1 + IL_0025: conv.i8 + IL_0026: add + IL_0027: stloc.1 + IL_0028: ldloc.1 + IL_0029: ldloc.0 + IL_002a: blt.un.s IL_0018 + + IL_002c: ret + } + .method public static void f2(uint64 start) cil managed { @@ -597,219 +806,21 @@ IL_0032: ret } - .method public static void f10(uint64 start, - uint64 step, - uint64 finish) cil managed + .method public specialname static uint64 get_c() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - .maxstack 5 - .locals init (uint64 V_0, - bool V_1, - uint64 V_2, - uint64 V_3, - uint64 V_4) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldarg.2 - IL_0011: ldarg.2 - IL_0012: bge.un.s IL_0019 - - IL_0014: ldc.i4.0 - IL_0015: conv.i8 - IL_0016: nop - IL_0017: br.s IL_001f - - IL_0019: ldarg.2 - IL_001a: ldarg.2 - IL_001b: sub - IL_001c: ldarg.1 - IL_001d: div.un - IL_001e: nop - IL_001f: stloc.0 - IL_0020: ldloc.0 - IL_0021: ldc.i4.m1 - IL_0022: conv.i8 - IL_0023: bne.un.s IL_0047 - - IL_0025: ldc.i4.1 - IL_0026: stloc.1 - IL_0027: ldc.i4.0 - IL_0028: conv.i8 - IL_0029: stloc.2 - IL_002a: ldarg.2 - IL_002b: stloc.3 - IL_002c: br.s IL_0043 - - IL_002e: ldloc.3 - IL_002f: call void assembly::set_c(uint64) - IL_0034: ldloc.3 - IL_0035: ldarg.1 - IL_0036: add - IL_0037: stloc.3 - IL_0038: ldloc.2 - IL_0039: ldc.i4.1 - IL_003a: conv.i8 - IL_003b: add - IL_003c: stloc.2 - IL_003d: ldloc.2 - IL_003e: ldc.i4.0 - IL_003f: conv.i8 - IL_0040: cgt.un - IL_0042: stloc.1 - IL_0043: ldloc.1 - IL_0044: brtrue.s IL_002e - - IL_0046: ret - - IL_0047: ldarg.2 - IL_0048: ldarg.2 - IL_0049: bge.un.s IL_0050 - - IL_004b: ldc.i4.0 - IL_004c: conv.i8 - IL_004d: nop - IL_004e: br.s IL_0059 - - IL_0050: ldarg.2 - IL_0051: ldarg.2 - IL_0052: sub - IL_0053: ldarg.1 - IL_0054: div.un - IL_0055: ldc.i4.1 - IL_0056: conv.i8 - IL_0057: add.ovf.un - IL_0058: nop - IL_0059: stloc.2 - IL_005a: ldc.i4.0 - IL_005b: conv.i8 - IL_005c: stloc.3 - IL_005d: ldarg.2 - IL_005e: stloc.s V_4 - IL_0060: br.s IL_0074 - - IL_0062: ldloc.s V_4 - IL_0064: call void assembly::set_c(uint64) - IL_0069: ldloc.s V_4 - IL_006b: ldarg.1 - IL_006c: add - IL_006d: stloc.s V_4 - IL_006f: ldloc.3 - IL_0070: ldc.i4.1 - IL_0071: conv.i8 - IL_0072: add - IL_0073: stloc.3 - IL_0074: ldloc.3 - IL_0075: ldloc.2 - IL_0076: blt.un.s IL_0062 - - IL_0078: ret + .maxstack 8 + IL_0000: ldsfld uint64 ''.$assembly::c@1 + IL_0005: ret } - .method public static void f11(uint64 start, - uint64 finish) cil managed + .method public specialname static void set_c(uint64 'value') cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - uint64 V_2) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: conv.i8 - IL_0003: ldarg.1 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: conv.i8 - IL_000c: stloc.0 - IL_000d: ldc.i4.0 - IL_000e: conv.i8 - IL_000f: stloc.1 - IL_0010: ldarg.0 - IL_0011: stloc.2 - IL_0012: br.s IL_0024 - - IL_0014: ldloc.2 - IL_0015: call void assembly::set_c(uint64) - IL_001a: ldloc.2 - IL_001b: ldc.i4.0 - IL_001c: conv.i8 - IL_001d: add - IL_001e: stloc.2 - IL_001f: ldloc.1 - IL_0020: ldc.i4.1 - IL_0021: conv.i8 - IL_0022: add - IL_0023: stloc.1 - IL_0024: ldloc.1 - IL_0025: ldloc.0 - IL_0026: blt.un.s IL_0014 - - IL_0028: ret - } - - .method public static void f12() cil managed - { - - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - uint64 V_2) - IL_0000: ldc.i4.1 - IL_0001: conv.i8 - IL_0002: ldc.i4.0 - IL_0003: conv.i8 - IL_0004: ldc.i4.s 10 - IL_0006: conv.i8 - IL_0007: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_000c: pop - IL_000d: ldc.i4.0 - IL_000e: conv.i8 - IL_000f: stloc.0 - IL_0010: ldc.i4.0 - IL_0011: conv.i8 - IL_0012: stloc.1 - IL_0013: ldc.i4.1 - IL_0014: conv.i8 - IL_0015: stloc.2 - IL_0016: br.s IL_0028 - - IL_0018: ldloc.2 - IL_0019: call void assembly::set_c(uint64) - IL_001e: ldloc.2 - IL_001f: ldc.i4.0 - IL_0020: conv.i8 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.1 - IL_0024: ldc.i4.1 - IL_0025: conv.i8 - IL_0026: add - IL_0027: stloc.1 - IL_0028: ldloc.1 - IL_0029: ldloc.0 - IL_002a: blt.un.s IL_0018 - - IL_002c: ret + IL_0001: stsfld uint64 ''.$assembly::c@1 + IL_0006: ret } .property uint64 c() @@ -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..12a5334c60f 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 @@ -35,21 +35,15 @@ .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 uint64 c@1 .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 uint64 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld uint64 assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(uint64 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld uint64 assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -154,6 +148,221 @@ IL_001e: ret } + .method public static void f10(uint64 start, + uint64 step, + uint64 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (uint64 V_0, + bool V_1, + uint64 V_2, + uint64 V_3, + uint64 V_4) + IL_0000: ldarg.1 + IL_0001: brtrue.s IL_000f + + IL_0003: ldarg.2 + IL_0004: ldarg.1 + IL_0005: ldarg.2 + IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_000b: pop + IL_000c: nop + IL_000d: br.s IL_0010 + + IL_000f: nop + IL_0010: ldarg.2 + IL_0011: ldarg.2 + IL_0012: bge.un.s IL_0019 + + IL_0014: ldc.i4.0 + IL_0015: conv.i8 + IL_0016: nop + IL_0017: br.s IL_001f + + IL_0019: ldarg.2 + IL_001a: ldarg.2 + IL_001b: sub + IL_001c: ldarg.1 + IL_001d: div.un + IL_001e: nop + IL_001f: stloc.0 + IL_0020: ldloc.0 + IL_0021: ldc.i4.m1 + IL_0022: conv.i8 + IL_0023: bne.un.s IL_0047 + + IL_0025: ldc.i4.1 + IL_0026: stloc.1 + IL_0027: ldc.i4.0 + IL_0028: conv.i8 + IL_0029: stloc.2 + IL_002a: ldarg.2 + IL_002b: stloc.3 + IL_002c: br.s IL_0043 + + IL_002e: ldloc.3 + IL_002f: call void assembly::set_c(uint64) + IL_0034: ldloc.3 + IL_0035: ldarg.1 + IL_0036: add + IL_0037: stloc.3 + IL_0038: ldloc.2 + IL_0039: ldc.i4.1 + IL_003a: conv.i8 + IL_003b: add + IL_003c: stloc.2 + IL_003d: ldloc.2 + IL_003e: ldc.i4.0 + IL_003f: conv.i8 + IL_0040: cgt.un + IL_0042: stloc.1 + IL_0043: ldloc.1 + IL_0044: brtrue.s IL_002e + + IL_0046: ret + + IL_0047: ldarg.2 + IL_0048: ldarg.2 + IL_0049: bge.un.s IL_0050 + + IL_004b: ldc.i4.0 + IL_004c: conv.i8 + IL_004d: nop + IL_004e: br.s IL_0059 + + IL_0050: ldarg.2 + IL_0051: ldarg.2 + IL_0052: sub + IL_0053: ldarg.1 + IL_0054: div.un + IL_0055: ldc.i4.1 + IL_0056: conv.i8 + IL_0057: add.ovf.un + IL_0058: nop + IL_0059: stloc.2 + IL_005a: ldc.i4.0 + IL_005b: conv.i8 + IL_005c: stloc.3 + IL_005d: ldarg.2 + IL_005e: stloc.s V_4 + IL_0060: br.s IL_0074 + + IL_0062: ldloc.s V_4 + IL_0064: call void assembly::set_c(uint64) + IL_0069: ldloc.s V_4 + IL_006b: ldarg.1 + IL_006c: add + IL_006d: stloc.s V_4 + IL_006f: ldloc.3 + IL_0070: ldc.i4.1 + IL_0071: conv.i8 + IL_0072: add + IL_0073: stloc.3 + IL_0074: ldloc.3 + IL_0075: ldloc.2 + IL_0076: blt.un.s IL_0062 + + IL_0078: ret + } + + .method public static void f11(uint64 start, + uint64 finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + uint64 V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i4.0 + IL_0002: conv.i8 + IL_0003: ldarg.1 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: conv.i8 + IL_000c: stloc.0 + IL_000d: ldc.i4.0 + IL_000e: conv.i8 + IL_000f: stloc.1 + IL_0010: ldarg.0 + IL_0011: stloc.2 + IL_0012: br.s IL_0024 + + IL_0014: ldloc.2 + IL_0015: call void assembly::set_c(uint64) + IL_001a: ldloc.2 + IL_001b: ldc.i4.0 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.2 + IL_001f: ldloc.1 + IL_0020: ldc.i4.1 + IL_0021: conv.i8 + IL_0022: add + IL_0023: stloc.1 + IL_0024: ldloc.1 + IL_0025: ldloc.0 + IL_0026: blt.un.s IL_0014 + + IL_0028: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (uint64 V_0, + uint64 V_1, + uint64 V_2) + IL_0000: ldc.i4.1 + IL_0001: conv.i8 + IL_0002: ldc.i4.0 + IL_0003: conv.i8 + IL_0004: ldc.i4.s 10 + IL_0006: conv.i8 + IL_0007: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, + uint64, + uint64) + IL_000c: pop + IL_000d: ldc.i4.0 + IL_000e: conv.i8 + IL_000f: stloc.0 + IL_0010: ldc.i4.0 + IL_0011: conv.i8 + IL_0012: stloc.1 + IL_0013: ldc.i4.1 + IL_0014: conv.i8 + IL_0015: stloc.2 + IL_0016: br.s IL_0028 + + IL_0018: ldloc.2 + IL_0019: call void assembly::set_c(uint64) + IL_001e: ldloc.2 + IL_001f: ldc.i4.0 + IL_0020: conv.i8 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.1 + IL_0024: ldc.i4.1 + IL_0025: conv.i8 + IL_0026: add + IL_0027: stloc.1 + IL_0028: ldloc.1 + IL_0029: ldloc.0 + IL_002a: blt.un.s IL_0018 + + IL_002c: ret + } + .method public static void f2(uint64 start) cil managed { @@ -599,230 +808,21 @@ IL_0032: ret } - .method public static void f10(uint64 start, - uint64 step, - uint64 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (uint64 V_0, - bool V_1, - uint64 V_2, - uint64 V_3, - uint64 V_4) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000f - - IL_0003: ldarg.2 - IL_0004: ldarg.1 - IL_0005: ldarg.2 - IL_0006: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_000b: pop - IL_000c: nop - IL_000d: br.s IL_0010 - - IL_000f: nop - IL_0010: ldarg.2 - IL_0011: ldarg.2 - IL_0012: bge.un.s IL_0019 - - IL_0014: ldc.i4.0 - IL_0015: conv.i8 - IL_0016: nop - IL_0017: br.s IL_001f - - IL_0019: ldarg.2 - IL_001a: ldarg.2 - IL_001b: sub - IL_001c: ldarg.1 - IL_001d: div.un - IL_001e: nop - IL_001f: stloc.0 - IL_0020: ldloc.0 - IL_0021: ldc.i4.m1 - IL_0022: conv.i8 - IL_0023: bne.un.s IL_0047 - - IL_0025: ldc.i4.1 - IL_0026: stloc.1 - IL_0027: ldc.i4.0 - IL_0028: conv.i8 - IL_0029: stloc.2 - IL_002a: ldarg.2 - IL_002b: stloc.3 - IL_002c: br.s IL_0043 - - IL_002e: ldloc.3 - IL_002f: call void assembly::set_c(uint64) - IL_0034: ldloc.3 - IL_0035: ldarg.1 - IL_0036: add - IL_0037: stloc.3 - IL_0038: ldloc.2 - IL_0039: ldc.i4.1 - IL_003a: conv.i8 - IL_003b: add - IL_003c: stloc.2 - IL_003d: ldloc.2 - IL_003e: ldc.i4.0 - IL_003f: conv.i8 - IL_0040: cgt.un - IL_0042: stloc.1 - IL_0043: ldloc.1 - IL_0044: brtrue.s IL_002e - - IL_0046: ret - - IL_0047: ldarg.2 - IL_0048: ldarg.2 - IL_0049: bge.un.s IL_0050 - - IL_004b: ldc.i4.0 - IL_004c: conv.i8 - IL_004d: nop - IL_004e: br.s IL_0059 - - IL_0050: ldarg.2 - IL_0051: ldarg.2 - IL_0052: sub - IL_0053: ldarg.1 - IL_0054: div.un - IL_0055: ldc.i4.1 - IL_0056: conv.i8 - IL_0057: add.ovf.un - IL_0058: nop - IL_0059: stloc.2 - IL_005a: ldc.i4.0 - IL_005b: conv.i8 - IL_005c: stloc.3 - IL_005d: ldarg.2 - IL_005e: stloc.s V_4 - IL_0060: br.s IL_0074 - - IL_0062: ldloc.s V_4 - IL_0064: call void assembly::set_c(uint64) - IL_0069: ldloc.s V_4 - IL_006b: ldarg.1 - IL_006c: add - IL_006d: stloc.s V_4 - IL_006f: ldloc.3 - IL_0070: ldc.i4.1 - IL_0071: conv.i8 - IL_0072: add - IL_0073: stloc.3 - IL_0074: ldloc.3 - IL_0075: ldloc.2 - IL_0076: blt.un.s IL_0062 - - IL_0078: ret - } - - .method public static void f11(uint64 start, - uint64 finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - uint64 V_2) - IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: conv.i8 - IL_0003: ldarg.1 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: conv.i8 - IL_000c: stloc.0 - IL_000d: ldc.i4.0 - IL_000e: conv.i8 - IL_000f: stloc.1 - IL_0010: ldarg.0 - IL_0011: stloc.2 - IL_0012: br.s IL_0024 - - IL_0014: ldloc.2 - IL_0015: call void assembly::set_c(uint64) - IL_001a: ldloc.2 - IL_001b: ldc.i4.0 - IL_001c: conv.i8 - IL_001d: add - IL_001e: stloc.2 - IL_001f: ldloc.1 - IL_0020: ldc.i4.1 - IL_0021: conv.i8 - IL_0022: add - IL_0023: stloc.1 - IL_0024: ldloc.1 - IL_0025: ldloc.0 - IL_0026: blt.un.s IL_0014 - - IL_0028: ret - } - - .method public static void f12() cil managed + .method public specialname static uint64 get_c() cil managed { - .maxstack 5 - .locals init (uint64 V_0, - uint64 V_1, - uint64 V_2) - IL_0000: ldc.i4.1 - IL_0001: conv.i8 - IL_0002: ldc.i4.0 - IL_0003: conv.i8 - IL_0004: ldc.i4.s 10 - IL_0006: conv.i8 - IL_0007: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUInt64(uint64, - uint64, - uint64) - IL_000c: pop - IL_000d: ldc.i4.0 - IL_000e: conv.i8 - IL_000f: stloc.0 - IL_0010: ldc.i4.0 - IL_0011: conv.i8 - IL_0012: stloc.1 - IL_0013: ldc.i4.1 - IL_0014: conv.i8 - IL_0015: stloc.2 - IL_0016: br.s IL_0028 - - IL_0018: ldloc.2 - IL_0019: call void assembly::set_c(uint64) - IL_001e: ldloc.2 - IL_001f: ldc.i4.0 - IL_0020: conv.i8 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.1 - IL_0024: ldc.i4.1 - IL_0025: conv.i8 - IL_0026: add - IL_0027: stloc.1 - IL_0028: ldloc.1 - IL_0029: ldloc.0 - IL_002a: blt.un.s IL_0018 - - IL_002c: ret + .maxstack 8 + IL_0000: ldsfld uint64 assembly::c@1 + IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static void set_c(uint64 '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 uint64 assembly::c@1 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -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..bfd4b00bd60 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 @@ -33,21 +33,15 @@ 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 public specialname static native uint get_c() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld native uint ''.$assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(native uint 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld native uint ''.$assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -152,6 +146,236 @@ IL_0045: ret } + .method public static void f10(native uint start, + native uint step, + native uint finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (native uint V_0, + bool V_1, + native uint V_2, + native uint V_3, + native uint V_4) + IL_0000: ldarg.1 + IL_0001: ldc.i8 0x0 + IL_000a: conv.u + IL_000b: bne.un.s IL_0019 + + IL_000d: ldarg.2 + IL_000e: ldarg.1 + IL_000f: ldarg.2 + IL_0010: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUIntPtr(native uint, + native uint, + native uint) + IL_0015: pop + IL_0016: nop + IL_0017: br.s IL_001a + + IL_0019: nop + IL_001a: ldarg.2 + IL_001b: ldarg.2 + IL_001c: bge.un.s IL_002b + + IL_001e: ldc.i8 0x0 + IL_0027: conv.u + IL_0028: nop + IL_0029: br.s IL_0031 + + IL_002b: ldarg.2 + IL_002c: ldarg.2 + IL_002d: sub + IL_002e: ldarg.1 + IL_002f: div.un + IL_0030: nop + IL_0031: stloc.0 + IL_0032: sizeof [runtime]System.IntPtr + IL_0038: ldc.i4.4 + IL_0039: bne.un.s IL_004b + + IL_003b: ldloc.0 + IL_003c: ldc.i8 0xffffffff + IL_0045: conv.u + IL_0046: ceq + IL_0048: nop + IL_0049: br.s IL_0059 + + IL_004b: ldloc.0 + IL_004c: ldc.i8 0xffffffffffffffff + IL_0055: conv.u + IL_0056: ceq + IL_0058: nop + IL_0059: brfalse.s IL_0095 + + IL_005b: ldc.i4.1 + IL_005c: stloc.1 + IL_005d: ldc.i8 0x0 + IL_0066: conv.u + IL_0067: stloc.2 + IL_0068: ldarg.2 + IL_0069: stloc.3 + IL_006a: br.s IL_0091 + + IL_006c: ldloc.3 + IL_006d: call void assembly::set_c(native uint) + IL_0072: ldloc.3 + IL_0073: ldarg.1 + IL_0074: add + IL_0075: stloc.3 + IL_0076: ldloc.2 + IL_0077: ldc.i8 0x1 + IL_0080: conv.u + IL_0081: add + IL_0082: stloc.2 + IL_0083: ldloc.2 + IL_0084: ldc.i8 0x0 + IL_008d: conv.u + IL_008e: cgt.un + IL_0090: stloc.1 + IL_0091: ldloc.1 + IL_0092: brtrue.s IL_006c + + IL_0094: ret + + IL_0095: ldarg.2 + IL_0096: ldarg.2 + IL_0097: bge.un.s IL_00a6 + + IL_0099: ldc.i8 0x0 + IL_00a2: conv.u + IL_00a3: nop + IL_00a4: br.s IL_00b7 + + IL_00a6: ldarg.2 + IL_00a7: ldarg.2 + IL_00a8: sub + IL_00a9: ldarg.1 + IL_00aa: div.un + IL_00ab: ldc.i8 0x1 + IL_00b4: conv.u + IL_00b5: add.ovf.un + IL_00b6: nop + IL_00b7: stloc.2 + IL_00b8: ldc.i8 0x0 + IL_00c1: conv.u + IL_00c2: stloc.3 + IL_00c3: ldarg.2 + IL_00c4: stloc.s V_4 + IL_00c6: br.s IL_00e2 + + IL_00c8: ldloc.s V_4 + IL_00ca: call void assembly::set_c(native uint) + IL_00cf: ldloc.s V_4 + IL_00d1: ldarg.1 + IL_00d2: add + IL_00d3: stloc.s V_4 + IL_00d5: ldloc.3 + IL_00d6: ldc.i8 0x1 + IL_00df: conv.u + IL_00e0: add + IL_00e1: stloc.3 + IL_00e2: ldloc.3 + IL_00e3: ldloc.2 + IL_00e4: blt.un.s IL_00c8 + + IL_00e6: ret + } + + .method public static void f11(native uint start, + native uint finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (native uint V_0, + native uint V_1, + native uint V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i8 0x0 + IL_000a: conv.u + IL_000b: ldarg.1 + IL_000c: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUIntPtr(native uint, + native uint, + native uint) + IL_0011: pop + IL_0012: ldc.i8 0x0 + IL_001b: conv.u + IL_001c: stloc.0 + IL_001d: ldc.i8 0x0 + IL_0026: conv.u + IL_0027: stloc.1 + IL_0028: ldarg.0 + IL_0029: stloc.2 + IL_002a: br.s IL_004c + + IL_002c: ldloc.2 + IL_002d: call void assembly::set_c(native uint) + IL_0032: ldloc.2 + IL_0033: ldc.i8 0x0 + IL_003c: conv.u + IL_003d: add + IL_003e: stloc.2 + IL_003f: ldloc.1 + IL_0040: ldc.i8 0x1 + IL_0049: conv.u + IL_004a: add + IL_004b: stloc.1 + IL_004c: ldloc.1 + IL_004d: ldloc.0 + IL_004e: blt.un.s IL_002c + + IL_0050: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (native uint V_0, + native uint V_1, + native uint V_2) + IL_0000: ldc.i8 0x1 + IL_0009: conv.u + IL_000a: ldc.i8 0x0 + IL_0013: conv.u + IL_0014: ldc.i8 0xa + IL_001d: conv.u + IL_001e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUIntPtr(native uint, + native uint, + native uint) + IL_0023: pop + IL_0024: ldc.i8 0x0 + IL_002d: conv.u + IL_002e: stloc.0 + IL_002f: ldc.i8 0x0 + IL_0038: conv.u + IL_0039: stloc.1 + IL_003a: ldc.i8 0x1 + IL_0043: conv.u + IL_0044: stloc.2 + IL_0045: br.s IL_0067 + + IL_0047: ldloc.2 + IL_0048: call void assembly::set_c(native uint) + IL_004d: ldloc.2 + IL_004e: ldc.i8 0x0 + IL_0057: conv.u + IL_0058: add + IL_0059: stloc.2 + IL_005a: ldloc.1 + IL_005b: ldc.i8 0x1 + IL_0064: conv.u + IL_0065: add + IL_0066: stloc.1 + IL_0067: ldloc.1 + IL_0068: ldloc.0 + IL_0069: blt.un.s IL_0047 + + IL_006b: ret + } + .method public static void f2(native uint start) cil managed { @@ -833,234 +1057,21 @@ IL_007a: ret } - .method public static void f10(native uint start, - native uint step, - native uint finish) cil managed + .method public specialname static native uint get_c() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - .maxstack 5 - .locals init (native uint V_0, - bool V_1, - native uint V_2, - native uint V_3, - native uint V_4) - IL_0000: ldarg.1 - IL_0001: ldc.i8 0x0 - IL_000a: conv.u - IL_000b: bne.un.s IL_0019 - - IL_000d: ldarg.2 - IL_000e: ldarg.1 - IL_000f: ldarg.2 - IL_0010: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUIntPtr(native uint, - native uint, - native uint) - IL_0015: pop - IL_0016: nop - IL_0017: br.s IL_001a - - IL_0019: nop - IL_001a: ldarg.2 - IL_001b: ldarg.2 - IL_001c: bge.un.s IL_002b - - IL_001e: ldc.i8 0x0 - IL_0027: conv.u - IL_0028: nop - IL_0029: br.s IL_0031 - - IL_002b: ldarg.2 - IL_002c: ldarg.2 - IL_002d: sub - IL_002e: ldarg.1 - IL_002f: div.un - IL_0030: nop - IL_0031: stloc.0 - IL_0032: sizeof [runtime]System.IntPtr - IL_0038: ldc.i4.4 - IL_0039: bne.un.s IL_004b - - IL_003b: ldloc.0 - IL_003c: ldc.i8 0xffffffff - IL_0045: conv.u - IL_0046: ceq - IL_0048: nop - IL_0049: br.s IL_0059 - - IL_004b: ldloc.0 - IL_004c: ldc.i8 0xffffffffffffffff - IL_0055: conv.u - IL_0056: ceq - IL_0058: nop - IL_0059: brfalse.s IL_0095 - - IL_005b: ldc.i4.1 - IL_005c: stloc.1 - IL_005d: ldc.i8 0x0 - IL_0066: conv.u - IL_0067: stloc.2 - IL_0068: ldarg.2 - IL_0069: stloc.3 - IL_006a: br.s IL_0091 - - IL_006c: ldloc.3 - IL_006d: call void assembly::set_c(native uint) - IL_0072: ldloc.3 - IL_0073: ldarg.1 - IL_0074: add - IL_0075: stloc.3 - IL_0076: ldloc.2 - IL_0077: ldc.i8 0x1 - IL_0080: conv.u - IL_0081: add - IL_0082: stloc.2 - IL_0083: ldloc.2 - IL_0084: ldc.i8 0x0 - IL_008d: conv.u - IL_008e: cgt.un - IL_0090: stloc.1 - IL_0091: ldloc.1 - IL_0092: brtrue.s IL_006c - - IL_0094: ret - - IL_0095: ldarg.2 - IL_0096: ldarg.2 - IL_0097: bge.un.s IL_00a6 - - IL_0099: ldc.i8 0x0 - IL_00a2: conv.u - IL_00a3: nop - IL_00a4: br.s IL_00b7 - - IL_00a6: ldarg.2 - IL_00a7: ldarg.2 - IL_00a8: sub - IL_00a9: ldarg.1 - IL_00aa: div.un - IL_00ab: ldc.i8 0x1 - IL_00b4: conv.u - IL_00b5: add.ovf.un - IL_00b6: nop - IL_00b7: stloc.2 - IL_00b8: ldc.i8 0x0 - IL_00c1: conv.u - IL_00c2: stloc.3 - IL_00c3: ldarg.2 - IL_00c4: stloc.s V_4 - IL_00c6: br.s IL_00e2 - - IL_00c8: ldloc.s V_4 - IL_00ca: call void assembly::set_c(native uint) - IL_00cf: ldloc.s V_4 - IL_00d1: ldarg.1 - IL_00d2: add - IL_00d3: stloc.s V_4 - IL_00d5: ldloc.3 - IL_00d6: ldc.i8 0x1 - IL_00df: conv.u - IL_00e0: add - IL_00e1: stloc.3 - IL_00e2: ldloc.3 - IL_00e3: ldloc.2 - IL_00e4: blt.un.s IL_00c8 - - IL_00e6: ret + .maxstack 8 + IL_0000: ldsfld native uint ''.$assembly::c@1 + IL_0005: ret } - .method public static void f11(native uint start, - native uint finish) cil managed + .method public specialname static void set_c(native uint 'value') cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .maxstack 5 - .locals init (native uint V_0, - native uint V_1, - native uint V_2) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldc.i8 0x0 - IL_000a: conv.u - IL_000b: ldarg.1 - IL_000c: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUIntPtr(native uint, - native uint, - native uint) - IL_0011: pop - IL_0012: ldc.i8 0x0 - IL_001b: conv.u - IL_001c: stloc.0 - IL_001d: ldc.i8 0x0 - IL_0026: conv.u - IL_0027: stloc.1 - IL_0028: ldarg.0 - IL_0029: stloc.2 - IL_002a: br.s IL_004c - - IL_002c: ldloc.2 - IL_002d: call void assembly::set_c(native uint) - IL_0032: ldloc.2 - IL_0033: ldc.i8 0x0 - IL_003c: conv.u - IL_003d: add - IL_003e: stloc.2 - IL_003f: ldloc.1 - IL_0040: ldc.i8 0x1 - IL_0049: conv.u - IL_004a: add - IL_004b: stloc.1 - IL_004c: ldloc.1 - IL_004d: ldloc.0 - IL_004e: blt.un.s IL_002c - - IL_0050: ret - } - - .method public static void f12() cil managed - { - - .maxstack 5 - .locals init (native uint V_0, - native uint V_1, - native uint V_2) - IL_0000: ldc.i8 0x1 - IL_0009: conv.u - IL_000a: ldc.i8 0x0 - IL_0013: conv.u - IL_0014: ldc.i8 0xa - IL_001d: conv.u - IL_001e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUIntPtr(native uint, - native uint, - native uint) - IL_0023: pop - IL_0024: ldc.i8 0x0 - IL_002d: conv.u - IL_002e: stloc.0 - IL_002f: ldc.i8 0x0 - IL_0038: conv.u - IL_0039: stloc.1 - IL_003a: ldc.i8 0x1 - IL_0043: conv.u - IL_0044: stloc.2 - IL_0045: br.s IL_0067 - - IL_0047: ldloc.2 - IL_0048: call void assembly::set_c(native uint) - IL_004d: ldloc.2 - IL_004e: ldc.i8 0x0 - IL_0057: conv.u - IL_0058: add - IL_0059: stloc.2 - IL_005a: ldloc.1 - IL_005b: ldc.i8 0x1 - IL_0064: conv.u - IL_0065: add - IL_0066: stloc.1 - IL_0067: ldloc.1 - IL_0068: ldloc.0 - IL_0069: blt.un.s IL_0047 - - IL_006b: ret + IL_0001: stsfld native uint ''.$assembly::c@1 + IL_0006: ret } .property native uint c() @@ -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..067d7ca70e4 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 @@ -35,21 +35,15 @@ .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 native uint c@1 .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 native uint get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld native uint assembly::c@1 - IL_0005: ret - } - - .method public specialname static void set_c(native uint 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld native uint assembly::c@1 - IL_0006: 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 public static void f0() cil managed @@ -154,6 +148,236 @@ IL_0045: ret } + .method public static void f10(native uint start, + native uint step, + native uint finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 + 00 00 00 00 ) + + .maxstack 5 + .locals init (native uint V_0, + bool V_1, + native uint V_2, + native uint V_3, + native uint V_4) + IL_0000: ldarg.1 + IL_0001: ldc.i8 0x0 + IL_000a: conv.u + IL_000b: bne.un.s IL_0019 + + IL_000d: ldarg.2 + IL_000e: ldarg.1 + IL_000f: ldarg.2 + IL_0010: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUIntPtr(native uint, + native uint, + native uint) + IL_0015: pop + IL_0016: nop + IL_0017: br.s IL_001a + + IL_0019: nop + IL_001a: ldarg.2 + IL_001b: ldarg.2 + IL_001c: bge.un.s IL_002b + + IL_001e: ldc.i8 0x0 + IL_0027: conv.u + IL_0028: nop + IL_0029: br.s IL_0031 + + IL_002b: ldarg.2 + IL_002c: ldarg.2 + IL_002d: sub + IL_002e: ldarg.1 + IL_002f: div.un + IL_0030: nop + IL_0031: stloc.0 + IL_0032: sizeof [runtime]System.IntPtr + IL_0038: ldc.i4.4 + IL_0039: bne.un.s IL_004b + + IL_003b: ldloc.0 + IL_003c: ldc.i8 0xffffffff + IL_0045: conv.u + IL_0046: ceq + IL_0048: nop + IL_0049: br.s IL_0059 + + IL_004b: ldloc.0 + IL_004c: ldc.i8 0xffffffffffffffff + IL_0055: conv.u + IL_0056: ceq + IL_0058: nop + IL_0059: brfalse.s IL_0095 + + IL_005b: ldc.i4.1 + IL_005c: stloc.1 + IL_005d: ldc.i8 0x0 + IL_0066: conv.u + IL_0067: stloc.2 + IL_0068: ldarg.2 + IL_0069: stloc.3 + IL_006a: br.s IL_0091 + + IL_006c: ldloc.3 + IL_006d: call void assembly::set_c(native uint) + IL_0072: ldloc.3 + IL_0073: ldarg.1 + IL_0074: add + IL_0075: stloc.3 + IL_0076: ldloc.2 + IL_0077: ldc.i8 0x1 + IL_0080: conv.u + IL_0081: add + IL_0082: stloc.2 + IL_0083: ldloc.2 + IL_0084: ldc.i8 0x0 + IL_008d: conv.u + IL_008e: cgt.un + IL_0090: stloc.1 + IL_0091: ldloc.1 + IL_0092: brtrue.s IL_006c + + IL_0094: ret + + IL_0095: ldarg.2 + IL_0096: ldarg.2 + IL_0097: bge.un.s IL_00a6 + + IL_0099: ldc.i8 0x0 + IL_00a2: conv.u + IL_00a3: nop + IL_00a4: br.s IL_00b7 + + IL_00a6: ldarg.2 + IL_00a7: ldarg.2 + IL_00a8: sub + IL_00a9: ldarg.1 + IL_00aa: div.un + IL_00ab: ldc.i8 0x1 + IL_00b4: conv.u + IL_00b5: add.ovf.un + IL_00b6: nop + IL_00b7: stloc.2 + IL_00b8: ldc.i8 0x0 + IL_00c1: conv.u + IL_00c2: stloc.3 + IL_00c3: ldarg.2 + IL_00c4: stloc.s V_4 + IL_00c6: br.s IL_00e2 + + IL_00c8: ldloc.s V_4 + IL_00ca: call void assembly::set_c(native uint) + IL_00cf: ldloc.s V_4 + IL_00d1: ldarg.1 + IL_00d2: add + IL_00d3: stloc.s V_4 + IL_00d5: ldloc.3 + IL_00d6: ldc.i8 0x1 + IL_00df: conv.u + IL_00e0: add + IL_00e1: stloc.3 + IL_00e2: ldloc.3 + IL_00e3: ldloc.2 + IL_00e4: blt.un.s IL_00c8 + + IL_00e6: ret + } + + .method public static void f11(native uint start, + native uint finish) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (native uint V_0, + native uint V_1, + native uint V_2) + IL_0000: ldarg.0 + IL_0001: ldc.i8 0x0 + IL_000a: conv.u + IL_000b: ldarg.1 + IL_000c: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUIntPtr(native uint, + native uint, + native uint) + IL_0011: pop + IL_0012: ldc.i8 0x0 + IL_001b: conv.u + IL_001c: stloc.0 + IL_001d: ldc.i8 0x0 + IL_0026: conv.u + IL_0027: stloc.1 + IL_0028: ldarg.0 + IL_0029: stloc.2 + IL_002a: br.s IL_004c + + IL_002c: ldloc.2 + IL_002d: call void assembly::set_c(native uint) + IL_0032: ldloc.2 + IL_0033: ldc.i8 0x0 + IL_003c: conv.u + IL_003d: add + IL_003e: stloc.2 + IL_003f: ldloc.1 + IL_0040: ldc.i8 0x1 + IL_0049: conv.u + IL_004a: add + IL_004b: stloc.1 + IL_004c: ldloc.1 + IL_004d: ldloc.0 + IL_004e: blt.un.s IL_002c + + IL_0050: ret + } + + .method public static void f12() cil managed + { + + .maxstack 5 + .locals init (native uint V_0, + native uint V_1, + native uint V_2) + IL_0000: ldc.i8 0x1 + IL_0009: conv.u + IL_000a: ldc.i8 0x0 + IL_0013: conv.u + IL_0014: ldc.i8 0xa + IL_001d: conv.u + IL_001e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUIntPtr(native uint, + native uint, + native uint) + IL_0023: pop + IL_0024: ldc.i8 0x0 + IL_002d: conv.u + IL_002e: stloc.0 + IL_002f: ldc.i8 0x0 + IL_0038: conv.u + IL_0039: stloc.1 + IL_003a: ldc.i8 0x1 + IL_0043: conv.u + IL_0044: stloc.2 + IL_0045: br.s IL_0067 + + IL_0047: ldloc.2 + IL_0048: call void assembly::set_c(native uint) + IL_004d: ldloc.2 + IL_004e: ldc.i8 0x0 + IL_0057: conv.u + IL_0058: add + IL_0059: stloc.2 + IL_005a: ldloc.1 + IL_005b: ldc.i8 0x1 + IL_0064: conv.u + IL_0065: add + IL_0066: stloc.1 + IL_0067: ldloc.1 + IL_0068: ldloc.0 + IL_0069: blt.un.s IL_0047 + + IL_006b: ret + } + .method public static void f2(native uint start) cil managed { @@ -835,245 +1059,21 @@ IL_007a: ret } - .method public static void f10(native uint start, - native uint step, - native uint finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 - 00 00 00 00 ) - - .maxstack 5 - .locals init (native uint V_0, - bool V_1, - native uint V_2, - native uint V_3, - native uint V_4) - IL_0000: ldarg.1 - IL_0001: ldc.i8 0x0 - IL_000a: conv.u - IL_000b: bne.un.s IL_0019 - - IL_000d: ldarg.2 - IL_000e: ldarg.1 - IL_000f: ldarg.2 - IL_0010: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUIntPtr(native uint, - native uint, - native uint) - IL_0015: pop - IL_0016: nop - IL_0017: br.s IL_001a - - IL_0019: nop - IL_001a: ldarg.2 - IL_001b: ldarg.2 - IL_001c: bge.un.s IL_002b - - IL_001e: ldc.i8 0x0 - IL_0027: conv.u - IL_0028: nop - IL_0029: br.s IL_0031 - - IL_002b: ldarg.2 - IL_002c: ldarg.2 - IL_002d: sub - IL_002e: ldarg.1 - IL_002f: div.un - IL_0030: nop - IL_0031: stloc.0 - IL_0032: sizeof [runtime]System.IntPtr - IL_0038: ldc.i4.4 - IL_0039: bne.un.s IL_004b - - IL_003b: ldloc.0 - IL_003c: ldc.i8 0xffffffff - IL_0045: conv.u - IL_0046: ceq - IL_0048: nop - IL_0049: br.s IL_0059 - - IL_004b: ldloc.0 - IL_004c: ldc.i8 0xffffffffffffffff - IL_0055: conv.u - IL_0056: ceq - IL_0058: nop - IL_0059: brfalse.s IL_0095 - - IL_005b: ldc.i4.1 - IL_005c: stloc.1 - IL_005d: ldc.i8 0x0 - IL_0066: conv.u - IL_0067: stloc.2 - IL_0068: ldarg.2 - IL_0069: stloc.3 - IL_006a: br.s IL_0091 - - IL_006c: ldloc.3 - IL_006d: call void assembly::set_c(native uint) - IL_0072: ldloc.3 - IL_0073: ldarg.1 - IL_0074: add - IL_0075: stloc.3 - IL_0076: ldloc.2 - IL_0077: ldc.i8 0x1 - IL_0080: conv.u - IL_0081: add - IL_0082: stloc.2 - IL_0083: ldloc.2 - IL_0084: ldc.i8 0x0 - IL_008d: conv.u - IL_008e: cgt.un - IL_0090: stloc.1 - IL_0091: ldloc.1 - IL_0092: brtrue.s IL_006c - - IL_0094: ret - - IL_0095: ldarg.2 - IL_0096: ldarg.2 - IL_0097: bge.un.s IL_00a6 - - IL_0099: ldc.i8 0x0 - IL_00a2: conv.u - IL_00a3: nop - IL_00a4: br.s IL_00b7 - - IL_00a6: ldarg.2 - IL_00a7: ldarg.2 - IL_00a8: sub - IL_00a9: ldarg.1 - IL_00aa: div.un - IL_00ab: ldc.i8 0x1 - IL_00b4: conv.u - IL_00b5: add.ovf.un - IL_00b6: nop - IL_00b7: stloc.2 - IL_00b8: ldc.i8 0x0 - IL_00c1: conv.u - IL_00c2: stloc.3 - IL_00c3: ldarg.2 - IL_00c4: stloc.s V_4 - IL_00c6: br.s IL_00e2 - - IL_00c8: ldloc.s V_4 - IL_00ca: call void assembly::set_c(native uint) - IL_00cf: ldloc.s V_4 - IL_00d1: ldarg.1 - IL_00d2: add - IL_00d3: stloc.s V_4 - IL_00d5: ldloc.3 - IL_00d6: ldc.i8 0x1 - IL_00df: conv.u - IL_00e0: add - IL_00e1: stloc.3 - IL_00e2: ldloc.3 - IL_00e3: ldloc.2 - IL_00e4: blt.un.s IL_00c8 - - IL_00e6: ret - } - - .method public static void f11(native uint start, - native uint finish) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 5 - .locals init (native uint V_0, - native uint V_1, - native uint V_2) - IL_0000: ldarg.0 - IL_0001: ldc.i8 0x0 - IL_000a: conv.u - IL_000b: ldarg.1 - IL_000c: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUIntPtr(native uint, - native uint, - native uint) - IL_0011: pop - IL_0012: ldc.i8 0x0 - IL_001b: conv.u - IL_001c: stloc.0 - IL_001d: ldc.i8 0x0 - IL_0026: conv.u - IL_0027: stloc.1 - IL_0028: ldarg.0 - IL_0029: stloc.2 - IL_002a: br.s IL_004c - - IL_002c: ldloc.2 - IL_002d: call void assembly::set_c(native uint) - IL_0032: ldloc.2 - IL_0033: ldc.i8 0x0 - IL_003c: conv.u - IL_003d: add - IL_003e: stloc.2 - IL_003f: ldloc.1 - IL_0040: ldc.i8 0x1 - IL_0049: conv.u - IL_004a: add - IL_004b: stloc.1 - IL_004c: ldloc.1 - IL_004d: ldloc.0 - IL_004e: blt.un.s IL_002c - - IL_0050: ret - } - - .method public static void f12() cil managed + .method public specialname static native uint get_c() cil managed { - .maxstack 5 - .locals init (native uint V_0, - native uint V_1, - native uint V_2) - IL_0000: ldc.i8 0x1 - IL_0009: conv.u - IL_000a: ldc.i8 0x0 - IL_0013: conv.u - IL_0014: ldc.i8 0xa - IL_001d: conv.u - IL_001e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeUIntPtr(native uint, - native uint, - native uint) - IL_0023: pop - IL_0024: ldc.i8 0x0 - IL_002d: conv.u - IL_002e: stloc.0 - IL_002f: ldc.i8 0x0 - IL_0038: conv.u - IL_0039: stloc.1 - IL_003a: ldc.i8 0x1 - IL_0043: conv.u - IL_0044: stloc.2 - IL_0045: br.s IL_0067 - - IL_0047: ldloc.2 - IL_0048: call void assembly::set_c(native uint) - IL_004d: ldloc.2 - IL_004e: ldc.i8 0x0 - IL_0057: conv.u - IL_0058: add - IL_0059: stloc.2 - IL_005a: ldloc.1 - IL_005b: ldc.i8 0x1 - IL_0064: conv.u - IL_0065: add - IL_0066: stloc.1 - IL_0067: ldloc.1 - IL_0068: ldloc.0 - IL_0069: blt.un.s IL_0047 - - IL_006b: ret + .maxstack 8 + IL_0000: ldsfld native uint assembly::c@1 + IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static void set_c(native uint '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 native uint assembly::c@1 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -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..03cfdbd90df 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 @@ -33,21 +33,15 @@ 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 public specialname static int64 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int64 ''.$assembly::c@3 - IL_0005: ret - } - - .method public specialname static void set_c(int64 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int64 ''.$assembly::c@3 - IL_0006: 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 public static void f1() cil managed @@ -84,6 +78,74 @@ IL_001e: ret } + .method public static void f10() cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + int64 V_1) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.0 + IL_0003: ldc.i4.s 10 + IL_0005: conv.i8 + IL_0006: stloc.1 + IL_0007: br.s IL_0019 + + IL_0009: ldloc.1 + IL_000a: call void assembly::set_c(int64) + IL_000f: ldloc.1 + IL_0010: ldc.i4.m1 + IL_0011: conv.i8 + IL_0012: add + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: ldc.i4.1 + IL_0016: conv.i8 + IL_0017: add + IL_0018: stloc.0 + IL_0019: ldloc.0 + IL_001a: ldc.i4.s 10 + IL_001c: conv.i8 + IL_001d: blt.un.s IL_0009 + + IL_001f: ret + } + + .method public static void f11() cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + int64 V_1) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.0 + IL_0003: ldc.i4.s 10 + IL_0005: conv.i8 + IL_0006: stloc.1 + IL_0007: br.s IL_001a + + IL_0009: ldloc.1 + IL_000a: call void assembly::set_c(int64) + IL_000f: ldloc.1 + IL_0010: ldc.i4.s -2 + IL_0012: conv.i8 + IL_0013: add + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: ldc.i4.1 + IL_0017: conv.i8 + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldloc.0 + IL_001b: ldc.i4.5 + IL_001c: conv.i8 + IL_001d: blt.un.s IL_0009 + + IL_001f: ret + } + .method public static void f2() cil managed { @@ -605,72 +667,21 @@ IL_002c: ret } - .method public static void f10() cil managed + .method public specialname static int64 get_c() cil managed { - .maxstack 4 - .locals init (uint64 V_0, - int64 V_1) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.s 10 - IL_0005: conv.i8 - IL_0006: stloc.1 - IL_0007: br.s IL_0019 - - IL_0009: ldloc.1 - IL_000a: call void assembly::set_c(int64) - IL_000f: ldloc.1 - IL_0010: ldc.i4.m1 - IL_0011: conv.i8 - IL_0012: add - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: ldc.i4.1 - IL_0016: conv.i8 - IL_0017: add - IL_0018: stloc.0 - IL_0019: ldloc.0 - IL_001a: ldc.i4.s 10 - IL_001c: conv.i8 - IL_001d: blt.un.s IL_0009 - - IL_001f: ret + .maxstack 8 + IL_0000: ldsfld int64 ''.$assembly::c@3 + IL_0005: ret } - .method public static void f11() cil managed + .method public specialname static void set_c(int64 'value') cil managed { - .maxstack 4 - .locals init (uint64 V_0, - int64 V_1) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.s 10 - IL_0005: conv.i8 - IL_0006: stloc.1 - IL_0007: br.s IL_001a - - IL_0009: ldloc.1 - IL_000a: call void assembly::set_c(int64) - IL_000f: ldloc.1 - IL_0010: ldc.i4.s -2 - IL_0012: conv.i8 - IL_0013: add - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldloc.0 - IL_001b: ldc.i4.5 - IL_001c: conv.i8 - IL_001d: blt.un.s IL_0009 - - IL_001f: ret + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld int64 ''.$assembly::c@3 + IL_0006: ret } .property int64 c() @@ -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..0f44de8e993 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 @@ -35,21 +35,15 @@ .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 int64 c@3 .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 int64 get_c() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int64 assembly::c@3 - IL_0005: ret - } - - .method public specialname static void set_c(int64 'value') cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int64 assembly::c@3 - IL_0006: 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 public static void f1() cil managed @@ -86,6 +80,74 @@ IL_001e: ret } + .method public static void f10() cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + int64 V_1) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.0 + IL_0003: ldc.i4.s 10 + IL_0005: conv.i8 + IL_0006: stloc.1 + IL_0007: br.s IL_0019 + + IL_0009: ldloc.1 + IL_000a: call void assembly::set_c(int64) + IL_000f: ldloc.1 + IL_0010: ldc.i4.m1 + IL_0011: conv.i8 + IL_0012: add + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: ldc.i4.1 + IL_0016: conv.i8 + IL_0017: add + IL_0018: stloc.0 + IL_0019: ldloc.0 + IL_001a: ldc.i4.s 10 + IL_001c: conv.i8 + IL_001d: blt.un.s IL_0009 + + IL_001f: ret + } + + .method public static void f11() cil managed + { + + .maxstack 4 + .locals init (uint64 V_0, + int64 V_1) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.0 + IL_0003: ldc.i4.s 10 + IL_0005: conv.i8 + IL_0006: stloc.1 + IL_0007: br.s IL_001a + + IL_0009: ldloc.1 + IL_000a: call void assembly::set_c(int64) + IL_000f: ldloc.1 + IL_0010: ldc.i4.s -2 + IL_0012: conv.i8 + IL_0013: add + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: ldc.i4.1 + IL_0017: conv.i8 + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldloc.0 + IL_001b: ldc.i4.5 + IL_001c: conv.i8 + IL_001d: blt.un.s IL_0009 + + IL_001f: ret + } + .method public static void f2() cil managed { @@ -607,83 +669,21 @@ IL_002c: ret } - .method public static void f10() cil managed - { - - .maxstack 4 - .locals init (uint64 V_0, - int64 V_1) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.s 10 - IL_0005: conv.i8 - IL_0006: stloc.1 - IL_0007: br.s IL_0019 - - IL_0009: ldloc.1 - IL_000a: call void assembly::set_c(int64) - IL_000f: ldloc.1 - IL_0010: ldc.i4.m1 - IL_0011: conv.i8 - IL_0012: add - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: ldc.i4.1 - IL_0016: conv.i8 - IL_0017: add - IL_0018: stloc.0 - IL_0019: ldloc.0 - IL_001a: ldc.i4.s 10 - IL_001c: conv.i8 - IL_001d: blt.un.s IL_0009 - - IL_001f: ret - } - - .method public static void f11() cil managed + .method public specialname static int64 get_c() cil managed { - .maxstack 4 - .locals init (uint64 V_0, - int64 V_1) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.s 10 - IL_0005: conv.i8 - IL_0006: stloc.1 - IL_0007: br.s IL_001a - - IL_0009: ldloc.1 - IL_000a: call void assembly::set_c(int64) - IL_000f: ldloc.1 - IL_0010: ldc.i4.s -2 - IL_0012: conv.i8 - IL_0013: add - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: ldc.i4.1 - IL_0017: conv.i8 - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldloc.0 - IL_001b: ldc.i4.5 - IL_001c: conv.i8 - IL_001d: blt.un.s IL_0009 - - IL_001f: ret + .maxstack 8 + IL_0000: ldsfld int64 assembly::c@3 + IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static void set_c(int64 '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 int64 assembly::c@3 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl index c2d8e84b8d7..dac5aa65d2b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl @@ -43,6 +43,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 + } + .method public specialname static class [runtime]System.Collections.Generic.List`1 get_ra() cil managed { @@ -170,4 +181,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..2662b922cec 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 @@ -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 + } + .method public specialname static class [runtime]System.Collections.Generic.List`1 get_ra() cil managed { @@ -160,4 +171,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl index 16f1a114211..143294e97f4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl @@ -45,6 +45,17 @@ .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 [runtime]System.Collections.Generic.List`1 ra@5 .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::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method public specialname static class [runtime]System.Collections.Generic.List`1 get_ra() cil managed { @@ -117,17 +128,6 @@ 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 - } - .method assembly static void staticInitialization@() cil managed { @@ -186,4 +186,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..75fd5f3ae1f 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 @@ -35,6 +35,17 @@ .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 [runtime]System.Collections.Generic.List`1 ra@5 .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::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method public specialname static class [runtime]System.Collections.Generic.List`1 get_ra() cil managed { @@ -107,17 +118,6 @@ 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 - } - .method assembly static void staticInitialization@() cil managed { @@ -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..89eab940118 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 @@ -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 + } + .method public specialname static int32[] get_r() cil managed { @@ -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..4b62be1c437 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 @@ -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 + } + .method public specialname static int32[] get_r() cil managed { @@ -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..aca8a88306b 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 @@ -37,31 +37,31 @@ .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[] w@7 .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 int32[] get_r() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - 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 public specialname static int32[] get_w() cil managed + .method public specialname static int32[] get_r() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 + IL_0000: ldsfld int32[] assembly::r@6 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static int32[] get_w() 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::w@7 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -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..5f7fa3063e9 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 @@ -37,31 +37,31 @@ .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[] w@7 .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 int32[] get_r() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - 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 public specialname static int32[] get_w() cil managed + .method public specialname static int32[] get_r() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 + IL_0000: ldsfld int32[] assembly::r@6 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static int32[] get_w() 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::w@7 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -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..0e39000d61e 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 @@ -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 + } + .method public specialname static int32[] get_r() cil managed { @@ -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..919383c75bb 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 @@ -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 + } + .method public specialname static int32[] get_r() cil managed { @@ -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..b28ab1f18e1 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 @@ -37,31 +37,31 @@ .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[] w@7 .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 int32[] get_r() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - 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 public specialname static int32[] get_w() cil managed + .method public specialname static int32[] get_r() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 + IL_0000: ldsfld int32[] assembly::r@6 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static int32[] get_w() 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::w@7 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -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..0ba43611c29 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 @@ -37,31 +37,31 @@ .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[] w@7 .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 int32[] get_r() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - 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 public specialname static int32[] get_w() cil managed + .method public specialname static int32[] get_r() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 + IL_0000: ldsfld int32[] assembly::r@6 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static int32[] get_w() 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::w@7 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -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..6bb04c90d48 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 @@ -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 + } + .method public specialname static int32[] get_r() cil managed { @@ -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..fa753eec691 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 @@ -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 + } + .method public specialname static int32[] get_r() cil managed { @@ -57,15 +68,6 @@ 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 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..79f8669a8d1 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 @@ -37,31 +37,31 @@ .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[] w@7 .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 int32[] get_r() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - 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 public specialname static int32[] get_w() cil managed + .method public specialname static int32[] get_r() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 + IL_0000: ldsfld int32[] assembly::r@6 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static int32[] get_w() 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::w@7 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -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..c17c8bfb916 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 @@ -45,6 +45,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 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 .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::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method public specialname static int32[] get_r() cil managed { @@ -69,15 +80,6 @@ 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 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..e027d8eb1d9 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 @@ -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 + } + .method public specialname static int32[] get_r() cil managed { @@ -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..926d2e63085 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 @@ -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 + } + .method public specialname static int32[] get_r() cil managed { @@ -57,15 +68,6 @@ 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 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..12ac8e07e5a 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 @@ -37,31 +37,31 @@ .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[] w@7 .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 int32[] get_r() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - 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 public specialname static int32[] get_w() cil managed + .method public specialname static int32[] get_r() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 + IL_0000: ldsfld int32[] assembly::r@6 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static int32[] get_w() 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::w@7 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -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..d24592f48ae 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 @@ -45,6 +45,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 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 .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::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method public specialname static int32[] get_r() cil managed { @@ -69,15 +80,6 @@ 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 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..e4718c1222b 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 @@ -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 + } + .method public specialname static int32[] get_r() cil managed { @@ -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..ca45c93e0c1 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 @@ -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 + } + .method public specialname static int32[] get_r() cil managed { @@ -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..5cc58773f82 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 @@ -37,31 +37,31 @@ .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[] w@7 .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 int32[] get_r() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - 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 public specialname static int32[] get_w() cil managed + .method public specialname static int32[] get_r() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 + IL_0000: ldsfld int32[] assembly::r@6 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static int32[] get_w() 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::w@7 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -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..555c4e904aa 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 @@ -37,31 +37,31 @@ .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[] w@7 .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 int32[] get_r() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - 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 public specialname static int32[] get_w() cil managed + .method public specialname static int32[] get_r() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 + IL_0000: ldsfld int32[] assembly::r@6 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static int32[] get_w() 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::w@7 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -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..bb3fc402665 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 @@ -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 + } + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_squaresOfOneToTenD() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl index 927c1956b20..36f217426d8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl @@ -35,14 +35,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.Collections.FSharpList`1 squaresOfOneToTenD@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_squaresOfOneToTenD() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::squaresOfOneToTenD@4 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -54,6 +46,14 @@ IL_000c: ret } + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_squaresOfOneToTenD() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::squaresOfOneToTenD@4 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare05.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare05.fsx.il.net472.bsl index 44cccd46738..f25480fd3ec 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare05.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare05.fsx.il.net472.bsl @@ -46,7 +46,7 @@ [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 ) + 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 ) .field assembly initonly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -56,28 +56,13 @@ .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 public static class assembly/CompareMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 34 43 6F 6D 70 61 72 65 30 35 - 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 - 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 - 6F 6E 54 65 73 74 73 2B 4B 65 79 00 00 ) + .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 34 43 6F 6D 70 61 72 65 30 35 + 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 + 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 + 6F 6E 54 65 73 74 73 2B 4B 65 79 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 ) @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/CompareMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,6 +393,144 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: 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/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/CompareMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) + IL_0007: 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/CompareMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -615,97 +615,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..f25480fd3ec 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 @@ -56,21 +56,6 @@ .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 public static class assembly/CompareMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/CompareMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,6 +393,144 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: 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/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/CompareMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) + IL_0007: 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/CompareMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -619,4 +619,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.net472.bsl index 93e582b122a..2ad4457fe80 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.net472.bsl @@ -62,37 +62,13 @@ .field assembly int32 key2@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_key1() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_key2() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0006: ret - } - - .method public specialname rtspecialname - instance void .ctor(int32 key1, - int32 key2) cil managed + .method public specialname rtspecialname instance void .ctor(int32 key1, int32 key2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 35 43 6F 6D 70 61 72 65 30 36 - 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 - 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 - 6F 6E 54 65 73 74 73 2B 4B 65 79 52 00 00 ) + .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 35 43 6F 6D 70 61 72 65 30 36 + 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 + 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 + 6F 6E 54 65 73 74 73 2B 4B 65 79 52 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -106,19 +82,6 @@ IL_0014: 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/CompareMicroPerfAndCodeGenerationTests/KeyR>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/CompareMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -206,9 +169,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -284,64 +245,7 @@ IL_005b: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/CompareMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -379,9 +283,7 @@ IL_002e: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -463,6 +365,96 @@ IL_0013: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/CompareMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/CompareMicroPerfAndCodeGenerationTests/KeyR>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_key1() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_key2() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0006: ret + } + .property instance int32 key1() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -533,99 +525,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname - instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, - class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..3804d31d0f0 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 @@ -52,28 +52,6 @@ .field assembly int32 key2@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_key1() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_key2() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0006: ret - } - .method public specialname rtspecialname instance void .ctor(int32 key1, int32 key2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -94,19 +72,6 @@ IL_0014: 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/CompareMicroPerfAndCodeGenerationTests/KeyR>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/CompareMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -270,61 +235,6 @@ IL_005b: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/CompareMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -445,6 +355,96 @@ IL_0013: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/CompareMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/CompareMicroPerfAndCodeGenerationTests/KeyR>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_key1() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_key2() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0006: ret + } + .property instance int32 key1() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -519,4 +519,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare07.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare07.fsx.il.net472.bsl index 5169570beaf..757ccc056cf 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare07.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare07.fsx.il.net472.bsl @@ -46,7 +46,7 @@ [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 ) + 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 ) .field assembly initonly !a item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -56,29 +56,14 @@ .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 public static class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 NewGenericKey(!a item1, !a item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::.ctor(!0, - !0) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(!a item1, !a item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 3D 43 6F 6D 70 61 72 65 30 37 - 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 - 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 - 6F 6E 54 65 73 74 73 2B 47 65 6E 65 72 69 63 4B - 65 79 60 31 00 00 ) + .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 3D 43 6F 6D 70 61 72 65 30 37 + 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 + 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 + 6F 6E 54 65 73 74 73 2B 47 65 6E 65 72 69 63 4B + 65 79 60 31 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 ) @@ -94,67 +79,6 @@ IL_0014: ret } - .method public hidebysig instance !a get_Item1() 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 !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0006: ret - } - - .method public hidebysig instance !a get_Item2() 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 !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_0015: ret - } - .method public hidebysig virtual final instance int32 CompareTo(class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,79 +257,6 @@ IL_0069: 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 7 - .locals init (int32 V_0, - class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, - !a V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0047 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0016: stloc.2 - IL_0017: ldarg.1 - IL_0018: ldloc.2 - IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_001e: ldloc.0 - IL_001f: ldc.i4.6 - IL_0020: shl - IL_0021: ldloc.0 - IL_0022: ldc.i4.2 - IL_0023: shr - IL_0024: add - IL_0025: add - IL_0026: add - IL_0027: stloc.0 - IL_0028: ldc.i4 0x9e3779b9 - IL_002d: ldloc.1 - IL_002e: ldfld !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0033: stloc.2 - IL_0034: ldarg.1 - IL_0035: ldloc.2 - IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_003b: ldloc.0 - IL_003c: ldc.i4.6 - IL_003d: shl - IL_003e: ldloc.0 - IL_003f: ldc.i4.2 - IL_0040: shr - IL_0041: add - IL_0042: add - IL_0043: add - IL_0044: stloc.0 - IL_0045: ldloc.0 - IL_0046: ret - - IL_0047: ldc.i4.0 - IL_0048: 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 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -576,6 +427,155 @@ IL_0015: 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 7 + .locals init (int32 V_0, + class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, + !a V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0047 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0016: stloc.2 + IL_0017: ldarg.1 + IL_0018: ldloc.2 + IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_001e: ldloc.0 + IL_001f: ldc.i4.6 + IL_0020: shl + IL_0021: ldloc.0 + IL_0022: ldc.i4.2 + IL_0023: shr + IL_0024: add + IL_0025: add + IL_0026: add + IL_0027: stloc.0 + IL_0028: ldc.i4 0x9e3779b9 + IL_002d: ldloc.1 + IL_002e: ldfld !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0033: stloc.2 + IL_0034: ldarg.1 + IL_0035: ldloc.2 + IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_003b: ldloc.0 + IL_003c: ldc.i4.6 + IL_003d: shl + IL_003e: ldloc.0 + IL_003f: ldc.i4.2 + IL_0040: shr + IL_0041: add + IL_0042: add + IL_0043: add + IL_0044: stloc.0 + IL_0045: ldloc.0 + IL_0046: ret + + IL_0047: ldc.i4.0 + IL_0048: 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 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 NewGenericKey(!a item1, !a item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::.ctor(!0, + !0) + IL_0007: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig instance !a get_Item1() 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 !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0006: ret + } + + .method public hidebysig instance !a get_Item2() 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 !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -660,97 +660,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..757ccc056cf 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 @@ -56,21 +56,6 @@ .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 public static class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 NewGenericKey(!a item1, !a item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::.ctor(!0, - !0) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(!a item1, !a item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -94,67 +79,6 @@ IL_0014: ret } - .method public hidebysig instance !a get_Item1() 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 !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0006: ret - } - - .method public hidebysig instance !a get_Item2() 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 !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_0015: ret - } - .method public hidebysig virtual final instance int32 CompareTo(class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,79 +257,6 @@ IL_0069: 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 7 - .locals init (int32 V_0, - class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, - !a V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0047 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0016: stloc.2 - IL_0017: ldarg.1 - IL_0018: ldloc.2 - IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_001e: ldloc.0 - IL_001f: ldc.i4.6 - IL_0020: shl - IL_0021: ldloc.0 - IL_0022: ldc.i4.2 - IL_0023: shr - IL_0024: add - IL_0025: add - IL_0026: add - IL_0027: stloc.0 - IL_0028: ldc.i4 0x9e3779b9 - IL_002d: ldloc.1 - IL_002e: ldfld !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0033: stloc.2 - IL_0034: ldarg.1 - IL_0035: ldloc.2 - IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_003b: ldloc.0 - IL_003c: ldc.i4.6 - IL_003d: shl - IL_003e: ldloc.0 - IL_003f: ldc.i4.2 - IL_0040: shr - IL_0041: add - IL_0042: add - IL_0043: add - IL_0044: stloc.0 - IL_0045: ldloc.0 - IL_0046: ret - - IL_0047: ldc.i4.0 - IL_0048: 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 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -576,6 +427,155 @@ IL_0015: 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 7 + .locals init (int32 V_0, + class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, + !a V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0047 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0016: stloc.2 + IL_0017: ldarg.1 + IL_0018: ldloc.2 + IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_001e: ldloc.0 + IL_001f: ldc.i4.6 + IL_0020: shl + IL_0021: ldloc.0 + IL_0022: ldc.i4.2 + IL_0023: shr + IL_0024: add + IL_0025: add + IL_0026: add + IL_0027: stloc.0 + IL_0028: ldc.i4 0x9e3779b9 + IL_002d: ldloc.1 + IL_002e: ldfld !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0033: stloc.2 + IL_0034: ldarg.1 + IL_0035: ldloc.2 + IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_003b: ldloc.0 + IL_003c: ldc.i4.6 + IL_003d: shl + IL_003e: ldloc.0 + IL_003f: ldc.i4.2 + IL_0040: shr + IL_0041: add + IL_0042: add + IL_0043: add + IL_0044: stloc.0 + IL_0045: ldloc.0 + IL_0046: ret + + IL_0047: ldc.i4.0 + IL_0048: 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 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 NewGenericKey(!a item1, !a item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::.ctor(!0, + !0) + IL_0007: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig instance !a get_Item1() 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 !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0006: ret + } + + .method public hidebysig instance !a get_Item2() 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 !0 class assembly/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -664,4 +664,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare10.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare10.fsx.il.net472.bsl index fb1bb89591c..26a07c912b1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare10.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare10.fsx.il.net472.bsl @@ -46,7 +46,7 @@ [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 ) + 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 ) .field assembly initonly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -56,28 +56,13 @@ .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 public static class assembly/CompareMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 34 43 6F 6D 70 61 72 65 31 30 - 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 - 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 - 6F 6E 54 65 73 74 73 2B 4B 65 79 00 00 ) + .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 34 43 6F 6D 70 61 72 65 31 30 + 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 + 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 + 6F 6E 54 65 73 74 73 2B 4B 65 79 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 ) @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/CompareMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,53 +393,69 @@ IL_0013: ret } - .property instance int32 Tag() - { - .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 int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::get_Tag() - } - .property instance int32 Item1() + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::get_Item1() + + .maxstack 7 + .locals init (int32 V_0, + class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret } - .property instance int32 Item2() + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::get_Item2() + + .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/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret } - } - .class auto autochar serializable sealed nested public beforefieldinit KeyWithInnerKeys - extends [runtime]System.Object - implements class [runtime]System.IEquatable`1, - [runtime]System.Collections.IStructuralEquatable, - class [runtime]System.IComparable`1, - [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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) - .field assembly initonly class assembly/CompareMicroPerfAndCodeGenerationTests/Key item1 - .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 assembly initonly class [runtime]System.Tuple`2 item2 - .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 public static class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys NewKeyWithInnerKeys(class assembly/CompareMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) cil managed + .method public static class assembly/CompareMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 00 00 00 00 00 00 ) @@ -587,53 +465,57 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::.ctor(class assembly/CompareMicroPerfAndCodeGenerationTests/Key, - class [runtime]System.Tuple`2) + IL_0002: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) IL_0007: ret } - .method assembly specialname rtspecialname instance void .ctor(class assembly/CompareMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) cil managed + .method public strict virtual instance string ToString() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 41 43 6F 6D 70 61 72 65 31 30 - 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 - 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 - 6F 6E 54 65 73 74 73 2B 4B 65 79 57 69 74 68 49 - 6E 6E 65 72 4B 65 79 73 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() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Tuple`2 assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0014: ret + 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/CompareMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance class assembly/CompareMicroPerfAndCodeGenerationTests/Key get_Item1() cil managed + .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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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 class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0001: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item1 IL_0006: ret } - .method public hidebysig instance class [runtime]System.Tuple`2 get_Item2() cil managed + .method public hidebysig instance int32 get_Item2() 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 class [runtime]System.Tuple`2 assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0001: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item2 IL_0006: ret } @@ -649,31 +531,73 @@ IL_0003: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .property instance int32 Tag() { .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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + .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/CompareMicroPerfAndCodeGenerationTests/Key::get_Tag() + } + .property instance int32 Item1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::get_Item1() + } + .property instance int32 Item2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::get_Item2() } + } - .method public strict virtual instance string ToString() cil managed + .class auto autochar serializable sealed nested public beforefieldinit KeyWithInnerKeys + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field assembly initonly class assembly/CompareMicroPerfAndCodeGenerationTests/Key item1 + .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 assembly initonly class [runtime]System.Tuple`2 item2 + .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 assembly/CompareMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) 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 41 43 6F 6D 70 61 72 65 31 30 + 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 + 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 + 6F 6E 54 65 73 74 73 2B 4B 65 79 57 69 74 68 49 + 6E 6E 65 72 4B 65 79 73 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: 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/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Tuple`2 assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0014: ret } .method public hidebysig virtual final instance int32 CompareTo(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed @@ -905,94 +829,6 @@ IL_00a4: 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 7 - .locals init (int32 V_0, - class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, - class [runtime]System.Tuple`2 V_2, - class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_3, - class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_4, - int32 V_5) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0066 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld class [runtime]System.Tuple`2 assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0016: stloc.2 - IL_0017: ldloc.2 - IL_0018: call instance !0 class [runtime]System.Tuple`2::get_Item1() - IL_001d: stloc.3 - IL_001e: ldloc.2 - IL_001f: call instance !1 class [runtime]System.Tuple`2::get_Item2() - IL_0024: stloc.s V_4 - IL_0026: ldloc.3 - IL_0027: ldarg.1 - IL_0028: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_002d: stloc.s V_5 - IL_002f: ldloc.s V_5 - IL_0031: ldc.i4.5 - IL_0032: shl - IL_0033: ldloc.s V_5 - IL_0035: add - IL_0036: ldloc.s V_4 - IL_0038: ldarg.1 - IL_0039: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_003e: xor - IL_003f: ldloc.0 - IL_0040: ldc.i4.6 - IL_0041: shl - IL_0042: ldloc.0 - IL_0043: ldc.i4.2 - IL_0044: shr - IL_0045: add - IL_0046: add - IL_0047: add - IL_0048: stloc.0 - IL_0049: ldc.i4 0x9e3779b9 - IL_004e: ldloc.1 - IL_004f: ldfld class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0054: ldarg.1 - IL_0055: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_005a: ldloc.0 - IL_005b: ldc.i4.6 - IL_005c: shl - IL_005d: ldloc.0 - IL_005e: ldc.i4.2 - IL_005f: shr - IL_0060: add - IL_0061: add - IL_0062: add - IL_0063: stloc.0 - IL_0064: ldloc.0 - IL_0065: ret - - IL_0066: ldc.i4.0 - IL_0067: 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/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1135,7 +971,7 @@ IL_0026: ldfld class [runtime]System.Tuple`2 assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 IL_002b: tail. IL_002d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, - !!0) + !!0) IL_0032: ret IL_0033: ldc.i4.0 @@ -1174,6 +1010,170 @@ IL_0015: 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 7 + .locals init (int32 V_0, + class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, + class [runtime]System.Tuple`2 V_2, + class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_3, + class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0066 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld class [runtime]System.Tuple`2 assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: call instance !0 class [runtime]System.Tuple`2::get_Item1() + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: call instance !1 class [runtime]System.Tuple`2::get_Item2() + IL_0024: stloc.s V_4 + IL_0026: ldloc.3 + IL_0027: ldarg.1 + IL_0028: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_002d: stloc.s V_5 + IL_002f: ldloc.s V_5 + IL_0031: ldc.i4.5 + IL_0032: shl + IL_0033: ldloc.s V_5 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: ldarg.1 + IL_0039: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_003e: xor + IL_003f: ldloc.0 + IL_0040: ldc.i4.6 + IL_0041: shl + IL_0042: ldloc.0 + IL_0043: ldc.i4.2 + IL_0044: shr + IL_0045: add + IL_0046: add + IL_0047: add + IL_0048: stloc.0 + IL_0049: ldc.i4 0x9e3779b9 + IL_004e: ldloc.1 + IL_004f: ldfld class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0054: ldarg.1 + IL_0055: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_005a: ldloc.0 + IL_005b: ldc.i4.6 + IL_005c: shl + IL_005d: ldloc.0 + IL_005e: ldc.i4.2 + IL_005f: shr + IL_0060: add + IL_0061: add + IL_0062: add + IL_0063: stloc.0 + IL_0064: ldloc.0 + IL_0065: ret + + IL_0066: ldc.i4.0 + IL_0067: 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/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys NewKeyWithInnerKeys(class assembly/CompareMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::.ctor(class assembly/CompareMicroPerfAndCodeGenerationTests/Key, + class [runtime]System.Tuple`2) + IL_0007: 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/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance class assembly/CompareMicroPerfAndCodeGenerationTests/Key get_Item1() 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 class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0006: ret + } + + .method public hidebysig instance class [runtime]System.Tuple`2 get_Item2() 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 class [runtime]System.Tuple`2 assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1226,7 +1226,7 @@ IL_0012: call class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/Key::NewKey(int32, int32) IL_0017: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_001c: call class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::NewKeyWithInnerKeys(class assembly/CompareMicroPerfAndCodeGenerationTests/Key, class [runtime]System.Tuple`2) IL_0021: stloc.1 @@ -1243,7 +1243,7 @@ IL_0032: call class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/Key::NewKey(int32, int32) IL_0037: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_003c: call class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::NewKeyWithInnerKeys(class assembly/CompareMicroPerfAndCodeGenerationTests/Key, class [runtime]System.Tuple`2) IL_0041: stloc.2 @@ -1283,97 +1283,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..26a07c912b1 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 @@ -56,21 +56,6 @@ .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 public static class assembly/CompareMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/CompareMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,53 +393,69 @@ IL_0013: ret } - .property instance int32 Tag() - { - .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 int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::get_Tag() - } - .property instance int32 Item1() + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::get_Item1() + + .maxstack 7 + .locals init (int32 V_0, + class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret } - .property instance int32 Item2() + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::get_Item2() + + .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/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret } - } - .class auto autochar serializable sealed nested public beforefieldinit KeyWithInnerKeys - extends [runtime]System.Object - implements class [runtime]System.IEquatable`1, - [runtime]System.Collections.IStructuralEquatable, - class [runtime]System.IComparable`1, - [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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) - .field assembly initonly class assembly/CompareMicroPerfAndCodeGenerationTests/Key item1 - .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 assembly initonly class [runtime]System.Tuple`2 item2 - .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 public static class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys NewKeyWithInnerKeys(class assembly/CompareMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) cil managed + .method public static class assembly/CompareMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 00 00 00 00 00 00 ) @@ -587,53 +465,57 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::.ctor(class assembly/CompareMicroPerfAndCodeGenerationTests/Key, - class [runtime]System.Tuple`2) + IL_0002: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) IL_0007: ret } - .method assembly specialname rtspecialname instance void .ctor(class assembly/CompareMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) cil managed + .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/CompareMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method assembly hidebysig specialname instance object __DebugDisplay() 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 41 43 6F 6D 70 61 72 65 31 30 - 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 - 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 - 6F 6E 54 65 73 74 73 2B 4B 65 79 57 69 74 68 49 - 6E 6E 65 72 4B 65 79 73 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() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Tuple`2 assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0014: ret + 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance class assembly/CompareMicroPerfAndCodeGenerationTests/Key get_Item1() cil managed + .method public hidebysig instance int32 get_Item1() 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 class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0001: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item1 IL_0006: ret } - .method public hidebysig instance class [runtime]System.Tuple`2 get_Item2() cil managed + .method public hidebysig instance int32 get_Item2() 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 class [runtime]System.Tuple`2 assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0001: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::item2 IL_0006: ret } @@ -649,31 +531,73 @@ IL_0003: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .property instance int32 Tag() { .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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + .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/CompareMicroPerfAndCodeGenerationTests/Key::get_Tag() + } + .property instance int32 Item1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::get_Item1() + } + .property instance int32 Item2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::get_Item2() } + } - .method public strict virtual instance string ToString() cil managed + .class auto autochar serializable sealed nested public beforefieldinit KeyWithInnerKeys + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field assembly initonly class assembly/CompareMicroPerfAndCodeGenerationTests/Key item1 + .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 assembly initonly class [runtime]System.Tuple`2 item2 + .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 assembly/CompareMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) 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 41 43 6F 6D 70 61 72 65 31 30 + 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 + 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 + 6F 6E 54 65 73 74 73 2B 4B 65 79 57 69 74 68 49 + 6E 6E 65 72 4B 65 79 73 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: 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/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Tuple`2 assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0014: ret } .method public hidebysig virtual final instance int32 CompareTo(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed @@ -905,94 +829,6 @@ IL_00a4: 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 7 - .locals init (int32 V_0, - class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, - class [runtime]System.Tuple`2 V_2, - class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_3, - class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_4, - int32 V_5) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0066 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld class [runtime]System.Tuple`2 assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0016: stloc.2 - IL_0017: ldloc.2 - IL_0018: call instance !0 class [runtime]System.Tuple`2::get_Item1() - IL_001d: stloc.3 - IL_001e: ldloc.2 - IL_001f: call instance !1 class [runtime]System.Tuple`2::get_Item2() - IL_0024: stloc.s V_4 - IL_0026: ldloc.3 - IL_0027: ldarg.1 - IL_0028: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_002d: stloc.s V_5 - IL_002f: ldloc.s V_5 - IL_0031: ldc.i4.5 - IL_0032: shl - IL_0033: ldloc.s V_5 - IL_0035: add - IL_0036: ldloc.s V_4 - IL_0038: ldarg.1 - IL_0039: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_003e: xor - IL_003f: ldloc.0 - IL_0040: ldc.i4.6 - IL_0041: shl - IL_0042: ldloc.0 - IL_0043: ldc.i4.2 - IL_0044: shr - IL_0045: add - IL_0046: add - IL_0047: add - IL_0048: stloc.0 - IL_0049: ldc.i4 0x9e3779b9 - IL_004e: ldloc.1 - IL_004f: ldfld class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0054: ldarg.1 - IL_0055: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_005a: ldloc.0 - IL_005b: ldc.i4.6 - IL_005c: shl - IL_005d: ldloc.0 - IL_005e: ldc.i4.2 - IL_005f: shr - IL_0060: add - IL_0061: add - IL_0062: add - IL_0063: stloc.0 - IL_0064: ldloc.0 - IL_0065: ret - - IL_0066: ldc.i4.0 - IL_0067: 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/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1174,6 +1010,170 @@ IL_0015: 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 7 + .locals init (int32 V_0, + class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, + class [runtime]System.Tuple`2 V_2, + class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_3, + class assembly/CompareMicroPerfAndCodeGenerationTests/Key V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0066 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld class [runtime]System.Tuple`2 assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: call instance !0 class [runtime]System.Tuple`2::get_Item1() + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: call instance !1 class [runtime]System.Tuple`2::get_Item2() + IL_0024: stloc.s V_4 + IL_0026: ldloc.3 + IL_0027: ldarg.1 + IL_0028: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_002d: stloc.s V_5 + IL_002f: ldloc.s V_5 + IL_0031: ldc.i4.5 + IL_0032: shl + IL_0033: ldloc.s V_5 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: ldarg.1 + IL_0039: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_003e: xor + IL_003f: ldloc.0 + IL_0040: ldc.i4.6 + IL_0041: shl + IL_0042: ldloc.0 + IL_0043: ldc.i4.2 + IL_0044: shr + IL_0045: add + IL_0046: add + IL_0047: add + IL_0048: stloc.0 + IL_0049: ldc.i4 0x9e3779b9 + IL_004e: ldloc.1 + IL_004f: ldfld class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0054: ldarg.1 + IL_0055: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_005a: ldloc.0 + IL_005b: ldc.i4.6 + IL_005c: shl + IL_005d: ldloc.0 + IL_005e: ldc.i4.2 + IL_005f: shr + IL_0060: add + IL_0061: add + IL_0062: add + IL_0063: stloc.0 + IL_0064: ldloc.0 + IL_0065: ret + + IL_0066: ldc.i4.0 + IL_0067: 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/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys NewKeyWithInnerKeys(class assembly/CompareMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::.ctor(class assembly/CompareMicroPerfAndCodeGenerationTests/Key, + class [runtime]System.Tuple`2) + IL_0007: 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/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance class assembly/CompareMicroPerfAndCodeGenerationTests/Key get_Item1() 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 class assembly/CompareMicroPerfAndCodeGenerationTests/Key assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0006: ret + } + + .method public hidebysig instance class [runtime]System.Tuple`2 get_Item2() 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 class [runtime]System.Tuple`2 assembly/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1287,4 +1287,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals04.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals04.fsx.il.net472.bsl index f9c150b01c1..355b53a923f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals04.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals04.fsx.il.net472.bsl @@ -46,7 +46,7 @@ [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 ) + 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 ) .field assembly initonly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -56,28 +56,13 @@ .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 public static class assembly/EqualsMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 32 45 71 75 61 6C 73 30 34 2B - 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 - 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E - 54 65 73 74 73 2B 4B 65 79 00 00 ) + .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 32 45 71 75 61 6C 73 30 34 2B + 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 + 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E + 54 65 73 74 73 2B 4B 65 79 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 ) @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/EqualsMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,6 +393,144 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: 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/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/EqualsMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) + IL_0007: 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/EqualsMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -617,97 +617,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..355b53a923f 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 @@ -56,21 +56,6 @@ .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 public static class assembly/EqualsMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/EqualsMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,6 +393,144 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: 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/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/EqualsMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) + IL_0007: 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/EqualsMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -621,4 +621,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.net472.bsl index a39724e32f4..d14914b844f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.net472.bsl @@ -62,37 +62,13 @@ .field assembly int32 key2@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_key1() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_key2() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0006: ret - } - - .method public specialname rtspecialname - instance void .ctor(int32 key1, - int32 key2) cil managed + .method public specialname rtspecialname instance void .ctor(int32 key1, int32 key2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 33 45 71 75 61 6C 73 30 35 2B - 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 - 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E - 54 65 73 74 73 2B 4B 65 79 52 00 00 ) + .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 33 45 71 75 61 6C 73 30 35 2B + 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 + 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E + 54 65 73 74 73 2B 4B 65 79 52 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -106,19 +82,6 @@ IL_0014: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/EqualsMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -206,9 +169,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -284,64 +245,7 @@ IL_005b: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -379,9 +283,7 @@ IL_002e: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -463,6 +365,96 @@ IL_0013: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_key1() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_key2() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0006: ret + } + .property instance int32 key1() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -535,99 +527,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname - instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, - class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..2a08ae82390 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 @@ -52,28 +52,6 @@ .field assembly int32 key2@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_key1() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_key2() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0006: ret - } - .method public specialname rtspecialname instance void .ctor(int32 key1, int32 key2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -94,19 +72,6 @@ IL_0014: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/EqualsMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -270,61 +235,6 @@ IL_005b: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -445,6 +355,96 @@ IL_0013: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_key1() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_key2() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0006: ret + } + .property instance int32 key1() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -521,4 +521,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals06.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals06.fsx.il.net472.bsl index ed916f9cdb1..8206a9639b6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals06.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals06.fsx.il.net472.bsl @@ -46,7 +46,7 @@ [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 ) + 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 ) .field assembly initonly !a item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -56,29 +56,14 @@ .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 public static class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 NewGenericKey(!a item1, !a item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::.ctor(!0, - !0) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(!a item1, !a item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 3B 45 71 75 61 6C 73 30 36 2B - 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 - 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E - 54 65 73 74 73 2B 47 65 6E 65 72 69 63 4B 65 79 - 60 31 00 00 ) + .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 3B 45 71 75 61 6C 73 30 36 2B + 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 + 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E + 54 65 73 74 73 2B 47 65 6E 65 72 69 63 4B 65 79 + 60 31 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 ) @@ -94,67 +79,6 @@ IL_0014: ret } - .method public hidebysig instance !a get_Item1() 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 !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0006: ret - } - - .method public hidebysig instance !a get_Item2() 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 !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_0015: ret - } - .method public hidebysig virtual final instance int32 CompareTo(class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,79 +257,6 @@ IL_0069: 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 7 - .locals init (int32 V_0, - class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, - !a V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0047 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0016: stloc.2 - IL_0017: ldarg.1 - IL_0018: ldloc.2 - IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_001e: ldloc.0 - IL_001f: ldc.i4.6 - IL_0020: shl - IL_0021: ldloc.0 - IL_0022: ldc.i4.2 - IL_0023: shr - IL_0024: add - IL_0025: add - IL_0026: add - IL_0027: stloc.0 - IL_0028: ldc.i4 0x9e3779b9 - IL_002d: ldloc.1 - IL_002e: ldfld !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0033: stloc.2 - IL_0034: ldarg.1 - IL_0035: ldloc.2 - IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_003b: ldloc.0 - IL_003c: ldc.i4.6 - IL_003d: shl - IL_003e: ldloc.0 - IL_003f: ldc.i4.2 - IL_0040: shr - IL_0041: add - IL_0042: add - IL_0043: add - IL_0044: stloc.0 - IL_0045: ldloc.0 - IL_0046: ret - - IL_0047: ldc.i4.0 - IL_0048: 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 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -576,6 +427,155 @@ IL_0015: 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 7 + .locals init (int32 V_0, + class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, + !a V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0047 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0016: stloc.2 + IL_0017: ldarg.1 + IL_0018: ldloc.2 + IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_001e: ldloc.0 + IL_001f: ldc.i4.6 + IL_0020: shl + IL_0021: ldloc.0 + IL_0022: ldc.i4.2 + IL_0023: shr + IL_0024: add + IL_0025: add + IL_0026: add + IL_0027: stloc.0 + IL_0028: ldc.i4 0x9e3779b9 + IL_002d: ldloc.1 + IL_002e: ldfld !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0033: stloc.2 + IL_0034: ldarg.1 + IL_0035: ldloc.2 + IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_003b: ldloc.0 + IL_003c: ldc.i4.6 + IL_003d: shl + IL_003e: ldloc.0 + IL_003f: ldc.i4.2 + IL_0040: shr + IL_0041: add + IL_0042: add + IL_0043: add + IL_0044: stloc.0 + IL_0045: ldloc.0 + IL_0046: ret + + IL_0047: ldc.i4.0 + IL_0048: 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 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 NewGenericKey(!a item1, !a item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::.ctor(!0, + !0) + IL_0007: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig instance !a get_Item1() 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 !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0006: ret + } + + .method public hidebysig instance !a get_Item2() 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 !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -662,97 +662,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..8206a9639b6 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 @@ -56,21 +56,6 @@ .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 public static class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 NewGenericKey(!a item1, !a item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::.ctor(!0, - !0) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(!a item1, !a item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -94,67 +79,6 @@ IL_0014: ret } - .method public hidebysig instance !a get_Item1() 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 !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0006: ret - } - - .method public hidebysig instance !a get_Item2() 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 !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_0015: ret - } - .method public hidebysig virtual final instance int32 CompareTo(class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,79 +257,6 @@ IL_0069: 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 7 - .locals init (int32 V_0, - class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, - !a V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0047 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0016: stloc.2 - IL_0017: ldarg.1 - IL_0018: ldloc.2 - IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_001e: ldloc.0 - IL_001f: ldc.i4.6 - IL_0020: shl - IL_0021: ldloc.0 - IL_0022: ldc.i4.2 - IL_0023: shr - IL_0024: add - IL_0025: add - IL_0026: add - IL_0027: stloc.0 - IL_0028: ldc.i4 0x9e3779b9 - IL_002d: ldloc.1 - IL_002e: ldfld !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0033: stloc.2 - IL_0034: ldarg.1 - IL_0035: ldloc.2 - IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_003b: ldloc.0 - IL_003c: ldc.i4.6 - IL_003d: shl - IL_003e: ldloc.0 - IL_003f: ldc.i4.2 - IL_0040: shr - IL_0041: add - IL_0042: add - IL_0043: add - IL_0044: stloc.0 - IL_0045: ldloc.0 - IL_0046: ret - - IL_0047: ldc.i4.0 - IL_0048: 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 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -576,6 +427,155 @@ IL_0015: 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 7 + .locals init (int32 V_0, + class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, + !a V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0047 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0016: stloc.2 + IL_0017: ldarg.1 + IL_0018: ldloc.2 + IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_001e: ldloc.0 + IL_001f: ldc.i4.6 + IL_0020: shl + IL_0021: ldloc.0 + IL_0022: ldc.i4.2 + IL_0023: shr + IL_0024: add + IL_0025: add + IL_0026: add + IL_0027: stloc.0 + IL_0028: ldc.i4 0x9e3779b9 + IL_002d: ldloc.1 + IL_002e: ldfld !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0033: stloc.2 + IL_0034: ldarg.1 + IL_0035: ldloc.2 + IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_003b: ldloc.0 + IL_003c: ldc.i4.6 + IL_003d: shl + IL_003e: ldloc.0 + IL_003f: ldc.i4.2 + IL_0040: shr + IL_0041: add + IL_0042: add + IL_0043: add + IL_0044: stloc.0 + IL_0045: ldloc.0 + IL_0046: ret + + IL_0047: ldc.i4.0 + IL_0048: 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 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 NewGenericKey(!a item1, !a item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::.ctor(!0, + !0) + IL_0007: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig instance !a get_Item1() 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 !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0006: ret + } + + .method public hidebysig instance !a get_Item2() 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 !0 class assembly/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -666,4 +666,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals09.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals09.fsx.il.net472.bsl index c4237b4a4a4..9433977efe6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals09.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals09.fsx.il.net472.bsl @@ -46,7 +46,7 @@ [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 ) + 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 ) .field assembly initonly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -56,28 +56,13 @@ .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 public static class assembly/EqualsMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 32 45 71 75 61 6C 73 30 39 2B - 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 - 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E - 54 65 73 74 73 2B 4B 65 79 00 00 ) + .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 32 45 71 75 61 6C 73 30 39 2B + 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 + 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E + 54 65 73 74 73 2B 4B 65 79 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 ) @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/EqualsMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,53 +393,69 @@ IL_0013: ret } - .property instance int32 Tag() - { - .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 int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::get_Tag() - } - .property instance int32 Item1() + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::get_Item1() + + .maxstack 7 + .locals init (int32 V_0, + class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret } - .property instance int32 Item2() + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::get_Item2() + + .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/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret } - } - .class auto autochar serializable sealed nested public beforefieldinit KeyWithInnerKeys - extends [runtime]System.Object - implements class [runtime]System.IEquatable`1, - [runtime]System.Collections.IStructuralEquatable, - class [runtime]System.IComparable`1, - [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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) - .field assembly initonly class assembly/EqualsMicroPerfAndCodeGenerationTests/Key item1 - .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 assembly initonly class [runtime]System.Tuple`2 item2 - .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 public static class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys NewKeyWithInnerKeys(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) cil managed + .method public static class assembly/EqualsMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 00 00 00 00 00 00 ) @@ -587,53 +465,57 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::.ctor(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key, - class [runtime]System.Tuple`2) + IL_0002: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) IL_0007: ret } - .method assembly specialname rtspecialname instance void .ctor(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) cil managed + .method public strict virtual instance string ToString() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 3F 45 71 75 61 6C 73 30 39 2B - 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 - 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E - 54 65 73 74 73 2B 4B 65 79 57 69 74 68 49 6E 6E - 65 72 4B 65 79 73 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() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Tuple`2 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0014: ret + 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/EqualsMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance class assembly/EqualsMicroPerfAndCodeGenerationTests/Key get_Item1() cil managed + .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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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 class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item1 IL_0006: ret } - .method public hidebysig instance class [runtime]System.Tuple`2 get_Item2() cil managed + .method public hidebysig instance int32 get_Item2() 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 class [runtime]System.Tuple`2 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item2 IL_0006: ret } @@ -649,31 +531,73 @@ IL_0003: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .property instance int32 Tag() { .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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + .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/EqualsMicroPerfAndCodeGenerationTests/Key::get_Tag() + } + .property instance int32 Item1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::get_Item1() + } + .property instance int32 Item2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::get_Item2() } + } - .method public strict virtual instance string ToString() cil managed + .class auto autochar serializable sealed nested public beforefieldinit KeyWithInnerKeys + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field assembly initonly class assembly/EqualsMicroPerfAndCodeGenerationTests/Key item1 + .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 assembly initonly class [runtime]System.Tuple`2 item2 + .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 assembly/EqualsMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) 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 3F 45 71 75 61 6C 73 30 39 2B + 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 + 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E + 54 65 73 74 73 2B 4B 65 79 57 69 74 68 49 6E 6E + 65 72 4B 65 79 73 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: 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/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Tuple`2 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0014: ret } .method public hidebysig virtual final instance int32 CompareTo(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed @@ -905,94 +829,6 @@ IL_00a4: 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 7 - .locals init (int32 V_0, - class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, - class [runtime]System.Tuple`2 V_2, - class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_3, - class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_4, - int32 V_5) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0066 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld class [runtime]System.Tuple`2 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0016: stloc.2 - IL_0017: ldloc.2 - IL_0018: call instance !0 class [runtime]System.Tuple`2::get_Item1() - IL_001d: stloc.3 - IL_001e: ldloc.2 - IL_001f: call instance !1 class [runtime]System.Tuple`2::get_Item2() - IL_0024: stloc.s V_4 - IL_0026: ldloc.3 - IL_0027: ldarg.1 - IL_0028: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_002d: stloc.s V_5 - IL_002f: ldloc.s V_5 - IL_0031: ldc.i4.5 - IL_0032: shl - IL_0033: ldloc.s V_5 - IL_0035: add - IL_0036: ldloc.s V_4 - IL_0038: ldarg.1 - IL_0039: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_003e: xor - IL_003f: ldloc.0 - IL_0040: ldc.i4.6 - IL_0041: shl - IL_0042: ldloc.0 - IL_0043: ldc.i4.2 - IL_0044: shr - IL_0045: add - IL_0046: add - IL_0047: add - IL_0048: stloc.0 - IL_0049: ldc.i4 0x9e3779b9 - IL_004e: ldloc.1 - IL_004f: ldfld class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0054: ldarg.1 - IL_0055: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_005a: ldloc.0 - IL_005b: ldc.i4.6 - IL_005c: shl - IL_005d: ldloc.0 - IL_005e: ldc.i4.2 - IL_005f: shr - IL_0060: add - IL_0061: add - IL_0062: add - IL_0063: stloc.0 - IL_0064: ldloc.0 - IL_0065: ret - - IL_0066: ldc.i4.0 - IL_0067: 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/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1135,7 +971,7 @@ IL_0026: ldfld class [runtime]System.Tuple`2 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 IL_002b: tail. IL_002d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, - !!0) + !!0) IL_0032: ret IL_0033: ldc.i4.0 @@ -1174,6 +1010,170 @@ IL_0015: 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 7 + .locals init (int32 V_0, + class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, + class [runtime]System.Tuple`2 V_2, + class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_3, + class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0066 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld class [runtime]System.Tuple`2 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: call instance !0 class [runtime]System.Tuple`2::get_Item1() + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: call instance !1 class [runtime]System.Tuple`2::get_Item2() + IL_0024: stloc.s V_4 + IL_0026: ldloc.3 + IL_0027: ldarg.1 + IL_0028: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_002d: stloc.s V_5 + IL_002f: ldloc.s V_5 + IL_0031: ldc.i4.5 + IL_0032: shl + IL_0033: ldloc.s V_5 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: ldarg.1 + IL_0039: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_003e: xor + IL_003f: ldloc.0 + IL_0040: ldc.i4.6 + IL_0041: shl + IL_0042: ldloc.0 + IL_0043: ldc.i4.2 + IL_0044: shr + IL_0045: add + IL_0046: add + IL_0047: add + IL_0048: stloc.0 + IL_0049: ldc.i4 0x9e3779b9 + IL_004e: ldloc.1 + IL_004f: ldfld class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0054: ldarg.1 + IL_0055: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_005a: ldloc.0 + IL_005b: ldc.i4.6 + IL_005c: shl + IL_005d: ldloc.0 + IL_005e: ldc.i4.2 + IL_005f: shr + IL_0060: add + IL_0061: add + IL_0062: add + IL_0063: stloc.0 + IL_0064: ldloc.0 + IL_0065: ret + + IL_0066: ldc.i4.0 + IL_0067: 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/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys NewKeyWithInnerKeys(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::.ctor(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key, + class [runtime]System.Tuple`2) + IL_0007: 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/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance class assembly/EqualsMicroPerfAndCodeGenerationTests/Key get_Item1() 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 class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0006: ret + } + + .method public hidebysig instance class [runtime]System.Tuple`2 get_Item2() 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 class [runtime]System.Tuple`2 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1226,7 +1226,7 @@ IL_0012: call class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/Key::NewKey(int32, int32) IL_0017: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_001c: call class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::NewKeyWithInnerKeys(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key, class [runtime]System.Tuple`2) IL_0021: stloc.1 @@ -1243,7 +1243,7 @@ IL_0032: call class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/Key::NewKey(int32, int32) IL_0037: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_003c: call class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::NewKeyWithInnerKeys(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key, class [runtime]System.Tuple`2) IL_0041: stloc.2 @@ -1285,97 +1285,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..9433977efe6 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 @@ -56,21 +56,6 @@ .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 public static class assembly/EqualsMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/EqualsMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,53 +393,69 @@ IL_0013: ret } - .property instance int32 Tag() - { - .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 int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::get_Tag() - } - .property instance int32 Item1() + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::get_Item1() + + .maxstack 7 + .locals init (int32 V_0, + class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret } - .property instance int32 Item2() + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::get_Item2() + + .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/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret } - } - .class auto autochar serializable sealed nested public beforefieldinit KeyWithInnerKeys - extends [runtime]System.Object - implements class [runtime]System.IEquatable`1, - [runtime]System.Collections.IStructuralEquatable, - class [runtime]System.IComparable`1, - [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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) - .field assembly initonly class assembly/EqualsMicroPerfAndCodeGenerationTests/Key item1 - .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 assembly initonly class [runtime]System.Tuple`2 item2 - .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 public static class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys NewKeyWithInnerKeys(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) cil managed + .method public static class assembly/EqualsMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 00 00 00 00 00 00 ) @@ -587,53 +465,57 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::.ctor(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key, - class [runtime]System.Tuple`2) + IL_0002: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) IL_0007: ret } - .method assembly specialname rtspecialname instance void .ctor(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) cil managed + .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/EqualsMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method assembly hidebysig specialname instance object __DebugDisplay() 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 3F 45 71 75 61 6C 73 30 39 2B - 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 - 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E - 54 65 73 74 73 2B 4B 65 79 57 69 74 68 49 6E 6E - 65 72 4B 65 79 73 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() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Tuple`2 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0014: ret + 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance class assembly/EqualsMicroPerfAndCodeGenerationTests/Key get_Item1() cil managed + .method public hidebysig instance int32 get_Item1() 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 class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item1 IL_0006: ret } - .method public hidebysig instance class [runtime]System.Tuple`2 get_Item2() cil managed + .method public hidebysig instance int32 get_Item2() 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 class [runtime]System.Tuple`2 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::item2 IL_0006: ret } @@ -649,31 +531,73 @@ IL_0003: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .property instance int32 Tag() { .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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + .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/EqualsMicroPerfAndCodeGenerationTests/Key::get_Tag() + } + .property instance int32 Item1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::get_Item1() + } + .property instance int32 Item2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::get_Item2() } + } - .method public strict virtual instance string ToString() cil managed + .class auto autochar serializable sealed nested public beforefieldinit KeyWithInnerKeys + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field assembly initonly class assembly/EqualsMicroPerfAndCodeGenerationTests/Key item1 + .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 assembly initonly class [runtime]System.Tuple`2 item2 + .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 assembly/EqualsMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) 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 3F 45 71 75 61 6C 73 30 39 2B + 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 + 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E + 54 65 73 74 73 2B 4B 65 79 57 69 74 68 49 6E 6E + 65 72 4B 65 79 73 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: 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/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Tuple`2 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0014: ret } .method public hidebysig virtual final instance int32 CompareTo(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed @@ -905,94 +829,6 @@ IL_00a4: 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 7 - .locals init (int32 V_0, - class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, - class [runtime]System.Tuple`2 V_2, - class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_3, - class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_4, - int32 V_5) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0066 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld class [runtime]System.Tuple`2 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0016: stloc.2 - IL_0017: ldloc.2 - IL_0018: call instance !0 class [runtime]System.Tuple`2::get_Item1() - IL_001d: stloc.3 - IL_001e: ldloc.2 - IL_001f: call instance !1 class [runtime]System.Tuple`2::get_Item2() - IL_0024: stloc.s V_4 - IL_0026: ldloc.3 - IL_0027: ldarg.1 - IL_0028: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_002d: stloc.s V_5 - IL_002f: ldloc.s V_5 - IL_0031: ldc.i4.5 - IL_0032: shl - IL_0033: ldloc.s V_5 - IL_0035: add - IL_0036: ldloc.s V_4 - IL_0038: ldarg.1 - IL_0039: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_003e: xor - IL_003f: ldloc.0 - IL_0040: ldc.i4.6 - IL_0041: shl - IL_0042: ldloc.0 - IL_0043: ldc.i4.2 - IL_0044: shr - IL_0045: add - IL_0046: add - IL_0047: add - IL_0048: stloc.0 - IL_0049: ldc.i4 0x9e3779b9 - IL_004e: ldloc.1 - IL_004f: ldfld class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0054: ldarg.1 - IL_0055: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_005a: ldloc.0 - IL_005b: ldc.i4.6 - IL_005c: shl - IL_005d: ldloc.0 - IL_005e: ldc.i4.2 - IL_005f: shr - IL_0060: add - IL_0061: add - IL_0062: add - IL_0063: stloc.0 - IL_0064: ldloc.0 - IL_0065: ret - - IL_0066: ldc.i4.0 - IL_0067: 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/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1174,6 +1010,170 @@ IL_0015: 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 7 + .locals init (int32 V_0, + class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, + class [runtime]System.Tuple`2 V_2, + class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_3, + class assembly/EqualsMicroPerfAndCodeGenerationTests/Key V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0066 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld class [runtime]System.Tuple`2 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: call instance !0 class [runtime]System.Tuple`2::get_Item1() + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: call instance !1 class [runtime]System.Tuple`2::get_Item2() + IL_0024: stloc.s V_4 + IL_0026: ldloc.3 + IL_0027: ldarg.1 + IL_0028: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_002d: stloc.s V_5 + IL_002f: ldloc.s V_5 + IL_0031: ldc.i4.5 + IL_0032: shl + IL_0033: ldloc.s V_5 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: ldarg.1 + IL_0039: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_003e: xor + IL_003f: ldloc.0 + IL_0040: ldc.i4.6 + IL_0041: shl + IL_0042: ldloc.0 + IL_0043: ldc.i4.2 + IL_0044: shr + IL_0045: add + IL_0046: add + IL_0047: add + IL_0048: stloc.0 + IL_0049: ldc.i4 0x9e3779b9 + IL_004e: ldloc.1 + IL_004f: ldfld class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0054: ldarg.1 + IL_0055: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_005a: ldloc.0 + IL_005b: ldc.i4.6 + IL_005c: shl + IL_005d: ldloc.0 + IL_005e: ldc.i4.2 + IL_005f: shr + IL_0060: add + IL_0061: add + IL_0062: add + IL_0063: stloc.0 + IL_0064: ldloc.0 + IL_0065: ret + + IL_0066: ldc.i4.0 + IL_0067: 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/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys NewKeyWithInnerKeys(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::.ctor(class assembly/EqualsMicroPerfAndCodeGenerationTests/Key, + class [runtime]System.Tuple`2) + IL_0007: 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/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance class assembly/EqualsMicroPerfAndCodeGenerationTests/Key get_Item1() 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 class assembly/EqualsMicroPerfAndCodeGenerationTests/Key assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0006: ret + } + + .method public hidebysig instance class [runtime]System.Tuple`2 get_Item2() 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 class [runtime]System.Tuple`2 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1289,4 +1289,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals10.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals10.fsx.il.net472.bsl index ddba224b6d7..642c9ac7a12 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals10.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals10.fsx.il.net472.bsl @@ -59,6 +59,19 @@ .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 assembly int32 v .field assembly int32 u + .method public specialname rtspecialname instance void .ctor(int32 v, int32 u) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u + IL_000e: ret + } + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -128,9 +141,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -186,58 +197,7 @@ IL_0044: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldc.i4 0x9e3779b9 - IL_001c: ldarg.0 - IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0022: ldloc.0 - IL_0023: ldc.i4.6 - IL_0024: shl - IL_0025: ldloc.0 - IL_0026: ldc.i4.2 - IL_0027: shr - IL_0028: add - IL_0029: add - IL_002a: add - IL_002b: stloc.0 - IL_002c: ldloc.0 - IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -259,9 +219,7 @@ IL_0020: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -285,39 +243,6 @@ IL_0019: ret } - .method public specialname rtspecialname - instance void .ctor(int32 v, - int32 u) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0007: ldarg.0 - IL_0008: ldarg.2 - IL_0009: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u - IL_000e: ret - } - - .method public hidebysig specialname instance int32 get_V() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_U() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u - IL_0006: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -359,6 +284,73 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldc.i4 0x9e3779b9 + IL_001c: ldarg.0 + IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0022: ldloc.0 + IL_0023: ldc.i4.6 + IL_0024: shl + IL_0025: ldloc.0 + IL_0026: ldc.i4.2 + IL_0027: shr + IL_0028: add + IL_0029: add + IL_002a: add + IL_002b: stloc.0 + IL_002c: ldloc.0 + IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_U() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_V() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0006: ret + } + .property instance int32 V() { .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::get_V() @@ -375,6 +367,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 { @@ -399,17 +402,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 { @@ -495,4 +487,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..830cdb6eebc 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 @@ -49,6 +49,19 @@ .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 assembly int32 v .field assembly int32 u + .method public specialname rtspecialname instance void .ctor(int32 v, int32 u) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u + IL_000e: ret + } + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -174,55 +187,6 @@ IL_0044: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldc.i4 0x9e3779b9 - IL_001c: ldarg.0 - IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0022: ldloc.0 - IL_0023: ldc.i4.6 - IL_0024: shl - IL_0025: ldloc.0 - IL_0026: ldc.i4.2 - IL_0027: shr - IL_0028: add - IL_0029: add - IL_002a: add - IL_002b: stloc.0 - IL_002c: ldloc.0 - IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -269,37 +233,6 @@ IL_0019: ret } - .method public specialname rtspecialname instance void .ctor(int32 v, int32 u) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0007: ldarg.0 - IL_0008: ldarg.2 - IL_0009: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u - IL_000e: ret - } - - .method public hidebysig specialname instance int32 get_V() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_U() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u - IL_0006: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -341,6 +274,73 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldc.i4 0x9e3779b9 + IL_001c: ldarg.0 + IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0022: ldloc.0 + IL_0023: ldc.i4.6 + IL_0024: shl + IL_0025: ldloc.0 + IL_0026: ldc.i4.2 + IL_0027: shr + IL_0028: add + IL_0029: add + IL_002a: add + IL_002b: stloc.0 + IL_002c: ldloc.0 + IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_U() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_V() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0006: ret + } + .property instance int32 V() { .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::get_V() @@ -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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals11.fsx.il.net472.bsl index abaef1b1e97..2eb8295ad99 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals11.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals11.fsx.il.net472.bsl @@ -47,7 +47,7 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 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 ) + 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 ) .field assembly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -57,90 +57,6 @@ .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 public static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion NewSomeUnion(int32 item1, int32 item2) 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 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 3 - .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0008: ldloca.s V_0 - IL_000a: ldarg.0 - IL_000b: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 - IL_0010: ldloca.s V_0 - IL_0012: ldarg.1 - IL_0013: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 - IL_0018: ldloc.0 - IL_0019: ret - } - - .method public hidebysig instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -270,59 +186,6 @@ IL_0046: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: pop - IL_0004: ldc.i4.0 - IL_0005: stloc.0 - IL_0006: ldc.i4 0x9e3779b9 - IL_000b: ldarg.0 - IL_000c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 - IL_0011: ldloc.0 - IL_0012: ldc.i4.6 - IL_0013: shl - IL_0014: ldloc.0 - IL_0015: ldc.i4.2 - IL_0016: shr - IL_0017: add - IL_0018: add - IL_0019: add - IL_001a: stloc.0 - IL_001b: ldc.i4 0x9e3779b9 - IL_0020: ldarg.0 - IL_0021: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 - IL_0026: ldloc.0 - IL_0027: ldc.i4.6 - IL_0028: shl - IL_0029: ldloc.0 - IL_002a: ldc.i4.2 - IL_002b: shr - IL_002c: add - IL_002d: add - IL_002e: add - IL_002f: stloc.0 - IL_0030: ldloc.0 - IL_0031: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -414,6 +277,143 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: pop + IL_0004: ldc.i4.0 + IL_0005: stloc.0 + IL_0006: ldc.i4 0x9e3779b9 + IL_000b: ldarg.0 + IL_000c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 + IL_0011: ldloc.0 + IL_0012: ldc.i4.6 + IL_0013: shl + IL_0014: ldloc.0 + IL_0015: ldc.i4.2 + IL_0016: shr + IL_0017: add + IL_0018: add + IL_0019: add + IL_001a: stloc.0 + IL_001b: ldc.i4 0x9e3779b9 + IL_0020: ldarg.0 + IL_0021: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 + IL_0026: ldloc.0 + IL_0027: ldc.i4.6 + IL_0028: shl + IL_0029: ldloc.0 + IL_002a: ldc.i4.2 + IL_002b: shr + IL_002c: add + IL_002d: add + IL_002e: add + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion NewSomeUnion(int32 item1, int32 item2) 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 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 3 + .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion V_0) + IL_0000: ldloca.s V_0 + IL_0002: initobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0008: ldloca.s V_0 + IL_000a: ldarg.0 + IL_000b: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 + IL_0010: ldloca.s V_0 + IL_0012: ldarg.1 + IL_0013: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 + IL_0018: ldloc.0 + IL_0019: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -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/Equals11.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals11.fsx.il.netcore.bsl index 00bdf966b88..2eb8295ad99 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 @@ -57,90 +57,6 @@ .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 public static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion NewSomeUnion(int32 item1, int32 item2) 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 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 3 - .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0008: ldloca.s V_0 - IL_000a: ldarg.0 - IL_000b: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 - IL_0010: ldloca.s V_0 - IL_0012: ldarg.1 - IL_0013: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 - IL_0018: ldloc.0 - IL_0019: ret - } - - .method public hidebysig instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -270,59 +186,6 @@ IL_0046: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: pop - IL_0004: ldc.i4.0 - IL_0005: stloc.0 - IL_0006: ldc.i4 0x9e3779b9 - IL_000b: ldarg.0 - IL_000c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 - IL_0011: ldloc.0 - IL_0012: ldc.i4.6 - IL_0013: shl - IL_0014: ldloc.0 - IL_0015: ldc.i4.2 - IL_0016: shr - IL_0017: add - IL_0018: add - IL_0019: add - IL_001a: stloc.0 - IL_001b: ldc.i4 0x9e3779b9 - IL_0020: ldarg.0 - IL_0021: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 - IL_0026: ldloc.0 - IL_0027: ldc.i4.6 - IL_0028: shl - IL_0029: ldloc.0 - IL_002a: ldc.i4.2 - IL_002b: shr - IL_002c: add - IL_002d: add - IL_002e: add - IL_002f: stloc.0 - IL_0030: ldloc.0 - IL_0031: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -414,6 +277,143 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: pop + IL_0004: ldc.i4.0 + IL_0005: stloc.0 + IL_0006: ldc.i4 0x9e3779b9 + IL_000b: ldarg.0 + IL_000c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 + IL_0011: ldloc.0 + IL_0012: ldc.i4.6 + IL_0013: shl + IL_0014: ldloc.0 + IL_0015: ldc.i4.2 + IL_0016: shr + IL_0017: add + IL_0018: add + IL_0019: add + IL_001a: stloc.0 + IL_001b: ldc.i4 0x9e3779b9 + IL_0020: ldarg.0 + IL_0021: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 + IL_0026: ldloc.0 + IL_0027: ldc.i4.6 + IL_0028: shl + IL_0029: ldloc.0 + IL_002a: ldc.i4.2 + IL_002b: shr + IL_002c: add + IL_002d: add + IL_002e: add + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion NewSomeUnion(int32 item1, int32 item2) 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 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 3 + .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion V_0) + IL_0000: ldloca.s V_0 + IL_0002: initobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0008: ldloca.s V_0 + IL_000a: ldarg.0 + IL_000b: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 + IL_0010: ldloca.s V_0 + IL_0012: ldarg.1 + IL_0013: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 + IL_0018: ldloc.0 + IL_0019: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals12.fsx.il.net472.bsl index 79e187f8045..97a92608916 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals12.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals12.fsx.il.net472.bsl @@ -63,40 +63,14 @@ .field assembly int32 U@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_V() cil managed + .method public specialname rtspecialname instance void .ctor(int32 v, int32 u) cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_U() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ - IL_0006: ret - } - - .method public specialname rtspecialname - instance void .ctor(int32 v, - int32 u) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 39 45 71 75 61 6C 73 31 32 2B - 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 - 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E - 54 65 73 74 73 2B 53 6F 6D 65 52 65 63 6F 72 64 - 00 00 ) + .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 39 45 71 75 61 6C 73 31 32 2B + 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 + 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E + 54 65 73 74 73 2B 53 6F 6D 65 52 65 63 6F 72 64 + 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -108,20 +82,6 @@ IL_000e: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -191,9 +151,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -249,58 +207,7 @@ IL_0044: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldc.i4 0x9e3779b9 - IL_001c: ldarg.0 - IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ - IL_0022: ldloc.0 - IL_0023: ldc.i4.6 - IL_0024: shl - IL_0025: ldloc.0 - IL_0026: ldc.i4.2 - IL_0027: shr - IL_0028: add - IL_0029: add - IL_002a: add - IL_002b: stloc.0 - IL_002c: ldloc.0 - IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -322,9 +229,7 @@ IL_0020: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -389,6 +294,93 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldc.i4 0x9e3779b9 + IL_001c: ldarg.0 + IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ + IL_0022: ldloc.0 + IL_0023: ldc.i4.6 + IL_0024: shl + IL_0025: ldloc.0 + IL_0026: ldc.i4.2 + IL_0027: shr + IL_0028: add + IL_0029: add + IL_002a: add + IL_002b: stloc.0 + IL_002c: ldloc.0 + IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig specialname instance int32 get_U() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_V() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ + IL_0006: ret + } + .property instance int32 V() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -409,6 +401,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 { @@ -433,17 +436,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 { @@ -525,99 +517,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname - instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, - class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..d4f2d8ce6b7 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 @@ -53,30 +53,6 @@ .field assembly int32 U@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_V() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_U() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ - IL_0006: ret - } - .method public specialname rtspecialname instance void .ctor(int32 v, int32 u) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -96,20 +72,6 @@ IL_000e: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -235,55 +197,6 @@ IL_0044: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldc.i4 0x9e3779b9 - IL_001c: ldarg.0 - IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ - IL_0022: ldloc.0 - IL_0023: ldc.i4.6 - IL_0024: shl - IL_0025: ldloc.0 - IL_0026: ldc.i4.2 - IL_0027: shr - IL_0028: add - IL_0029: add - IL_002a: add - IL_002b: stloc.0 - IL_002c: ldloc.0 - IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -371,6 +284,93 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldc.i4 0x9e3779b9 + IL_001c: ldarg.0 + IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ + IL_0022: ldloc.0 + IL_0023: ldc.i4.6 + IL_0024: shl + IL_0025: ldloc.0 + IL_0026: ldc.i4.2 + IL_0027: shr + IL_0028: add + IL_0029: add + IL_002a: add + IL_002b: stloc.0 + IL_002c: ldloc.0 + IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig specialname instance int32 get_U() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_V() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ + IL_0006: ret + } + .property instance int32 V() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals13.fsx.il.net472.bsl index ba50ab489ea..f2d3dd18985 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals13.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals13.fsx.il.net472.bsl @@ -59,6 +59,19 @@ .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 assembly !T v .field assembly int32 u + .method public specialname rtspecialname instance void .ctor(!T v, int32 u) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::v + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::u + IL_000e: ret + } + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -129,9 +142,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -188,64 +199,7 @@ IL_0049: 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 7 - .locals init (int32 V_0, - !T V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::u - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldc.i4 0x9e3779b9 - IL_001c: ldarg.0 - IL_001d: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::v - IL_0022: stloc.1 - IL_0023: ldarg.1 - IL_0024: ldloc.1 - IL_0025: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_002a: ldloc.0 - IL_002b: ldc.i4.6 - IL_002c: shl - IL_002d: ldloc.0 - IL_002e: ldc.i4.2 - IL_002f: shr - IL_0030: add - IL_0031: add - IL_0032: add - IL_0033: stloc.0 - IL_0034: ldloc.0 - IL_0035: 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: call instance int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1 obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -277,9 +231,7 @@ IL_002a: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -303,39 +255,6 @@ IL_0019: ret } - .method public specialname rtspecialname - instance void .ctor(!T v, - int32 u) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::v - IL_0007: ldarg.0 - IL_0008: ldarg.2 - IL_0009: stfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::u - IL_000e: ret - } - - .method public hidebysig specialname instance !T get_V() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::v - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_U() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::u - IL_0006: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -385,6 +304,79 @@ IL_0016: 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 7 + .locals init (int32 V_0, + !T V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::u + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldc.i4 0x9e3779b9 + IL_001c: ldarg.0 + IL_001d: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::v + IL_0022: stloc.1 + IL_0023: ldarg.1 + IL_0024: ldloc.1 + IL_0025: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_002a: ldloc.0 + IL_002b: ldc.i4.6 + IL_002c: shl + IL_002d: ldloc.0 + IL_002e: ldc.i4.2 + IL_002f: shr + IL_0030: add + IL_0031: add + IL_0032: add + IL_0033: stloc.0 + IL_0034: ldloc.0 + IL_0035: 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: call instance int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_U() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::u + IL_0006: ret + } + + .method public hidebysig specialname instance !T get_V() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::v + IL_0006: ret + } + .property instance !T V() { .get instance !T assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::get_V() @@ -401,6 +393,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 { @@ -425,17 +428,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 { @@ -521,4 +513,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..b66fd15c168 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 @@ -49,6 +49,19 @@ .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 assembly !T v .field assembly int32 u + .method public specialname rtspecialname instance void .ctor(!T v, int32 u) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::v + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::u + IL_000e: ret + } + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -176,61 +189,6 @@ IL_0049: 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 7 - .locals init (int32 V_0, - !T V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::u - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldc.i4 0x9e3779b9 - IL_001c: ldarg.0 - IL_001d: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::v - IL_0022: stloc.1 - IL_0023: ldarg.1 - IL_0024: ldloc.1 - IL_0025: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_002a: ldloc.0 - IL_002b: ldc.i4.6 - IL_002c: shl - IL_002d: ldloc.0 - IL_002e: ldc.i4.2 - IL_002f: shr - IL_0030: add - IL_0031: add - IL_0032: add - IL_0033: stloc.0 - IL_0034: ldloc.0 - IL_0035: 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: call instance int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -287,37 +245,6 @@ IL_0019: ret } - .method public specialname rtspecialname instance void .ctor(!T v, int32 u) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::v - IL_0007: ldarg.0 - IL_0008: ldarg.2 - IL_0009: stfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::u - IL_000e: ret - } - - .method public hidebysig specialname instance !T get_V() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::v - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_U() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::u - IL_0006: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -367,6 +294,79 @@ IL_0016: 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 7 + .locals init (int32 V_0, + !T V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::u + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldc.i4 0x9e3779b9 + IL_001c: ldarg.0 + IL_001d: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::v + IL_0022: stloc.1 + IL_0023: ldarg.1 + IL_0024: ldloc.1 + IL_0025: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_002a: ldloc.0 + IL_002b: ldc.i4.6 + IL_002c: shl + IL_002d: ldloc.0 + IL_002e: ldc.i4.2 + IL_002f: shr + IL_0030: add + IL_0031: add + IL_0032: add + IL_0033: stloc.0 + IL_0034: ldloc.0 + IL_0035: 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: call instance int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_U() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::u + IL_0006: ret + } + + .method public hidebysig specialname instance !T get_V() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::v + IL_0006: ret + } + .property instance !T V() { .get instance !T assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1::get_V() @@ -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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals14.fsx.il.net472.bsl index c8d6dbb2dfd..ebf0e2abebe 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals14.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals14.fsx.il.net472.bsl @@ -47,7 +47,7 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 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 ) + 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 ) .field assembly !T item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -57,90 +57,6 @@ .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 public static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 NewSomeGenericUnion(!T item1, int32 item2) 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 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 3 - .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 - IL_0008: ldloca.s V_0 - IL_000a: ldarg.0 - IL_000b: stfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item1 - IL_0010: ldloca.s V_0 - IL_0012: ldarg.1 - IL_0013: stfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item2 - IL_0018: ldloc.0 - IL_0019: ret - } - - .method public hidebysig instance !T get_Item1() 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 !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_001a: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -272,65 +188,6 @@ IL_004b: 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 7 - .locals init (int32 V_0, - !T V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: pop - IL_0004: ldc.i4.0 - IL_0005: stloc.0 - IL_0006: ldc.i4 0x9e3779b9 - IL_000b: ldarg.0 - IL_000c: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item2 - IL_0011: ldloc.0 - IL_0012: ldc.i4.6 - IL_0013: shl - IL_0014: ldloc.0 - IL_0015: ldc.i4.2 - IL_0016: shr - IL_0017: add - IL_0018: add - IL_0019: add - IL_001a: stloc.0 - IL_001b: ldc.i4 0x9e3779b9 - IL_0020: ldarg.0 - IL_0021: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item1 - IL_0026: stloc.1 - IL_0027: ldarg.1 - IL_0028: ldloc.1 - IL_0029: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add - IL_0035: add - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: 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: call instance int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -440,6 +297,149 @@ IL_0016: 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 7 + .locals init (int32 V_0, + !T V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: pop + IL_0004: ldc.i4.0 + IL_0005: stloc.0 + IL_0006: ldc.i4 0x9e3779b9 + IL_000b: ldarg.0 + IL_000c: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item2 + IL_0011: ldloc.0 + IL_0012: ldc.i4.6 + IL_0013: shl + IL_0014: ldloc.0 + IL_0015: ldc.i4.2 + IL_0016: shr + IL_0017: add + IL_0018: add + IL_0019: add + IL_001a: stloc.0 + IL_001b: ldc.i4 0x9e3779b9 + IL_0020: ldarg.0 + IL_0021: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item1 + IL_0026: stloc.1 + IL_0027: ldarg.1 + IL_0028: ldloc.1 + IL_0029: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_002e: ldloc.0 + IL_002f: ldc.i4.6 + IL_0030: shl + IL_0031: ldloc.0 + IL_0032: ldc.i4.2 + IL_0033: shr + IL_0034: add + IL_0035: add + IL_0036: add + IL_0037: stloc.0 + IL_0038: ldloc.0 + IL_0039: 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: call instance int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 NewSomeGenericUnion(!T item1, int32 item2) 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 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 3 + .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 V_0) + IL_0000: ldloca.s V_0 + IL_0002: initobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 + IL_0008: ldloca.s V_0 + IL_000a: ldarg.0 + IL_000b: stfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item1 + IL_0010: ldloca.s V_0 + IL_0012: ldarg.1 + IL_0013: stfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item2 + IL_0018: ldloc.0 + IL_0019: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_001a: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig instance !T get_Item1() 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 !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -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/Equals14.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals14.fsx.il.netcore.bsl index 541e25c5210..ebf0e2abebe 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 @@ -57,90 +57,6 @@ .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 public static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 NewSomeGenericUnion(!T item1, int32 item2) 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 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 3 - .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 - IL_0008: ldloca.s V_0 - IL_000a: ldarg.0 - IL_000b: stfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item1 - IL_0010: ldloca.s V_0 - IL_0012: ldarg.1 - IL_0013: stfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item2 - IL_0018: ldloc.0 - IL_0019: ret - } - - .method public hidebysig instance !T get_Item1() 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 !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_001a: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -272,65 +188,6 @@ IL_004b: 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 7 - .locals init (int32 V_0, - !T V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: pop - IL_0004: ldc.i4.0 - IL_0005: stloc.0 - IL_0006: ldc.i4 0x9e3779b9 - IL_000b: ldarg.0 - IL_000c: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item2 - IL_0011: ldloc.0 - IL_0012: ldc.i4.6 - IL_0013: shl - IL_0014: ldloc.0 - IL_0015: ldc.i4.2 - IL_0016: shr - IL_0017: add - IL_0018: add - IL_0019: add - IL_001a: stloc.0 - IL_001b: ldc.i4 0x9e3779b9 - IL_0020: ldarg.0 - IL_0021: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item1 - IL_0026: stloc.1 - IL_0027: ldarg.1 - IL_0028: ldloc.1 - IL_0029: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add - IL_0035: add - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: 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: call instance int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -440,6 +297,149 @@ IL_0016: 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 7 + .locals init (int32 V_0, + !T V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: pop + IL_0004: ldc.i4.0 + IL_0005: stloc.0 + IL_0006: ldc.i4 0x9e3779b9 + IL_000b: ldarg.0 + IL_000c: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item2 + IL_0011: ldloc.0 + IL_0012: ldc.i4.6 + IL_0013: shl + IL_0014: ldloc.0 + IL_0015: ldc.i4.2 + IL_0016: shr + IL_0017: add + IL_0018: add + IL_0019: add + IL_001a: stloc.0 + IL_001b: ldc.i4 0x9e3779b9 + IL_0020: ldarg.0 + IL_0021: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item1 + IL_0026: stloc.1 + IL_0027: ldarg.1 + IL_0028: ldloc.1 + IL_0029: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_002e: ldloc.0 + IL_002f: ldc.i4.6 + IL_0030: shl + IL_0031: ldloc.0 + IL_0032: ldc.i4.2 + IL_0033: shr + IL_0034: add + IL_0035: add + IL_0036: add + IL_0037: stloc.0 + IL_0038: ldloc.0 + IL_0039: 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: call instance int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 NewSomeGenericUnion(!T item1, int32 item2) 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 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 3 + .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 V_0) + IL_0000: ldloca.s V_0 + IL_0002: initobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 + IL_0008: ldloca.s V_0 + IL_000a: ldarg.0 + IL_000b: stfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item1 + IL_0010: ldloca.s V_0 + IL_0012: ldarg.1 + IL_0013: stfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item2 + IL_0018: ldloc.0 + IL_0019: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_001a: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig instance !T get_Item1() 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 !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals15.fsx.il.net472.bsl index 54ada3de30c..46defde6091 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals15.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals15.fsx.il.net472.bsl @@ -63,40 +63,14 @@ .field assembly int32 U@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance !T get_V() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::V@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_U() cil managed + .method public specialname rtspecialname instance void .ctor(!T v, int32 u) cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::U@ - IL_0006: ret - } - - .method public specialname rtspecialname - instance void .ctor(!T v, - int32 u) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 42 45 71 75 61 6C 73 31 35 2B - 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 - 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E - 54 65 73 74 73 2B 53 6F 6D 65 47 65 6E 65 72 69 - 63 52 65 63 6F 72 64 60 31 00 00 ) + .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 42 45 71 75 61 6C 73 31 35 2B + 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 + 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E + 54 65 73 74 73 2B 53 6F 6D 65 47 65 6E 65 72 69 + 63 52 65 63 6F 72 64 60 31 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -108,20 +82,6 @@ IL_000e: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -192,9 +152,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -251,64 +209,7 @@ IL_0049: 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 7 - .locals init (int32 V_0, - !T V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::U@ - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldc.i4 0x9e3779b9 - IL_001c: ldarg.0 - IL_001d: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::V@ - IL_0022: stloc.1 - IL_0023: ldarg.1 - IL_0024: ldloc.1 - IL_0025: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_002a: ldloc.0 - IL_002b: ldc.i4.6 - IL_002c: shl - IL_002d: ldloc.0 - IL_002e: ldc.i4.2 - IL_002f: shr - IL_0030: add - IL_0031: add - IL_0032: add - IL_0033: stloc.0 - IL_0034: ldloc.0 - IL_0035: 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: call instance int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1 obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -340,9 +241,7 @@ IL_002a: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -415,6 +314,99 @@ IL_0016: 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 7 + .locals init (int32 V_0, + !T V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::U@ + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldc.i4 0x9e3779b9 + IL_001c: ldarg.0 + IL_001d: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::V@ + IL_0022: stloc.1 + IL_0023: ldarg.1 + IL_0024: ldloc.1 + IL_0025: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_002a: ldloc.0 + IL_002b: ldc.i4.6 + IL_002c: shl + IL_002d: ldloc.0 + IL_002e: ldc.i4.2 + IL_002f: shr + IL_0030: add + IL_0031: add + IL_0032: add + IL_0033: stloc.0 + IL_0034: ldloc.0 + IL_0035: 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: call instance int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1 + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig specialname instance int32 get_U() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::U@ + IL_0006: ret + } + + .method public hidebysig specialname instance !T get_V() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::V@ + IL_0006: ret + } + .property instance !T V() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -435,6 +427,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 { @@ -459,17 +462,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 { @@ -551,99 +543,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname - instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, - class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..dd062c47846 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 @@ -53,30 +53,6 @@ .field assembly int32 U@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance !T get_V() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::V@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_U() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::U@ - IL_0006: ret - } - .method public specialname rtspecialname instance void .ctor(!T v, int32 u) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -96,20 +72,6 @@ IL_000e: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -237,61 +199,6 @@ IL_0049: 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 7 - .locals init (int32 V_0, - !T V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::U@ - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldc.i4 0x9e3779b9 - IL_001c: ldarg.0 - IL_001d: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::V@ - IL_0022: stloc.1 - IL_0023: ldarg.1 - IL_0024: ldloc.1 - IL_0025: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_002a: ldloc.0 - IL_002b: ldc.i4.6 - IL_002c: shl - IL_002d: ldloc.0 - IL_002e: ldc.i4.2 - IL_002f: shr - IL_0030: add - IL_0031: add - IL_0032: add - IL_0033: stloc.0 - IL_0034: ldloc.0 - IL_0035: 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: call instance int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -397,6 +304,99 @@ IL_0016: 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 7 + .locals init (int32 V_0, + !T V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::U@ + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldc.i4 0x9e3779b9 + IL_001c: ldarg.0 + IL_001d: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::V@ + IL_0022: stloc.1 + IL_0023: ldarg.1 + IL_0024: ldloc.1 + IL_0025: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_002a: ldloc.0 + IL_002b: ldc.i4.6 + IL_002c: shl + IL_002d: ldloc.0 + IL_002e: ldc.i4.2 + IL_002f: shr + IL_0030: add + IL_0031: add + IL_0032: add + IL_0033: stloc.0 + IL_0034: ldloc.0 + IL_0035: 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: call instance int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1 + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig specialname instance int32 get_U() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int32 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::U@ + IL_0006: ret + } + + .method public hidebysig specialname instance !T get_V() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld !0 valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1::V@ + IL_0006: ret + } + .property instance !T V() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals16.fsx.il.net472.bsl index 32189e96291..aba2dac9b68 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals16.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals16.fsx.il.net472.bsl @@ -59,6 +59,19 @@ .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 assembly int32 v .field assembly int32 u + .method public specialname rtspecialname instance void .ctor(int32 v, int32 u) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u + IL_000e: ret + } + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -184,55 +197,6 @@ IL_0044: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldc.i4 0x9e3779b9 - IL_001c: ldarg.0 - IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0022: ldloc.0 - IL_0023: ldc.i4.6 - IL_0024: shl - IL_0025: ldloc.0 - IL_0026: ldc.i4.2 - IL_0027: shr - IL_0028: add - IL_0029: add - IL_002a: add - IL_002b: stloc.0 - IL_002c: ldloc.0 - IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -279,37 +243,6 @@ IL_0019: ret } - .method public specialname rtspecialname instance void .ctor(int32 v, int32 u) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0007: ldarg.0 - IL_0008: ldarg.2 - IL_0009: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u - IL_000e: ret - } - - .method public hidebysig specialname instance int32 get_V() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_U() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u - IL_0006: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -351,6 +284,73 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldc.i4 0x9e3779b9 + IL_001c: ldarg.0 + IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0022: ldloc.0 + IL_0023: ldc.i4.6 + IL_0024: shl + IL_0025: ldloc.0 + IL_0026: ldc.i4.2 + IL_0027: shr + IL_0028: add + IL_0029: add + IL_002a: add + IL_002b: stloc.0 + IL_002c: ldloc.0 + IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_U() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_V() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0006: ret + } + .property instance int32 V() { .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::get_V() @@ -367,6 +367,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 { @@ -391,17 +402,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 { @@ -487,4 +487,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..48e36892e66 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 @@ -49,6 +49,19 @@ .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 assembly int32 v .field assembly int32 u + .method public specialname rtspecialname instance void .ctor(int32 v, int32 u) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0007: ldarg.0 + IL_0008: ldarg.2 + IL_0009: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u + IL_000e: ret + } + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -174,55 +187,6 @@ IL_0044: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldc.i4 0x9e3779b9 - IL_001c: ldarg.0 - IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0022: ldloc.0 - IL_0023: ldc.i4.6 - IL_0024: shl - IL_0025: ldloc.0 - IL_0026: ldc.i4.2 - IL_0027: shr - IL_0028: add - IL_0029: add - IL_002a: add - IL_002b: stloc.0 - IL_002c: ldloc.0 - IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -269,37 +233,6 @@ IL_0019: ret } - .method public specialname rtspecialname instance void .ctor(int32 v, int32 u) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0007: ldarg.0 - IL_0008: ldarg.2 - IL_0009: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u - IL_000e: ret - } - - .method public hidebysig specialname instance int32 get_V() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_U() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u - IL_0006: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -341,6 +274,73 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldc.i4 0x9e3779b9 + IL_001c: ldarg.0 + IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0022: ldloc.0 + IL_0023: ldc.i4.6 + IL_0024: shl + IL_0025: ldloc.0 + IL_0026: ldc.i4.2 + IL_0027: shr + IL_0028: add + IL_0029: add + IL_002a: add + IL_002b: stloc.0 + IL_002c: ldloc.0 + IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_U() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::u + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_V() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0006: ret + } + .property instance int32 V() { .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::get_V() @@ -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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals17.fsx.il.net472.bsl index 28852e8defc..dc18293ec36 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals17.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals17.fsx.il.net472.bsl @@ -47,7 +47,7 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 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 ) + 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 21 00 00 00 00 00 ) .field assembly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -57,90 +57,6 @@ .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 static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion NewSomeUnion(int32 item1, int32 item2) 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 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 3 - .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0008: ldloca.s V_0 - IL_000a: ldarg.0 - IL_000b: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 - IL_0010: ldloca.s V_0 - IL_0012: ldarg.1 - IL_0013: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 - IL_0018: ldloc.0 - IL_0019: ret - } - - .method assembly hidebysig instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 - IL_0006: ret - } - - .method assembly hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 - IL_0006: ret - } - - .method assembly 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -270,59 +186,6 @@ IL_0046: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: pop - IL_0004: ldc.i4.0 - IL_0005: stloc.0 - IL_0006: ldc.i4 0x9e3779b9 - IL_000b: ldarg.0 - IL_000c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 - IL_0011: ldloc.0 - IL_0012: ldc.i4.6 - IL_0013: shl - IL_0014: ldloc.0 - IL_0015: ldc.i4.2 - IL_0016: shr - IL_0017: add - IL_0018: add - IL_0019: add - IL_001a: stloc.0 - IL_001b: ldc.i4 0x9e3779b9 - IL_0020: ldarg.0 - IL_0021: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 - IL_0026: ldloc.0 - IL_0027: ldc.i4.6 - IL_0028: shl - IL_0029: ldloc.0 - IL_002a: ldc.i4.2 - IL_002b: shr - IL_002c: add - IL_002d: add - IL_002e: add - IL_002f: stloc.0 - IL_0030: ldloc.0 - IL_0031: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -414,6 +277,143 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: pop + IL_0004: ldc.i4.0 + IL_0005: stloc.0 + IL_0006: ldc.i4 0x9e3779b9 + IL_000b: ldarg.0 + IL_000c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 + IL_0011: ldloc.0 + IL_0012: ldc.i4.6 + IL_0013: shl + IL_0014: ldloc.0 + IL_0015: ldc.i4.2 + IL_0016: shr + IL_0017: add + IL_0018: add + IL_0019: add + IL_001a: stloc.0 + IL_001b: ldc.i4 0x9e3779b9 + IL_0020: ldarg.0 + IL_0021: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 + IL_0026: ldloc.0 + IL_0027: ldc.i4.6 + IL_0028: shl + IL_0029: ldloc.0 + IL_002a: ldc.i4.2 + IL_002b: shr + IL_002c: add + IL_002d: add + IL_002e: add + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method assembly static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion NewSomeUnion(int32 item1, int32 item2) 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 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 3 + .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion V_0) + IL_0000: ldloca.s V_0 + IL_0002: initobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0008: ldloca.s V_0 + IL_000a: ldarg.0 + IL_000b: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 + IL_0010: ldloca.s V_0 + IL_0012: ldarg.1 + IL_0013: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 + IL_0018: ldloc.0 + IL_0019: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method assembly hidebysig instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 + IL_0006: ret + } + + .method assembly hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 + IL_0006: ret + } + + .method assembly 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -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/Equals17.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals17.fsx.il.netcore.bsl index 3004404175c..dc18293ec36 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 @@ -57,90 +57,6 @@ .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 static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion NewSomeUnion(int32 item1, int32 item2) 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 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 3 - .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0008: ldloca.s V_0 - IL_000a: ldarg.0 - IL_000b: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 - IL_0010: ldloca.s V_0 - IL_0012: ldarg.1 - IL_0013: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 - IL_0018: ldloc.0 - IL_0019: ret - } - - .method assembly hidebysig instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 - IL_0006: ret - } - - .method assembly hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 - IL_0006: ret - } - - .method assembly 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -270,59 +186,6 @@ IL_0046: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: pop - IL_0004: ldc.i4.0 - IL_0005: stloc.0 - IL_0006: ldc.i4 0x9e3779b9 - IL_000b: ldarg.0 - IL_000c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 - IL_0011: ldloc.0 - IL_0012: ldc.i4.6 - IL_0013: shl - IL_0014: ldloc.0 - IL_0015: ldc.i4.2 - IL_0016: shr - IL_0017: add - IL_0018: add - IL_0019: add - IL_001a: stloc.0 - IL_001b: ldc.i4 0x9e3779b9 - IL_0020: ldarg.0 - IL_0021: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 - IL_0026: ldloc.0 - IL_0027: ldc.i4.6 - IL_0028: shl - IL_0029: ldloc.0 - IL_002a: ldc.i4.2 - IL_002b: shr - IL_002c: add - IL_002d: add - IL_002e: add - IL_002f: stloc.0 - IL_0030: ldloc.0 - IL_0031: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -414,6 +277,143 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: pop + IL_0004: ldc.i4.0 + IL_0005: stloc.0 + IL_0006: ldc.i4 0x9e3779b9 + IL_000b: ldarg.0 + IL_000c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 + IL_0011: ldloc.0 + IL_0012: ldc.i4.6 + IL_0013: shl + IL_0014: ldloc.0 + IL_0015: ldc.i4.2 + IL_0016: shr + IL_0017: add + IL_0018: add + IL_0019: add + IL_001a: stloc.0 + IL_001b: ldc.i4 0x9e3779b9 + IL_0020: ldarg.0 + IL_0021: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 + IL_0026: ldloc.0 + IL_0027: ldc.i4.6 + IL_0028: shl + IL_0029: ldloc.0 + IL_002a: ldc.i4.2 + IL_002b: shr + IL_002c: add + IL_002d: add + IL_002e: add + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method assembly static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion NewSomeUnion(int32 item1, int32 item2) 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 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 3 + .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion V_0) + IL_0000: ldloca.s V_0 + IL_0002: initobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0008: ldloca.s V_0 + IL_000a: ldarg.0 + IL_000b: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 + IL_0010: ldloca.s V_0 + IL_0012: ldarg.1 + IL_0013: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 + IL_0018: ldloc.0 + IL_0019: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method assembly hidebysig instance int32 get_Item1() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item1 + IL_0006: ret + } + + .method assembly hidebysig instance int32 get_Item2() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item2 + IL_0006: ret + } + + .method assembly 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals18.fsx.il.net472.bsl index 5a4028470e9..558ed573d0d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals18.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals18.fsx.il.net472.bsl @@ -63,38 +63,14 @@ .field assembly int32 U@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method assembly hidebysig specialname instance int32 get_V() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ - IL_0006: ret - } - - .method assembly hidebysig specialname instance int32 get_U() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 v, int32 u) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 39 45 71 75 61 6C 73 31 38 2B - 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 - 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E - 54 65 73 74 73 2B 53 6F 6D 65 52 65 63 6F 72 64 - 00 00 ) + .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 39 45 71 75 61 6C 73 31 38 2B + 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 + 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E + 54 65 73 74 73 2B 53 6F 6D 65 52 65 63 6F 72 64 + 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -106,20 +82,6 @@ IL_000e: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -245,55 +207,6 @@ IL_0044: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldc.i4 0x9e3779b9 - IL_001c: ldarg.0 - IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ - IL_0022: ldloc.0 - IL_0023: ldc.i4.6 - IL_0024: shl - IL_0025: ldloc.0 - IL_0026: ldc.i4.2 - IL_0027: shr - IL_0028: add - IL_0029: add - IL_002a: add - IL_002b: stloc.0 - IL_002c: ldloc.0 - IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -381,6 +294,93 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldc.i4 0x9e3779b9 + IL_001c: ldarg.0 + IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ + IL_0022: ldloc.0 + IL_0023: ldc.i4.6 + IL_0024: shl + IL_0025: ldloc.0 + IL_0026: ldc.i4.2 + IL_0027: shr + IL_0028: add + IL_0029: add + IL_002a: add + IL_002b: stloc.0 + IL_002c: ldloc.0 + IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method assembly hidebysig specialname instance int32 get_U() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ + IL_0006: ret + } + + .method assembly hidebysig specialname instance int32 get_V() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ + IL_0006: ret + } + .property instance int32 V() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -401,6 +401,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 { @@ -425,17 +436,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 { @@ -517,97 +517,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..d1abbb88f09 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 @@ -53,30 +53,6 @@ .field assembly int32 U@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method assembly hidebysig specialname instance int32 get_V() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ - IL_0006: ret - } - - .method assembly hidebysig specialname instance int32 get_U() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 v, int32 u) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -96,20 +72,6 @@ IL_000e: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -235,55 +197,6 @@ IL_0044: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldc.i4 0x9e3779b9 - IL_001c: ldarg.0 - IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ - IL_0022: ldloc.0 - IL_0023: ldc.i4.6 - IL_0024: shl - IL_0025: ldloc.0 - IL_0026: ldc.i4.2 - IL_0027: shr - IL_0028: add - IL_0029: add - IL_002a: add - IL_002b: stloc.0 - IL_002c: ldloc.0 - IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -371,6 +284,93 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldc.i4 0x9e3779b9 + IL_001c: ldarg.0 + IL_001d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ + IL_0022: ldloc.0 + IL_0023: ldc.i4.6 + IL_0024: shl + IL_0025: ldloc.0 + IL_0026: ldc.i4.2 + IL_0027: shr + IL_0028: add + IL_0029: add + IL_002a: add + IL_002b: stloc.0 + IL_002c: ldloc.0 + IL_002d: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method assembly hidebysig specialname instance int32 get_U() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::U@ + IL_0006: ret + } + + .method assembly hidebysig specialname instance int32 get_V() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ + IL_0006: ret + } + .property instance int32 V() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals19.fsx.il.net472.bsl index 4e835e5a4ff..94235d9bbc4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals19.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals19.fsx.il.net472.bsl @@ -58,6 +58,16 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.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 ) .field assembly int32 v + .method public specialname rtspecialname instance void .ctor(int32 v) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0007: ret + } + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -96,9 +106,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -125,45 +133,7 @@ IL_001f: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldloc.0 - IL_0018: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -176,9 +146,7 @@ IL_000f: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -202,25 +170,6 @@ IL_0020: ret } - .method public specialname rtspecialname instance void .ctor(int32 v) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0007: ret - } - - .method public hidebysig specialname instance int32 get_V() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0006: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -261,6 +210,51 @@ IL_0022: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldloc.0 + IL_0018: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_V() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0006: ret + } + .property instance int32 V() { .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::get_V() @@ -310,4 +304,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..554e54e9b6e 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 @@ -48,6 +48,16 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.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 ) .field assembly int32 v + .method public specialname rtspecialname instance void .ctor(int32 v) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0007: ret + } + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -113,42 +123,6 @@ IL_001f: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldloc.0 - IL_0018: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -186,25 +160,6 @@ IL_0020: ret } - .method public specialname rtspecialname instance void .ctor(int32 v) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0007: ret - } - - .method public hidebysig specialname instance int32 get_V() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v - IL_0006: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -245,6 +200,51 @@ IL_0022: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldloc.0 + IL_0018: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_V() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::v + IL_0006: ret + } + .property instance int32 V() { .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct::get_V() @@ -294,4 +294,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals20.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals20.fsx.il.net472.bsl index 49c15170ace..9206e179622 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals20.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals20.fsx.il.net472.bsl @@ -47,82 +47,12 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 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 ) + 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 ) .field assembly int32 item .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 public static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion NewSomeUnion(int32 item) 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 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 2 - .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0008: ldloca.s V_0 - IL_000a: ldarg.0 - IL_000b: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item - IL_0010: ldloc.0 - IL_0011: ret - } - - .method public hidebysig instance int32 get_Item() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -192,46 +122,6 @@ IL_0021: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: pop - IL_0004: ldc.i4.0 - IL_0005: stloc.0 - IL_0006: ldc.i4 0x9e3779b9 - IL_000b: ldarg.0 - IL_000c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item - IL_0011: ldloc.0 - IL_0012: ldc.i4.6 - IL_0013: shl - IL_0014: ldloc.0 - IL_0015: ldc.i4.2 - IL_0016: shr - IL_0017: add - IL_0018: add - IL_0019: add - IL_001a: stloc.0 - IL_001b: ldloc.0 - IL_001c: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -317,6 +207,116 @@ IL_0024: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: pop + IL_0004: ldc.i4.0 + IL_0005: stloc.0 + IL_0006: ldc.i4 0x9e3779b9 + IL_000b: ldarg.0 + IL_000c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item + IL_0011: ldloc.0 + IL_0012: ldc.i4.6 + IL_0013: shl + IL_0014: ldloc.0 + IL_0015: ldc.i4.2 + IL_0016: shr + IL_0017: add + IL_0018: add + IL_0019: add + IL_001a: stloc.0 + IL_001b: ldloc.0 + IL_001c: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion NewSomeUnion(int32 item) 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 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 2 + .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion V_0) + IL_0000: ldloca.s V_0 + IL_0002: initobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0008: ldloca.s V_0 + IL_000a: ldarg.0 + IL_000b: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item + IL_0010: ldloc.0 + IL_0011: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig instance int32 get_Item() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -380,4 +380,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..9206e179622 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 @@ -53,76 +53,6 @@ .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 public static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion NewSomeUnion(int32 item) 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 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 2 - .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0008: ldloca.s V_0 - IL_000a: ldarg.0 - IL_000b: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item - IL_0010: ldloc.0 - IL_0011: ret - } - - .method public hidebysig instance int32 get_Item() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -192,46 +122,6 @@ IL_0021: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: pop - IL_0004: ldc.i4.0 - IL_0005: stloc.0 - IL_0006: ldc.i4 0x9e3779b9 - IL_000b: ldarg.0 - IL_000c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item - IL_0011: ldloc.0 - IL_0012: ldc.i4.6 - IL_0013: shl - IL_0014: ldloc.0 - IL_0015: ldc.i4.2 - IL_0016: shr - IL_0017: add - IL_0018: add - IL_0019: add - IL_001a: stloc.0 - IL_001b: ldloc.0 - IL_001c: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -317,6 +207,116 @@ IL_0024: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: pop + IL_0004: ldc.i4.0 + IL_0005: stloc.0 + IL_0006: ldc.i4 0x9e3779b9 + IL_000b: ldarg.0 + IL_000c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item + IL_0011: ldloc.0 + IL_0012: ldc.i4.6 + IL_0013: shl + IL_0014: ldloc.0 + IL_0015: ldc.i4.2 + IL_0016: shr + IL_0017: add + IL_0018: add + IL_0019: add + IL_001a: stloc.0 + IL_001b: ldloc.0 + IL_001c: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion NewSomeUnion(int32 item) 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 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 2 + .locals init (valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion V_0) + IL_0000: ldloca.s V_0 + IL_0002: initobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0008: ldloca.s V_0 + IL_000a: ldarg.0 + IL_000b: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item + IL_0010: ldloc.0 + IL_0011: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig instance int32 get_Item() 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/EqualsMicroPerfAndCodeGenerationTests/SomeUnion::item + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -380,4 +380,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals21.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals21.fsx.il.net472.bsl index 8b1d3250251..5a5393f20ab 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals21.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals21.fsx.il.net472.bsl @@ -60,26 +60,14 @@ .field assembly int32 V@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_V() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ - IL_0006: ret - } - .method public specialname rtspecialname instance void .ctor(int32 v) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 39 45 71 75 61 6C 73 32 31 2B - 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 - 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E - 54 65 73 74 73 2B 53 6F 6D 65 52 65 63 6F 72 64 - 00 00 ) + .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 39 45 71 75 61 6C 73 32 31 2B + 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 + 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E + 54 65 73 74 73 2B 53 6F 6D 65 52 65 63 6F 72 64 + 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -88,20 +76,6 @@ IL_0007: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -140,9 +114,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -169,45 +141,7 @@ IL_001f: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldloc.0 - IL_0018: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -220,9 +154,7 @@ IL_000f: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -286,6 +218,68 @@ IL_0022: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldloc.0 + IL_0018: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig specialname instance int32 get_V() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ + IL_0006: ret + } + .property instance int32 V() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -333,99 +327,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname - instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, - class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..43249ccbd1b 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 @@ -50,18 +50,6 @@ .field assembly int32 V@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_V() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ - IL_0006: ret - } - .method public specialname rtspecialname instance void .ctor(int32 v) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -78,20 +66,6 @@ IL_0007: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -157,42 +131,6 @@ IL_001f: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldloc.0 - IL_0018: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -270,6 +208,68 @@ IL_0022: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldloc.0 + IL_0018: 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: call instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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,valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig specialname instance int32 get_V() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord::V@ + IL_0006: ret + } + .property instance int32 V() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -321,4 +321,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash05.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash05.fsx.il.net472.bsl index 2ef40ee45a7..ac34740f5ee 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash05.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash05.fsx.il.net472.bsl @@ -46,7 +46,7 @@ [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 ) + 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 ) .field assembly initonly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -56,28 +56,13 @@ .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 public static class assembly/HashMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 2E 48 61 73 68 30 35 2B 48 61 - 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F - 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 - 73 2B 4B 65 79 00 00 ) + .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 2E 48 61 73 68 30 35 2B 48 61 + 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F + 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 + 73 2B 4B 65 79 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 ) @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/HashMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,6 +393,144 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/HashMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: 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/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/HashMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) + IL_0007: 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/HashMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -604,97 +604,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..ac34740f5ee 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 @@ -56,21 +56,6 @@ .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 public static class assembly/HashMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/HashMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,6 +393,144 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/HashMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: 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/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/HashMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) + IL_0007: 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/HashMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -608,4 +608,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash06.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash06.fsx.il.net472.bsl index 94715349909..90a405ce134 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash06.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash06.fsx.il.net472.bsl @@ -46,7 +46,7 @@ [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 ) + 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 ) .field assembly initonly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -56,28 +56,13 @@ .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 public static class assembly/HashMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 2E 48 61 73 68 30 36 2B 48 61 - 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F - 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 - 73 2B 4B 65 79 00 00 ) + .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 2E 48 61 73 68 30 36 2B 48 61 + 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F + 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 + 73 2B 4B 65 79 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 ) @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/HashMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,6 +393,144 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/HashMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: 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/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/HashMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) + IL_0007: 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/HashMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -603,97 +603,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..90a405ce134 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 @@ -56,21 +56,6 @@ .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 public static class assembly/HashMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/HashMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,6 +393,144 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/HashMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: 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/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/HashMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) + IL_0007: 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/HashMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -607,4 +607,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.net472.bsl index 46adaeb4644..d918e10e583 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.net472.bsl @@ -62,37 +62,13 @@ .field assembly int32 key2@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_key1() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_key2() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0006: ret - } - - .method public specialname rtspecialname - instance void .ctor(int32 key1, - int32 key2) cil managed + .method public specialname rtspecialname instance void .ctor(int32 key1, int32 key2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 2F 48 61 73 68 30 38 2B 48 61 - 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F - 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 - 73 2B 4B 65 79 52 00 00 ) + .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 2F 48 61 73 68 30 38 2B 48 61 + 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F + 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 + 73 2B 4B 65 79 52 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -106,19 +82,6 @@ IL_0014: 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/HashMicroPerfAndCodeGenerationTests/KeyR>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -206,9 +169,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -284,64 +245,7 @@ IL_005b: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/HashMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(class assembly/HashMicroPerfAndCodeGenerationTests/KeyR obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/KeyR obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -379,9 +283,7 @@ IL_002e: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -463,6 +365,96 @@ IL_0013: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/HashMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/HashMicroPerfAndCodeGenerationTests/KeyR>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_key1() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_key2() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0006: ret + } + .property instance int32 key1() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -523,99 +515,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname - instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, - class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..e6e14e78d52 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 @@ -52,28 +52,6 @@ .field assembly int32 key2@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_key1() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_key2() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0006: ret - } - .method public specialname rtspecialname instance void .ctor(int32 key1, int32 key2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -94,19 +72,6 @@ IL_0014: 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/HashMicroPerfAndCodeGenerationTests/KeyR>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -270,61 +235,6 @@ IL_005b: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/HashMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/KeyR obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -445,6 +355,96 @@ IL_0013: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/HashMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/HashMicroPerfAndCodeGenerationTests/KeyR>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_key1() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_key2() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0006: ret + } + .property instance int32 key1() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -509,4 +509,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash09.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash09.fsx.il.net472.bsl index d981fd5eb1b..03d857c6854 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash09.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash09.fsx.il.net472.bsl @@ -46,7 +46,7 @@ [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 ) + 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 ) .field assembly initonly !a item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -56,28 +56,13 @@ .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 public static class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1 NewGenericKey(!a item1, !a item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::.ctor(!0, - !0) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(!a item1, !a item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 37 48 61 73 68 30 39 2B 48 61 - 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F - 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 - 73 2B 47 65 6E 65 72 69 63 4B 65 79 60 31 00 00 ) + .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 37 48 61 73 68 30 39 2B 48 61 + 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F + 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 + 73 2B 47 65 6E 65 72 69 63 4B 65 79 60 31 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 ) @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance !a get_Item1() 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 !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0006: ret - } - - .method public hidebysig instance !a get_Item2() 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 !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_0015: ret - } - .method public hidebysig virtual final instance int32 CompareTo(class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -332,79 +256,6 @@ IL_0069: 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 7 - .locals init (int32 V_0, - class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, - !a V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0047 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0016: stloc.2 - IL_0017: ldarg.1 - IL_0018: ldloc.2 - IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_001e: ldloc.0 - IL_001f: ldc.i4.6 - IL_0020: shl - IL_0021: ldloc.0 - IL_0022: ldc.i4.2 - IL_0023: shr - IL_0024: add - IL_0025: add - IL_0026: add - IL_0027: stloc.0 - IL_0028: ldc.i4 0x9e3779b9 - IL_002d: ldloc.1 - IL_002e: ldfld !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0033: stloc.2 - IL_0034: ldarg.1 - IL_0035: ldloc.2 - IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_003b: ldloc.0 - IL_003c: ldc.i4.6 - IL_003d: shl - IL_003e: ldloc.0 - IL_003f: ldc.i4.2 - IL_0040: shr - IL_0041: add - IL_0042: add - IL_0043: add - IL_0044: stloc.0 - IL_0045: ldloc.0 - IL_0046: ret - - IL_0047: ldc.i4.0 - IL_0048: 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 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -575,6 +426,155 @@ IL_0015: 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 7 + .locals init (int32 V_0, + class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, + !a V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0047 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0016: stloc.2 + IL_0017: ldarg.1 + IL_0018: ldloc.2 + IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_001e: ldloc.0 + IL_001f: ldc.i4.6 + IL_0020: shl + IL_0021: ldloc.0 + IL_0022: ldc.i4.2 + IL_0023: shr + IL_0024: add + IL_0025: add + IL_0026: add + IL_0027: stloc.0 + IL_0028: ldc.i4 0x9e3779b9 + IL_002d: ldloc.1 + IL_002e: ldfld !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0033: stloc.2 + IL_0034: ldarg.1 + IL_0035: ldloc.2 + IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_003b: ldloc.0 + IL_003c: ldc.i4.6 + IL_003d: shl + IL_003e: ldloc.0 + IL_003f: ldc.i4.2 + IL_0040: shr + IL_0041: add + IL_0042: add + IL_0043: add + IL_0044: stloc.0 + IL_0045: ldloc.0 + IL_0046: ret + + IL_0047: ldc.i4.0 + IL_0048: 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 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1 NewGenericKey(!a item1, !a item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::.ctor(!0, + !0) + IL_0007: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig instance !a get_Item1() 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 !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0006: ret + } + + .method public hidebysig instance !a get_Item2() 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 !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -648,97 +648,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..03d857c6854 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 @@ -56,21 +56,6 @@ .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 public static class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1 NewGenericKey(!a item1, !a item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::.ctor(!0, - !0) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(!a item1, !a item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance !a get_Item1() 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 !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0006: ret - } - - .method public hidebysig instance !a get_Item2() 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 !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_0015: ret - } - .method public hidebysig virtual final instance int32 CompareTo(class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -332,79 +256,6 @@ IL_0069: 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 7 - .locals init (int32 V_0, - class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, - !a V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0047 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0016: stloc.2 - IL_0017: ldarg.1 - IL_0018: ldloc.2 - IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_001e: ldloc.0 - IL_001f: ldc.i4.6 - IL_0020: shl - IL_0021: ldloc.0 - IL_0022: ldc.i4.2 - IL_0023: shr - IL_0024: add - IL_0025: add - IL_0026: add - IL_0027: stloc.0 - IL_0028: ldc.i4 0x9e3779b9 - IL_002d: ldloc.1 - IL_002e: ldfld !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0033: stloc.2 - IL_0034: ldarg.1 - IL_0035: ldloc.2 - IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_003b: ldloc.0 - IL_003c: ldc.i4.6 - IL_003d: shl - IL_003e: ldloc.0 - IL_003f: ldc.i4.2 - IL_0040: shr - IL_0041: add - IL_0042: add - IL_0043: add - IL_0044: stloc.0 - IL_0045: ldloc.0 - IL_0046: ret - - IL_0047: ldc.i4.0 - IL_0048: 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 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -575,6 +426,155 @@ IL_0015: 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 7 + .locals init (int32 V_0, + class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, + !a V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0047 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0016: stloc.2 + IL_0017: ldarg.1 + IL_0018: ldloc.2 + IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_001e: ldloc.0 + IL_001f: ldc.i4.6 + IL_0020: shl + IL_0021: ldloc.0 + IL_0022: ldc.i4.2 + IL_0023: shr + IL_0024: add + IL_0025: add + IL_0026: add + IL_0027: stloc.0 + IL_0028: ldc.i4 0x9e3779b9 + IL_002d: ldloc.1 + IL_002e: ldfld !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0033: stloc.2 + IL_0034: ldarg.1 + IL_0035: ldloc.2 + IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_003b: ldloc.0 + IL_003c: ldc.i4.6 + IL_003d: shl + IL_003e: ldloc.0 + IL_003f: ldc.i4.2 + IL_0040: shr + IL_0041: add + IL_0042: add + IL_0043: add + IL_0044: stloc.0 + IL_0045: ldloc.0 + IL_0046: ret + + IL_0047: ldc.i4.0 + IL_0048: 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 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1 NewGenericKey(!a item1, !a item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::.ctor(!0, + !0) + IL_0007: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig instance !a get_Item1() 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 !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0006: ret + } + + .method public hidebysig instance !a get_Item2() 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 !0 class assembly/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -652,4 +652,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash12.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash12.fsx.il.net472.bsl index c51120276ad..3e82dc8a824 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash12.fsx.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash12.fsx.il.net472.bsl @@ -46,7 +46,7 @@ [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 ) + 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 ) .field assembly initonly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -56,28 +56,13 @@ .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 public static class assembly/HashMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 2E 48 61 73 68 31 32 2B 48 61 - 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F - 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 - 73 2B 4B 65 79 00 00 ) + .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 2E 48 61 73 68 31 32 2B 48 61 + 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F + 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 + 73 2B 4B 65 79 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 ) @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/HashMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,53 +393,69 @@ IL_0013: ret } - .property instance int32 Tag() - { - .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 int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::get_Tag() - } - .property instance int32 Item1() + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::get_Item1() + + .maxstack 7 + .locals init (int32 V_0, + class assembly/HashMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret } - .property instance int32 Item2() + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::get_Item2() + + .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/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret } - } - .class auto autochar serializable sealed nested public beforefieldinit KeyWithInnerKeys - extends [runtime]System.Object - implements class [runtime]System.IEquatable`1, - [runtime]System.Collections.IStructuralEquatable, - class [runtime]System.IComparable`1, - [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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) - .field assembly initonly class assembly/HashMicroPerfAndCodeGenerationTests/Key item1 - .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 assembly initonly class [runtime]System.Tuple`2 item2 - .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 public static class assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys NewKeyWithInnerKeys(class assembly/HashMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) cil managed + .method public static class assembly/HashMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 00 00 00 00 00 00 ) @@ -587,53 +465,57 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::.ctor(class assembly/HashMicroPerfAndCodeGenerationTests/Key, - class [runtime]System.Tuple`2) + IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) IL_0007: ret } - .method assembly specialname rtspecialname instance void .ctor(class assembly/HashMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) cil managed + .method public strict virtual instance string ToString() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 3B 48 61 73 68 31 32 2B 48 61 - 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F - 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 - 73 2B 4B 65 79 57 69 74 68 49 6E 6E 65 72 4B 65 - 79 73 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() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class assembly/HashMicroPerfAndCodeGenerationTests/Key assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Tuple`2 assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0014: ret + 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/HashMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance class assembly/HashMicroPerfAndCodeGenerationTests/Key get_Item1() cil managed + .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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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 class assembly/HashMicroPerfAndCodeGenerationTests/Key assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0001: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 IL_0006: ret } - .method public hidebysig instance class [runtime]System.Tuple`2 get_Item2() cil managed + .method public hidebysig instance int32 get_Item2() 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 class [runtime]System.Tuple`2 assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0001: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 IL_0006: ret } @@ -649,31 +531,73 @@ IL_0003: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .property instance int32 Tag() { .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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + .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/HashMicroPerfAndCodeGenerationTests/Key::get_Tag() + } + .property instance int32 Item1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::get_Item1() + } + .property instance int32 Item2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::get_Item2() } + } - .method public strict virtual instance string ToString() cil managed + .class auto autochar serializable sealed nested public beforefieldinit KeyWithInnerKeys + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field assembly initonly class assembly/HashMicroPerfAndCodeGenerationTests/Key item1 + .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 assembly initonly class [runtime]System.Tuple`2 item2 + .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 assembly/HashMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) 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 3B 48 61 73 68 31 32 2B 48 61 + 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F + 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 + 73 2B 4B 65 79 57 69 74 68 49 6E 6E 65 72 4B 65 + 79 73 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: 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/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class assembly/HashMicroPerfAndCodeGenerationTests/Key assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Tuple`2 assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0014: ret } .method public hidebysig virtual final instance int32 CompareTo(class assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed @@ -905,94 +829,6 @@ IL_00a4: 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 7 - .locals init (int32 V_0, - class assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, - class [runtime]System.Tuple`2 V_2, - class assembly/HashMicroPerfAndCodeGenerationTests/Key V_3, - class assembly/HashMicroPerfAndCodeGenerationTests/Key V_4, - int32 V_5) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0066 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld class [runtime]System.Tuple`2 assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0016: stloc.2 - IL_0017: ldloc.2 - IL_0018: call instance !0 class [runtime]System.Tuple`2::get_Item1() - IL_001d: stloc.3 - IL_001e: ldloc.2 - IL_001f: call instance !1 class [runtime]System.Tuple`2::get_Item2() - IL_0024: stloc.s V_4 - IL_0026: ldloc.3 - IL_0027: ldarg.1 - IL_0028: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_002d: stloc.s V_5 - IL_002f: ldloc.s V_5 - IL_0031: ldc.i4.5 - IL_0032: shl - IL_0033: ldloc.s V_5 - IL_0035: add - IL_0036: ldloc.s V_4 - IL_0038: ldarg.1 - IL_0039: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_003e: xor - IL_003f: ldloc.0 - IL_0040: ldc.i4.6 - IL_0041: shl - IL_0042: ldloc.0 - IL_0043: ldc.i4.2 - IL_0044: shr - IL_0045: add - IL_0046: add - IL_0047: add - IL_0048: stloc.0 - IL_0049: ldc.i4 0x9e3779b9 - IL_004e: ldloc.1 - IL_004f: ldfld class assembly/HashMicroPerfAndCodeGenerationTests/Key assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0054: ldarg.1 - IL_0055: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_005a: ldloc.0 - IL_005b: ldc.i4.6 - IL_005c: shl - IL_005d: ldloc.0 - IL_005e: ldc.i4.2 - IL_005f: shr - IL_0060: add - IL_0061: add - IL_0062: add - IL_0063: stloc.0 - IL_0064: ldloc.0 - IL_0065: ret - - IL_0066: ldc.i4.0 - IL_0067: 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/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1135,7 +971,7 @@ IL_0026: ldfld class [runtime]System.Tuple`2 assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 IL_002b: tail. IL_002d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, - !!0) + !!0) IL_0032: ret IL_0033: ldc.i4.0 @@ -1174,6 +1010,170 @@ IL_0015: 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 7 + .locals init (int32 V_0, + class assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, + class [runtime]System.Tuple`2 V_2, + class assembly/HashMicroPerfAndCodeGenerationTests/Key V_3, + class assembly/HashMicroPerfAndCodeGenerationTests/Key V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0066 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld class [runtime]System.Tuple`2 assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: call instance !0 class [runtime]System.Tuple`2::get_Item1() + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: call instance !1 class [runtime]System.Tuple`2::get_Item2() + IL_0024: stloc.s V_4 + IL_0026: ldloc.3 + IL_0027: ldarg.1 + IL_0028: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_002d: stloc.s V_5 + IL_002f: ldloc.s V_5 + IL_0031: ldc.i4.5 + IL_0032: shl + IL_0033: ldloc.s V_5 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: ldarg.1 + IL_0039: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_003e: xor + IL_003f: ldloc.0 + IL_0040: ldc.i4.6 + IL_0041: shl + IL_0042: ldloc.0 + IL_0043: ldc.i4.2 + IL_0044: shr + IL_0045: add + IL_0046: add + IL_0047: add + IL_0048: stloc.0 + IL_0049: ldc.i4 0x9e3779b9 + IL_004e: ldloc.1 + IL_004f: ldfld class assembly/HashMicroPerfAndCodeGenerationTests/Key assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0054: ldarg.1 + IL_0055: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_005a: ldloc.0 + IL_005b: ldc.i4.6 + IL_005c: shl + IL_005d: ldloc.0 + IL_005e: ldc.i4.2 + IL_005f: shr + IL_0060: add + IL_0061: add + IL_0062: add + IL_0063: stloc.0 + IL_0064: ldloc.0 + IL_0065: ret + + IL_0066: ldc.i4.0 + IL_0067: 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/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys NewKeyWithInnerKeys(class assembly/HashMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::.ctor(class assembly/HashMicroPerfAndCodeGenerationTests/Key, + class [runtime]System.Tuple`2) + IL_0007: 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/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance class assembly/HashMicroPerfAndCodeGenerationTests/Key get_Item1() 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 class assembly/HashMicroPerfAndCodeGenerationTests/Key assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0006: ret + } + + .method public hidebysig instance class [runtime]System.Tuple`2 get_Item2() 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 class [runtime]System.Tuple`2 assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1224,7 +1224,7 @@ IL_0011: call class assembly/HashMicroPerfAndCodeGenerationTests/Key assembly/HashMicroPerfAndCodeGenerationTests/Key::NewKey(int32, int32) IL_0016: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_001b: call class assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::NewKeyWithInnerKeys(class assembly/HashMicroPerfAndCodeGenerationTests/Key, class [runtime]System.Tuple`2) IL_0020: stloc.0 @@ -1264,97 +1264,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..3e82dc8a824 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 @@ -56,21 +56,6 @@ .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 public static class assembly/HashMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/Key::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -93,67 +78,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/Key>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -333,68 +257,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/HashMicroPerfAndCodeGenerationTests/Key V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/Key obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -531,53 +393,69 @@ IL_0013: ret } - .property instance int32 Tag() - { - .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 int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::get_Tag() - } - .property instance int32 Item1() + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::get_Item1() + + .maxstack 7 + .locals init (int32 V_0, + class assembly/HashMicroPerfAndCodeGenerationTests/Key V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: ret } - .property instance int32 Item2() + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::get_Item2() + + .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/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret } - } - .class auto autochar serializable sealed nested public beforefieldinit KeyWithInnerKeys - extends [runtime]System.Object - implements class [runtime]System.IEquatable`1, - [runtime]System.Collections.IStructuralEquatable, - class [runtime]System.IComparable`1, - [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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) - .field assembly initonly class assembly/HashMicroPerfAndCodeGenerationTests/Key item1 - .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 assembly initonly class [runtime]System.Tuple`2 item2 - .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 public static class assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys NewKeyWithInnerKeys(class assembly/HashMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) cil managed + .method public static class assembly/HashMicroPerfAndCodeGenerationTests/Key NewKey(int32 item1, int32 item2) 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 00 00 00 00 00 00 ) @@ -587,53 +465,57 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::.ctor(class assembly/HashMicroPerfAndCodeGenerationTests/Key, - class [runtime]System.Tuple`2) + IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/Key::.ctor(int32, + int32) IL_0007: ret } - .method assembly specialname rtspecialname instance void .ctor(class assembly/HashMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) cil managed + .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/HashMicroPerfAndCodeGenerationTests/Key>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method assembly hidebysig specialname instance object __DebugDisplay() 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 3B 48 61 73 68 31 32 2B 48 61 - 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F - 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 - 73 2B 4B 65 79 57 69 74 68 49 6E 6E 65 72 4B 65 - 79 73 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() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class assembly/HashMicroPerfAndCodeGenerationTests/Key assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Tuple`2 assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0014: ret + 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance class assembly/HashMicroPerfAndCodeGenerationTests/Key get_Item1() cil managed + .method public hidebysig instance int32 get_Item1() 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 class assembly/HashMicroPerfAndCodeGenerationTests/Key assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0001: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item1 IL_0006: ret } - .method public hidebysig instance class [runtime]System.Tuple`2 get_Item2() cil managed + .method public hidebysig instance int32 get_Item2() 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 class [runtime]System.Tuple`2 assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0001: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::item2 IL_0006: ret } @@ -649,31 +531,73 @@ IL_0003: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .property instance int32 Tag() { .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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + .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/HashMicroPerfAndCodeGenerationTests/Key::get_Tag() + } + .property instance int32 Item1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::get_Item1() + } + .property instance int32 Item2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::get_Item2() } + } - .method public strict virtual instance string ToString() cil managed + .class auto autochar serializable sealed nested public beforefieldinit KeyWithInnerKeys + extends [runtime]System.Object + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) + .field assembly initonly class assembly/HashMicroPerfAndCodeGenerationTests/Key item1 + .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 assembly initonly class [runtime]System.Tuple`2 item2 + .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 assembly/HashMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) 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 3B 48 61 73 68 31 32 2B 48 61 + 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F + 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 + 73 2B 4B 65 79 57 69 74 68 49 6E 6E 65 72 4B 65 + 79 73 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: 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/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class assembly/HashMicroPerfAndCodeGenerationTests/Key assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [runtime]System.Tuple`2 assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0014: ret } .method public hidebysig virtual final instance int32 CompareTo(class assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed @@ -905,94 +829,6 @@ IL_00a4: 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 7 - .locals init (int32 V_0, - class assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, - class [runtime]System.Tuple`2 V_2, - class assembly/HashMicroPerfAndCodeGenerationTests/Key V_3, - class assembly/HashMicroPerfAndCodeGenerationTests/Key V_4, - int32 V_5) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0066 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld class [runtime]System.Tuple`2 assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0016: stloc.2 - IL_0017: ldloc.2 - IL_0018: call instance !0 class [runtime]System.Tuple`2::get_Item1() - IL_001d: stloc.3 - IL_001e: ldloc.2 - IL_001f: call instance !1 class [runtime]System.Tuple`2::get_Item2() - IL_0024: stloc.s V_4 - IL_0026: ldloc.3 - IL_0027: ldarg.1 - IL_0028: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_002d: stloc.s V_5 - IL_002f: ldloc.s V_5 - IL_0031: ldc.i4.5 - IL_0032: shl - IL_0033: ldloc.s V_5 - IL_0035: add - IL_0036: ldloc.s V_4 - IL_0038: ldarg.1 - IL_0039: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_003e: xor - IL_003f: ldloc.0 - IL_0040: ldc.i4.6 - IL_0041: shl - IL_0042: ldloc.0 - IL_0043: ldc.i4.2 - IL_0044: shr - IL_0045: add - IL_0046: add - IL_0047: add - IL_0048: stloc.0 - IL_0049: ldc.i4 0x9e3779b9 - IL_004e: ldloc.1 - IL_004f: ldfld class assembly/HashMicroPerfAndCodeGenerationTests/Key assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0054: ldarg.1 - IL_0055: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_005a: ldloc.0 - IL_005b: ldc.i4.6 - IL_005c: shl - IL_005d: ldloc.0 - IL_005e: ldc.i4.2 - IL_005f: shr - IL_0060: add - IL_0061: add - IL_0062: add - IL_0063: stloc.0 - IL_0064: ldloc.0 - IL_0065: ret - - IL_0066: ldc.i4.0 - IL_0067: 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/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1174,6 +1010,170 @@ IL_0015: 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 7 + .locals init (int32 V_0, + class assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, + class [runtime]System.Tuple`2 V_2, + class assembly/HashMicroPerfAndCodeGenerationTests/Key V_3, + class assembly/HashMicroPerfAndCodeGenerationTests/Key V_4, + int32 V_5) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0066 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld class [runtime]System.Tuple`2 assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: call instance !0 class [runtime]System.Tuple`2::get_Item1() + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: call instance !1 class [runtime]System.Tuple`2::get_Item2() + IL_0024: stloc.s V_4 + IL_0026: ldloc.3 + IL_0027: ldarg.1 + IL_0028: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_002d: stloc.s V_5 + IL_002f: ldloc.s V_5 + IL_0031: ldc.i4.5 + IL_0032: shl + IL_0033: ldloc.s V_5 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: ldarg.1 + IL_0039: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_003e: xor + IL_003f: ldloc.0 + IL_0040: ldc.i4.6 + IL_0041: shl + IL_0042: ldloc.0 + IL_0043: ldc.i4.2 + IL_0044: shr + IL_0045: add + IL_0046: add + IL_0047: add + IL_0048: stloc.0 + IL_0049: ldc.i4 0x9e3779b9 + IL_004e: ldloc.1 + IL_004f: ldfld class assembly/HashMicroPerfAndCodeGenerationTests/Key assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0054: ldarg.1 + IL_0055: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_005a: ldloc.0 + IL_005b: ldc.i4.6 + IL_005c: shl + IL_005d: ldloc.0 + IL_005e: ldc.i4.2 + IL_005f: shr + IL_0060: add + IL_0061: add + IL_0062: add + IL_0063: stloc.0 + IL_0064: ldloc.0 + IL_0065: ret + + IL_0066: ldc.i4.0 + IL_0067: 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/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys NewKeyWithInnerKeys(class assembly/HashMicroPerfAndCodeGenerationTests/Key item1, class [runtime]System.Tuple`2 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::.ctor(class assembly/HashMicroPerfAndCodeGenerationTests/Key, + class [runtime]System.Tuple`2) + IL_0007: 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/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance class assembly/HashMicroPerfAndCodeGenerationTests/Key get_Item1() 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 class assembly/HashMicroPerfAndCodeGenerationTests/Key assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0006: ret + } + + .method public hidebysig instance class [runtime]System.Tuple`2 get_Item2() 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 class [runtime]System.Tuple`2 assembly/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -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..50f7be89d17 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/EmptyStringPattern.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/EmptyStringPattern.fs.il.bsl @@ -67,23 +67,33 @@ IL_002a: ret } - .method public static int32 testEmptyStringOnly(string s) cil managed + .method public static int32 testBundledEmptyAndNull(string s) cil managed { .maxstack 8 IL_0000: nop IL_0001: ldarg.0 - IL_0002: brfalse.s IL_000e + IL_0002: brfalse.s IL_0010 IL_0004: ldarg.0 IL_0005: callvirt instance int32 [runtime]System.String::get_Length() - IL_000a: brtrue.s IL_000e + IL_000a: ldc.i4.0 + IL_000b: ceq + IL_000d: nop + IL_000e: br.s IL_0012 - IL_000c: ldc.i4.1 - IL_000d: ret + IL_0010: ldc.i4.0 + IL_0011: nop + IL_0012: brtrue.s IL_0017 - IL_000e: ldc.i4.0 - IL_000f: ret + IL_0014: ldarg.0 + IL_0015: brtrue.s IL_0019 + + IL_0017: ldc.i4.0 + IL_0018: ret + + IL_0019: ldc.i4.1 + IL_001a: ret } .method public static int32 testBundledNullAndEmpty(string s) cil managed @@ -115,36 +125,26 @@ IL_001a: ret } - .method public static int32 testBundledEmptyAndNull(string s) cil managed + .method public static int32 testEmptyStringOnly(string s) cil managed { .maxstack 8 IL_0000: nop IL_0001: ldarg.0 - IL_0002: brfalse.s IL_0010 + IL_0002: brfalse.s IL_000e IL_0004: ldarg.0 IL_0005: callvirt instance int32 [runtime]System.String::get_Length() - IL_000a: ldc.i4.0 - IL_000b: ceq - IL_000d: nop - IL_000e: br.s IL_0012 - - IL_0010: ldc.i4.0 - IL_0011: nop - IL_0012: brtrue.s IL_0017 - - IL_0014: ldarg.0 - IL_0015: brtrue.s IL_0019 + IL_000a: brtrue.s IL_000e - IL_0017: ldc.i4.0 - IL_0018: ret + IL_000c: ldc.i4.1 + IL_000d: ret - IL_0019: ldc.i4.1 - IL_001a: ret + IL_000e: ldc.i4.0 + IL_000f: ret } - .method public static string useClassifyString(string s) cil managed + .method public static int32 useBundledEmptyAndNull(string s) cil managed { .maxstack 8 @@ -161,40 +161,16 @@ IL_0010: ldc.i4.0 IL_0011: nop - IL_0012: brtrue.s IL_0019 + IL_0012: brtrue.s IL_0017 IL_0014: ldarg.0 - IL_0015: brfalse.s IL_001f - - IL_0017: br.s IL_0025 - - IL_0019: ldstr "empty" - IL_001e: ret - - IL_001f: ldstr "null" - IL_0024: ret - - IL_0025: ldstr "other" - IL_002a: ret - } - - .method public static int32 useTestEmptyStringOnly(string s) cil managed - { - - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: brfalse.s IL_000e - - IL_0004: ldarg.0 - IL_0005: callvirt instance int32 [runtime]System.String::get_Length() - IL_000a: brtrue.s IL_000e + IL_0015: brtrue.s IL_0019 - IL_000c: ldc.i4.1 - IL_000d: ret + IL_0017: ldc.i4.0 + IL_0018: ret - IL_000e: ldc.i4.0 - IL_000f: ret + IL_0019: ldc.i4.1 + IL_001a: ret } .method public static int32 useBundledNullAndEmpty(string s) cil managed @@ -226,7 +202,7 @@ IL_001a: ret } - .method public static int32 useBundledEmptyAndNull(string s) cil managed + .method public static string useClassifyString(string s) cil managed { .maxstack 8 @@ -243,16 +219,40 @@ IL_0010: ldc.i4.0 IL_0011: nop - IL_0012: brtrue.s IL_0017 + IL_0012: brtrue.s IL_0019 IL_0014: ldarg.0 - IL_0015: brtrue.s IL_0019 + IL_0015: brfalse.s IL_001f - IL_0017: ldc.i4.0 - IL_0018: ret + IL_0017: br.s IL_0025 - IL_0019: ldc.i4.1 - IL_001a: ret + IL_0019: ldstr "empty" + IL_001e: ret + + IL_001f: ldstr "null" + IL_0024: ret + + IL_0025: ldstr "other" + IL_002a: ret + } + + .method public static int32 useTestEmptyStringOnly(string s) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: brfalse.s IL_000e + + IL_0004: ldarg.0 + IL_0005: callvirt instance int32 [runtime]System.String::get_Length() + IL_000a: brtrue.s IL_000e + + IL_000c: ldc.i4.1 + IL_000d: ret + + IL_000e: ldc.i4.0 + IL_000f: ret } } @@ -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..1ce1ff0bd6a 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 @@ -45,10 +45,6 @@ { } - .method public hidebysig strict virtual instance void Invoke(!T A_1) runtime managed - { - } - .method public hidebysig strict virtual instance class [runtime]System.IAsyncResult BeginInvoke(!T A_1, @@ -61,6 +57,10 @@ { } + .method public hidebysig strict virtual instance void Invoke(!T A_1) runtime managed + { + } + } .method public static void f() cil managed @@ -84,10 +84,6 @@ { } - .method public hidebysig strict virtual instance void Invoke(!T A_1) runtime managed - { - } - .method public hidebysig strict virtual instance class [runtime]System.IAsyncResult BeginInvoke(!T A_1, @@ -100,6 +96,10 @@ { } + .method public hidebysig strict virtual instance void Invoke(!T A_1) runtime managed + { + } + } .method public static void f() cil managed @@ -123,10 +123,6 @@ { } - .method public hidebysig strict virtual instance void Invoke() runtime managed - { - } - .method public hidebysig strict virtual instance class [runtime]System.IAsyncResult BeginInvoke(class [runtime]System.AsyncCallback callback, @@ -138,6 +134,10 @@ { } + .method public hidebysig strict virtual instance void Invoke() runtime managed + { + } + } .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname 'f@13-1' @@ -180,10 +180,6 @@ { } - .method public hidebysig strict virtual instance void Invoke() runtime managed - { - } - .method public hidebysig strict virtual instance class [runtime]System.IAsyncResult BeginInvoke(class [runtime]System.AsyncCallback callback, @@ -195,6 +191,10 @@ { } + .method public hidebysig strict virtual instance void Invoke() runtime managed + { + } + } .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname f@7 @@ -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..bf485a7836c 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 @@ -45,10 +45,6 @@ { } - .method public hidebysig strict virtual instance void Invoke(!T A_1) runtime managed - { - } - .method public hidebysig strict virtual instance class [runtime]System.IAsyncResult BeginInvoke(!T A_1, @@ -61,6 +57,10 @@ { } + .method public hidebysig strict virtual instance void Invoke(!T A_1) runtime managed + { + } + } .method public static void f() cil managed @@ -86,10 +86,6 @@ { } - .method public hidebysig strict virtual instance void Invoke(!T A_1) runtime managed - { - } - .method public hidebysig strict virtual instance class [runtime]System.IAsyncResult BeginInvoke(!T A_1, @@ -102,6 +98,10 @@ { } + .method public hidebysig strict virtual instance void Invoke(!T A_1) runtime managed + { + } + } .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname 'f1@19-1' @@ -150,10 +150,6 @@ { } - .method public hidebysig strict virtual instance void Invoke() runtime managed - { - } - .method public hidebysig strict virtual instance class [runtime]System.IAsyncResult BeginInvoke(class [runtime]System.AsyncCallback callback, @@ -165,6 +161,10 @@ { } + .method public hidebysig strict virtual instance void Invoke() runtime managed + { + } + } .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname f@13 @@ -207,10 +207,6 @@ { } - .method public hidebysig strict virtual instance void Invoke() runtime managed - { - } - .method public hidebysig strict virtual instance class [runtime]System.IAsyncResult BeginInvoke(class [runtime]System.AsyncCallback callback, @@ -222,6 +218,10 @@ { } + .method public hidebysig strict virtual instance void Invoke() runtime managed + { + } + } .class abstract auto autochar serializable sealed nested assembly beforefieldinit specialname f1@7 @@ -274,4 +274,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.net472.bsl index 5c436321899..b1357f6b964 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.net472.bsl @@ -42,7 +42,7 @@ [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 ) + 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 @@ -57,19 +57,19 @@ extends assembly/Test1 { .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 31 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) + 2B 58 31 31 40 44 65 62 75 67 54 79 70 65 50 72 + 6F 78 79 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 ) + 61 79 28 29 2C 6E 71 7D 00 00 ) .field assembly initonly int32 item .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 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -109,19 +109,19 @@ extends assembly/Test1 { .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 32 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) + 2B 58 31 32 40 44 65 62 75 67 54 79 70 65 50 72 + 6F 78 79 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 ) + 61 79 28 29 2C 6E 71 7D 00 00 ) .field assembly initonly int32 item .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 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -161,19 +161,19 @@ extends assembly/Test1 { .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 33 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) + 2B 58 31 33 40 44 65 62 75 67 54 79 70 65 50 72 + 6F 78 79 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 ) + 61 79 28 29 2C 6E 71 7D 00 00 ) .field assembly initonly int32 item .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 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -213,19 +213,19 @@ extends assembly/Test1 { .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 34 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) + 2B 58 31 34 40 44 65 62 75 67 54 79 70 65 50 72 + 6F 78 79 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 ) + 61 79 28 29 2C 6E 71 7D 00 00 ) .field assembly initonly int32 item .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 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -270,9 +270,9 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class assembly/Test1/X11 obj) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -317,9 +317,9 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class assembly/Test1/X12 obj) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -364,9 +364,9 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class assembly/Test1/X13 obj) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -411,9 +411,9 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class assembly/Test1/X14 obj) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -455,9 +455,9 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -470,223 +470,333 @@ IL_000d: ret } - .method public static class assembly/Test1 NewX11(int32 item) cil managed + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Test1 obj) 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 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: ldarg.0 - IL_0001: newobj instance void assembly/Test1/X11::.ctor(int32) - IL_0006: ret - } + IL_0001: brfalse.s IL_0011 - .method public hidebysig instance bool get_IsX11() 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/Test1::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret - } + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_000f - .method public static class assembly/Test1 NewX12(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void assembly/Test1/X12::.ctor(int32) - IL_0006: ret - } + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: call int32 assembly::CompareTo$cont@4(class assembly/Test1, + class assembly/Test1, + class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_000e: ret - .method public hidebysig instance bool get_IsX12() 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/Test1::get_Tag() - IL_0006: ldc.i4.1 - IL_0007: ceq - IL_0009: ret - } + IL_000f: ldc.i4.1 + IL_0010: ret - .method public static class assembly/Test1 NewX13(int32 item) 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 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void assembly/Test1/X13::.ctor(int32) - IL_0006: ret - } + IL_0011: ldarg.1 + IL_0012: brfalse.s IL_0016 - .method public hidebysig instance bool get_IsX13() 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/Test1::get_Tag() - IL_0006: ldc.i4.2 - IL_0007: ceq - IL_0009: ret + IL_0014: ldc.i4.m1 + IL_0015: ret + + IL_0016: ldc.i4.0 + IL_0017: ret } - .method public static class assembly/Test1 NewX14(int32 item) cil managed + .method public hidebysig virtual final instance int32 CompareTo(object obj) 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 03 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: ldarg.0 - IL_0001: newobj instance void assembly/Test1/X14::.ctor(int32) - IL_0006: ret + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Test1 + IL_0007: callvirt instance int32 assembly/Test1::CompareTo(class assembly/Test1) + IL_000c: ret } - .method public hidebysig instance bool get_IsX14() cil managed + .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 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance int32 assembly/Test1::get_Tag() - IL_0006: ldc.i4.3 - IL_0007: ceq - IL_0009: ret + .maxstack 6 + .locals init (class assembly/Test1 V_0) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Test1 + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldarg.1 + IL_000c: ldloc.0 + IL_000d: ldnull + IL_000e: call int32 assembly::'CompareTo$cont@4-1'(class assembly/Test1, + object, + class assembly/Test1, + class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_0013: ret + + IL_0014: ldarg.1 + IL_0015: unbox.any assembly/Test1 + IL_001a: brfalse.s IL_001e + + IL_001c: ldc.i4.m1 + IL_001d: ret + + IL_001e: ldc.i4.0 + IL_001f: ret } - .method public hidebysig instance int32 get_Tag() cil managed + .method public hidebysig instance bool Equals(class assembly/Test1 obj, class [runtime]System.Collections.IEqualityComparer comp) 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 + .maxstack 4 + .locals init (int32 V_0, + int32 V_1, + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, + class assembly/Test1/X12 V_4, + class assembly/Test1/X12 V_5, + class assembly/Test1/X13 V_6, + class assembly/Test1/X13 V_7, + class assembly/Test1/X14 V_8, + class assembly/Test1/X14 V_9) IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/Test1::_tag - IL_0006: ret - } + IL_0001: brfalse IL_00c0 - .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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0006: ldarg.1 + IL_0007: brfalse IL_00be + + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Test1::_tag + IL_0012: stloc.0 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Test1::_tag + IL_0019: stloc.1 + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: bne.un IL_00bc + + IL_0021: ldarg.0 + IL_0022: call instance int32 assembly/Test1::get_Tag() + IL_0027: switch ( + IL_003c, + IL_0059, + IL_007a, + IL_009b) + IL_003c: ldarg.0 + IL_003d: castclass assembly/Test1/X11 + IL_0042: stloc.2 + IL_0043: ldarg.1 + IL_0044: castclass assembly/Test1/X11 + IL_0049: stloc.3 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/Test1/X11::item + IL_0050: ldloc.3 + IL_0051: ldfld int32 assembly/Test1/X11::item + IL_0056: ceq + IL_0058: ret + + IL_0059: ldarg.0 + IL_005a: castclass assembly/Test1/X12 + IL_005f: stloc.s V_4 + IL_0061: ldarg.1 + IL_0062: castclass assembly/Test1/X12 + IL_0067: stloc.s V_5 + IL_0069: ldloc.s V_4 + IL_006b: ldfld int32 assembly/Test1/X12::item + IL_0070: ldloc.s V_5 + IL_0072: ldfld int32 assembly/Test1/X12::item + IL_0077: ceq + IL_0079: ret + + IL_007a: ldarg.0 + IL_007b: castclass assembly/Test1/X13 + IL_0080: stloc.s V_6 + IL_0082: ldarg.1 + IL_0083: castclass assembly/Test1/X13 + IL_0088: stloc.s V_7 + IL_008a: ldloc.s V_6 + IL_008c: ldfld int32 assembly/Test1/X13::item + IL_0091: ldloc.s V_7 + IL_0093: ldfld int32 assembly/Test1/X13::item + IL_0098: ceq + IL_009a: ret + + IL_009b: ldarg.0 + IL_009c: castclass assembly/Test1/X14 + IL_00a1: stloc.s V_8 + IL_00a3: ldarg.1 + IL_00a4: castclass assembly/Test1/X14 + IL_00a9: stloc.s V_9 + IL_00ab: ldloc.s V_8 + IL_00ad: ldfld int32 assembly/Test1/X14::item + IL_00b2: ldloc.s V_9 + IL_00b4: ldfld int32 assembly/Test1/X14::item + IL_00b9: ceq + IL_00bb: ret + + IL_00bc: ldc.i4.0 + IL_00bd: ret + + IL_00be: ldc.i4.0 + IL_00bf: ret + + IL_00c0: ldarg.1 + IL_00c1: ldnull + IL_00c2: cgt.un + IL_00c4: ldc.i4.0 + IL_00c5: ceq + IL_00c7: ret } - .method public strict virtual instance string ToString() cil managed + .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 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/Test1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + .maxstack 5 + .locals init (class assembly/Test1 V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Test1 + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Test1::Equals(class assembly/Test1, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret } - .method public hidebysig virtual final instance int32 CompareTo(class assembly/Test1 obj) cil managed + .method public hidebysig virtual final instance bool Equals(class assembly/Test1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 8 + .maxstack 4 + .locals init (int32 V_0, + int32 V_1, + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, + class assembly/Test1/X12 V_4, + class assembly/Test1/X12 V_5, + class assembly/Test1/X13 V_6, + class assembly/Test1/X13 V_7, + class assembly/Test1/X14 V_8, + class assembly/Test1/X14 V_9) IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0011 + IL_0001: brfalse IL_00c0 - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_000f + IL_0006: ldarg.1 + IL_0007: brfalse IL_00be + + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Test1::_tag + IL_0012: stloc.0 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Test1::_tag + IL_0019: stloc.1 + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: bne.un IL_00bc + + IL_0021: ldarg.0 + IL_0022: call instance int32 assembly/Test1::get_Tag() + IL_0027: switch ( + IL_003c, + IL_0059, + IL_007a, + IL_009b) + IL_003c: ldarg.0 + IL_003d: castclass assembly/Test1/X11 + IL_0042: stloc.2 + IL_0043: ldarg.1 + IL_0044: castclass assembly/Test1/X11 + IL_0049: stloc.3 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/Test1/X11::item + IL_0050: ldloc.3 + IL_0051: ldfld int32 assembly/Test1/X11::item + IL_0056: ceq + IL_0058: ret - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: call int32 assembly::CompareTo$cont@4(class assembly/Test1, - class assembly/Test1, - class [FSharp.Core]Microsoft.FSharp.Core.Unit) - IL_000e: ret + IL_0059: ldarg.0 + IL_005a: castclass assembly/Test1/X12 + IL_005f: stloc.s V_4 + IL_0061: ldarg.1 + IL_0062: castclass assembly/Test1/X12 + IL_0067: stloc.s V_5 + IL_0069: ldloc.s V_4 + IL_006b: ldfld int32 assembly/Test1/X12::item + IL_0070: ldloc.s V_5 + IL_0072: ldfld int32 assembly/Test1/X12::item + IL_0077: ceq + IL_0079: ret - IL_000f: ldc.i4.1 - IL_0010: ret + IL_007a: ldarg.0 + IL_007b: castclass assembly/Test1/X13 + IL_0080: stloc.s V_6 + IL_0082: ldarg.1 + IL_0083: castclass assembly/Test1/X13 + IL_0088: stloc.s V_7 + IL_008a: ldloc.s V_6 + IL_008c: ldfld int32 assembly/Test1/X13::item + IL_0091: ldloc.s V_7 + IL_0093: ldfld int32 assembly/Test1/X13::item + IL_0098: ceq + IL_009a: ret - IL_0011: ldarg.1 - IL_0012: brfalse.s IL_0016 + IL_009b: ldarg.0 + IL_009c: castclass assembly/Test1/X14 + IL_00a1: stloc.s V_8 + IL_00a3: ldarg.1 + IL_00a4: castclass assembly/Test1/X14 + IL_00a9: stloc.s V_9 + IL_00ab: ldloc.s V_8 + IL_00ad: ldfld int32 assembly/Test1/X14::item + IL_00b2: ldloc.s V_9 + IL_00b4: ldfld int32 assembly/Test1/X14::item + IL_00b9: ceq + IL_00bb: ret - IL_0014: ldc.i4.m1 - IL_0015: ret + IL_00bc: ldc.i4.0 + IL_00bd: ret - IL_0016: ldc.i4.0 - IL_0017: ret - } + IL_00be: ldc.i4.0 + IL_00bf: 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/Test1 - IL_0007: callvirt instance int32 assembly/Test1::CompareTo(class assembly/Test1) - IL_000c: ret + IL_00c0: ldarg.1 + IL_00c1: ldnull + IL_00c2: cgt.un + IL_00c4: ldc.i4.0 + IL_00c5: ceq + IL_00c7: ret } - .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + .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 6 + .maxstack 4 .locals init (class assembly/Test1 V_0) IL_0000: ldarg.1 - IL_0001: unbox.any assembly/Test1 + IL_0001: isinst assembly/Test1 IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: brfalse.s IL_0014 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 IL_000a: ldarg.0 - IL_000b: ldarg.1 - IL_000c: ldloc.0 - IL_000d: ldnull - IL_000e: call int32 assembly::'CompareTo$cont@4-1'(class assembly/Test1, - object, - class assembly/Test1, - class [FSharp.Core]Microsoft.FSharp.Core.Unit) - IL_0013: ret - - IL_0014: ldarg.1 - IL_0015: unbox.any assembly/Test1 - IL_001a: brfalse.s IL_001e - - IL_001c: ldc.i4.m1 - IL_001d: ret + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Test1::Equals(class assembly/Test1) + IL_0011: ret - IL_001e: ldc.i4.0 - IL_001f: ret + IL_0012: ldc.i4.0 + IL_0013: ret } .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed @@ -810,256 +920,146 @@ IL_000b: ret } - .method public hidebysig instance bool Equals(class assembly/Test1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public static class assembly/Test1 NewX11(int32 item) 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 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 4 - .locals init (int32 V_0, - int32 V_1, - class assembly/Test1/X11 V_2, - class assembly/Test1/X11 V_3, - class assembly/Test1/X12 V_4, - class assembly/Test1/X12 V_5, - class assembly/Test1/X13 V_6, - class assembly/Test1/X13 V_7, - class assembly/Test1/X14 V_8, - class assembly/Test1/X14 V_9) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse IL_00c0 - - IL_0006: ldarg.1 - IL_0007: brfalse IL_00be - - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/Test1::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 assembly/Test1::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un IL_00bc - - IL_0021: ldarg.0 - IL_0022: call instance int32 assembly/Test1::get_Tag() - IL_0027: switch ( - IL_003c, - IL_0059, - IL_007a, - IL_009b) - IL_003c: ldarg.0 - IL_003d: castclass assembly/Test1/X11 - IL_0042: stloc.2 - IL_0043: ldarg.1 - IL_0044: castclass assembly/Test1/X11 - IL_0049: stloc.3 - IL_004a: ldloc.2 - IL_004b: ldfld int32 assembly/Test1/X11::item - IL_0050: ldloc.3 - IL_0051: ldfld int32 assembly/Test1/X11::item - IL_0056: ceq - IL_0058: ret - - IL_0059: ldarg.0 - IL_005a: castclass assembly/Test1/X12 - IL_005f: stloc.s V_4 - IL_0061: ldarg.1 - IL_0062: castclass assembly/Test1/X12 - IL_0067: stloc.s V_5 - IL_0069: ldloc.s V_4 - IL_006b: ldfld int32 assembly/Test1/X12::item - IL_0070: ldloc.s V_5 - IL_0072: ldfld int32 assembly/Test1/X12::item - IL_0077: ceq - IL_0079: ret - - IL_007a: ldarg.0 - IL_007b: castclass assembly/Test1/X13 - IL_0080: stloc.s V_6 - IL_0082: ldarg.1 - IL_0083: castclass assembly/Test1/X13 - IL_0088: stloc.s V_7 - IL_008a: ldloc.s V_6 - IL_008c: ldfld int32 assembly/Test1/X13::item - IL_0091: ldloc.s V_7 - IL_0093: ldfld int32 assembly/Test1/X13::item - IL_0098: ceq - IL_009a: ret + IL_0001: newobj instance void assembly/Test1/X11::.ctor(int32) + IL_0006: ret + } - IL_009b: ldarg.0 - IL_009c: castclass assembly/Test1/X14 - IL_00a1: stloc.s V_8 - IL_00a3: ldarg.1 - IL_00a4: castclass assembly/Test1/X14 - IL_00a9: stloc.s V_9 - IL_00ab: ldloc.s V_8 - IL_00ad: ldfld int32 assembly/Test1/X14::item - IL_00b2: ldloc.s V_9 - IL_00b4: ldfld int32 assembly/Test1/X14::item - IL_00b9: ceq - IL_00bb: ret + .method public static class assembly/Test1 NewX12(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void assembly/Test1/X12::.ctor(int32) + IL_0006: ret + } - IL_00bc: ldc.i4.0 - IL_00bd: ret + .method public static class assembly/Test1 NewX13(int32 item) 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 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/Test1/X13::.ctor(int32) + IL_0006: ret + } - IL_00be: ldc.i4.0 - IL_00bf: ret + .method public static class assembly/Test1 NewX14(int32 item) 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 03 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: ldarg.0 + IL_0001: newobj instance void assembly/Test1/X14::.ctor(int32) + IL_0006: ret + } - IL_00c0: ldarg.1 - IL_00c1: ldnull - IL_00c2: cgt.un - IL_00c4: ldc.i4.0 - IL_00c5: ceq - IL_00c7: 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/Test1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 5 - .locals init (class assembly/Test1 V_0) - IL_0000: ldarg.1 - IL_0001: isinst assembly/Test1 - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0013 - - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: ldarg.2 - IL_000d: callvirt instance bool assembly/Test1::Equals(class assembly/Test1, - class [runtime]System.Collections.IEqualityComparer) - IL_0012: ret - - IL_0013: ldc.i4.0 - IL_0014: ret + .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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 bool Equals(class assembly/Test1 obj) cil managed + .method public hidebysig instance bool get_IsX11() 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 4 - .locals init (int32 V_0, - int32 V_1, - class assembly/Test1/X11 V_2, - class assembly/Test1/X11 V_3, - class assembly/Test1/X12 V_4, - class assembly/Test1/X12 V_5, - class assembly/Test1/X13 V_6, - class assembly/Test1/X13 V_7, - class assembly/Test1/X14 V_8, - class assembly/Test1/X14 V_9) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse IL_00c0 - - IL_0006: ldarg.1 - IL_0007: brfalse IL_00be - - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/Test1::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 assembly/Test1::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un IL_00bc - - IL_0021: ldarg.0 - IL_0022: call instance int32 assembly/Test1::get_Tag() - IL_0027: switch ( - IL_003c, - IL_0059, - IL_007a, - IL_009b) - IL_003c: ldarg.0 - IL_003d: castclass assembly/Test1/X11 - IL_0042: stloc.2 - IL_0043: ldarg.1 - IL_0044: castclass assembly/Test1/X11 - IL_0049: stloc.3 - IL_004a: ldloc.2 - IL_004b: ldfld int32 assembly/Test1/X11::item - IL_0050: ldloc.3 - IL_0051: ldfld int32 assembly/Test1/X11::item - IL_0056: ceq - IL_0058: ret - - IL_0059: ldarg.0 - IL_005a: castclass assembly/Test1/X12 - IL_005f: stloc.s V_4 - IL_0061: ldarg.1 - IL_0062: castclass assembly/Test1/X12 - IL_0067: stloc.s V_5 - IL_0069: ldloc.s V_4 - IL_006b: ldfld int32 assembly/Test1/X12::item - IL_0070: ldloc.s V_5 - IL_0072: ldfld int32 assembly/Test1/X12::item - IL_0077: ceq - IL_0079: ret - - IL_007a: ldarg.0 - IL_007b: castclass assembly/Test1/X13 - IL_0080: stloc.s V_6 - IL_0082: ldarg.1 - IL_0083: castclass assembly/Test1/X13 - IL_0088: stloc.s V_7 - IL_008a: ldloc.s V_6 - IL_008c: ldfld int32 assembly/Test1/X13::item - IL_0091: ldloc.s V_7 - IL_0093: ldfld int32 assembly/Test1/X13::item - IL_0098: ceq - IL_009a: ret - - IL_009b: ldarg.0 - IL_009c: castclass assembly/Test1/X14 - IL_00a1: stloc.s V_8 - IL_00a3: ldarg.1 - IL_00a4: castclass assembly/Test1/X14 - IL_00a9: stloc.s V_9 - IL_00ab: ldloc.s V_8 - IL_00ad: ldfld int32 assembly/Test1/X14::item - IL_00b2: ldloc.s V_9 - IL_00b4: ldfld int32 assembly/Test1/X14::item - IL_00b9: ceq - IL_00bb: ret - - IL_00bc: ldc.i4.0 - IL_00bd: ret - - IL_00be: ldc.i4.0 - IL_00bf: ret + IL_0001: call instance int32 assembly/Test1::get_Tag() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } - IL_00c0: ldarg.1 - IL_00c1: ldnull - IL_00c2: cgt.un - IL_00c4: ldc.i4.0 - IL_00c5: ceq - IL_00c7: ret + .method public hidebysig instance bool get_IsX12() 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/Test1::get_Tag() + IL_0006: ldc.i4.1 + IL_0007: ceq + IL_0009: ret } - .method public hidebysig virtual final instance bool Equals(object obj) cil managed + .method public hidebysig instance bool get_IsX13() 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 4 - .locals init (class assembly/Test1 V_0) - IL_0000: ldarg.1 - IL_0001: isinst assembly/Test1 - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance int32 assembly/Test1::get_Tag() + IL_0006: ldc.i4.2 + IL_0007: ceq + IL_0009: ret + } - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: callvirt instance bool assembly/Test1::Equals(class assembly/Test1) - IL_0011: ret + .method public hidebysig instance bool get_IsX14() 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/Test1::get_Tag() + IL_0006: ldc.i4.3 + IL_0007: ceq + IL_0009: ret + } - IL_0012: ldc.i4.0 - IL_0013: 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/Test1::_tag + IL_0006: ret } .property instance int32 Tag() @@ -1099,6 +1099,15 @@ } } + .method public static int32 fm(class assembly/Test1 y) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call int32 assembly::select1(class assembly/Test1) + IL_0006: ret + } + .method public static int32 select1(class assembly/Test1 x) cil managed { @@ -1126,15 +1135,6 @@ IL_002d: ret } - .method public static int32 fm(class assembly/Test1 y) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call int32 assembly::select1(class assembly/Test1) - IL_0006: ret - } - .method assembly static int32 CompareTo$cont@4(class assembly/Test1 this, class assembly/Test1 obj, class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed @@ -1419,97 +1419,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..b1357f6b964 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 @@ -470,148 +470,6 @@ IL_000d: ret } - .method public static class assembly/Test1 NewX11(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void assembly/Test1/X11::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX11() 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/Test1::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret - } - - .method public static class assembly/Test1 NewX12(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void assembly/Test1/X12::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX12() 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/Test1::get_Tag() - IL_0006: ldc.i4.1 - IL_0007: ceq - IL_0009: ret - } - - .method public static class assembly/Test1 NewX13(int32 item) 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 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void assembly/Test1/X13::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX13() 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/Test1::get_Tag() - IL_0006: ldc.i4.2 - IL_0007: ceq - IL_0009: ret - } - - .method public static class assembly/Test1 NewX14(int32 item) 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 03 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: ldarg.0 - IL_0001: newobj instance void assembly/Test1/X14::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX14() 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/Test1::get_Tag() - IL_0006: ldc.i4.3 - 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/Test1::_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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Test1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Test1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -689,6 +547,258 @@ IL_001f: ret } + .method public hidebysig instance bool Equals(class assembly/Test1 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 (int32 V_0, + int32 V_1, + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, + class assembly/Test1/X12 V_4, + class assembly/Test1/X12 V_5, + class assembly/Test1/X13 V_6, + class assembly/Test1/X13 V_7, + class assembly/Test1/X14 V_8, + class assembly/Test1/X14 V_9) + IL_0000: ldarg.0 + IL_0001: brfalse IL_00c0 + + IL_0006: ldarg.1 + IL_0007: brfalse IL_00be + + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Test1::_tag + IL_0012: stloc.0 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Test1::_tag + IL_0019: stloc.1 + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: bne.un IL_00bc + + IL_0021: ldarg.0 + IL_0022: call instance int32 assembly/Test1::get_Tag() + IL_0027: switch ( + IL_003c, + IL_0059, + IL_007a, + IL_009b) + IL_003c: ldarg.0 + IL_003d: castclass assembly/Test1/X11 + IL_0042: stloc.2 + IL_0043: ldarg.1 + IL_0044: castclass assembly/Test1/X11 + IL_0049: stloc.3 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/Test1/X11::item + IL_0050: ldloc.3 + IL_0051: ldfld int32 assembly/Test1/X11::item + IL_0056: ceq + IL_0058: ret + + IL_0059: ldarg.0 + IL_005a: castclass assembly/Test1/X12 + IL_005f: stloc.s V_4 + IL_0061: ldarg.1 + IL_0062: castclass assembly/Test1/X12 + IL_0067: stloc.s V_5 + IL_0069: ldloc.s V_4 + IL_006b: ldfld int32 assembly/Test1/X12::item + IL_0070: ldloc.s V_5 + IL_0072: ldfld int32 assembly/Test1/X12::item + IL_0077: ceq + IL_0079: ret + + IL_007a: ldarg.0 + IL_007b: castclass assembly/Test1/X13 + IL_0080: stloc.s V_6 + IL_0082: ldarg.1 + IL_0083: castclass assembly/Test1/X13 + IL_0088: stloc.s V_7 + IL_008a: ldloc.s V_6 + IL_008c: ldfld int32 assembly/Test1/X13::item + IL_0091: ldloc.s V_7 + IL_0093: ldfld int32 assembly/Test1/X13::item + IL_0098: ceq + IL_009a: ret + + IL_009b: ldarg.0 + IL_009c: castclass assembly/Test1/X14 + IL_00a1: stloc.s V_8 + IL_00a3: ldarg.1 + IL_00a4: castclass assembly/Test1/X14 + IL_00a9: stloc.s V_9 + IL_00ab: ldloc.s V_8 + IL_00ad: ldfld int32 assembly/Test1/X14::item + IL_00b2: ldloc.s V_9 + IL_00b4: ldfld int32 assembly/Test1/X14::item + IL_00b9: ceq + IL_00bb: ret + + IL_00bc: ldc.i4.0 + IL_00bd: ret + + IL_00be: ldc.i4.0 + IL_00bf: ret + + IL_00c0: ldarg.1 + IL_00c1: ldnull + IL_00c2: cgt.un + IL_00c4: ldc.i4.0 + IL_00c5: ceq + IL_00c7: 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/Test1 V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Test1 + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Test1::Equals(class assembly/Test1, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Test1 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, + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, + class assembly/Test1/X12 V_4, + class assembly/Test1/X12 V_5, + class assembly/Test1/X13 V_6, + class assembly/Test1/X13 V_7, + class assembly/Test1/X14 V_8, + class assembly/Test1/X14 V_9) + IL_0000: ldarg.0 + IL_0001: brfalse IL_00c0 + + IL_0006: ldarg.1 + IL_0007: brfalse IL_00be + + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Test1::_tag + IL_0012: stloc.0 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Test1::_tag + IL_0019: stloc.1 + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: bne.un IL_00bc + + IL_0021: ldarg.0 + IL_0022: call instance int32 assembly/Test1::get_Tag() + IL_0027: switch ( + IL_003c, + IL_0059, + IL_007a, + IL_009b) + IL_003c: ldarg.0 + IL_003d: castclass assembly/Test1/X11 + IL_0042: stloc.2 + IL_0043: ldarg.1 + IL_0044: castclass assembly/Test1/X11 + IL_0049: stloc.3 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/Test1/X11::item + IL_0050: ldloc.3 + IL_0051: ldfld int32 assembly/Test1/X11::item + IL_0056: ceq + IL_0058: ret + + IL_0059: ldarg.0 + IL_005a: castclass assembly/Test1/X12 + IL_005f: stloc.s V_4 + IL_0061: ldarg.1 + IL_0062: castclass assembly/Test1/X12 + IL_0067: stloc.s V_5 + IL_0069: ldloc.s V_4 + IL_006b: ldfld int32 assembly/Test1/X12::item + IL_0070: ldloc.s V_5 + IL_0072: ldfld int32 assembly/Test1/X12::item + IL_0077: ceq + IL_0079: ret + + IL_007a: ldarg.0 + IL_007b: castclass assembly/Test1/X13 + IL_0080: stloc.s V_6 + IL_0082: ldarg.1 + IL_0083: castclass assembly/Test1/X13 + IL_0088: stloc.s V_7 + IL_008a: ldloc.s V_6 + IL_008c: ldfld int32 assembly/Test1/X13::item + IL_0091: ldloc.s V_7 + IL_0093: ldfld int32 assembly/Test1/X13::item + IL_0098: ceq + IL_009a: ret + + IL_009b: ldarg.0 + IL_009c: castclass assembly/Test1/X14 + IL_00a1: stloc.s V_8 + IL_00a3: ldarg.1 + IL_00a4: castclass assembly/Test1/X14 + IL_00a9: stloc.s V_9 + IL_00ab: ldloc.s V_8 + IL_00ad: ldfld int32 assembly/Test1/X14::item + IL_00b2: ldloc.s V_9 + IL_00b4: ldfld int32 assembly/Test1/X14::item + IL_00b9: ceq + IL_00bb: ret + + IL_00bc: ldc.i4.0 + IL_00bd: ret + + IL_00be: ldc.i4.0 + IL_00bf: ret + + IL_00c0: ldarg.1 + IL_00c1: ldnull + IL_00c2: cgt.un + IL_00c4: ldc.i4.0 + IL_00c5: ceq + IL_00c7: 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/Test1 V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Test1 + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Test1::Equals(class assembly/Test1) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: 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 ) @@ -810,256 +920,146 @@ IL_000b: ret } - .method public hidebysig instance bool Equals(class assembly/Test1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public static class assembly/Test1 NewX11(int32 item) 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 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 4 - .locals init (int32 V_0, - int32 V_1, - class assembly/Test1/X11 V_2, - class assembly/Test1/X11 V_3, - class assembly/Test1/X12 V_4, - class assembly/Test1/X12 V_5, - class assembly/Test1/X13 V_6, - class assembly/Test1/X13 V_7, - class assembly/Test1/X14 V_8, - class assembly/Test1/X14 V_9) - IL_0000: ldarg.0 - IL_0001: brfalse IL_00c0 - - IL_0006: ldarg.1 - IL_0007: brfalse IL_00be - - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/Test1::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 assembly/Test1::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un IL_00bc - - IL_0021: ldarg.0 - IL_0022: call instance int32 assembly/Test1::get_Tag() - IL_0027: switch ( - IL_003c, - IL_0059, - IL_007a, - IL_009b) - IL_003c: ldarg.0 - IL_003d: castclass assembly/Test1/X11 - IL_0042: stloc.2 - IL_0043: ldarg.1 - IL_0044: castclass assembly/Test1/X11 - IL_0049: stloc.3 - IL_004a: ldloc.2 - IL_004b: ldfld int32 assembly/Test1/X11::item - IL_0050: ldloc.3 - IL_0051: ldfld int32 assembly/Test1/X11::item - IL_0056: ceq - IL_0058: ret - - IL_0059: ldarg.0 - IL_005a: castclass assembly/Test1/X12 - IL_005f: stloc.s V_4 - IL_0061: ldarg.1 - IL_0062: castclass assembly/Test1/X12 - IL_0067: stloc.s V_5 - IL_0069: ldloc.s V_4 - IL_006b: ldfld int32 assembly/Test1/X12::item - IL_0070: ldloc.s V_5 - IL_0072: ldfld int32 assembly/Test1/X12::item - IL_0077: ceq - IL_0079: ret - - IL_007a: ldarg.0 - IL_007b: castclass assembly/Test1/X13 - IL_0080: stloc.s V_6 - IL_0082: ldarg.1 - IL_0083: castclass assembly/Test1/X13 - IL_0088: stloc.s V_7 - IL_008a: ldloc.s V_6 - IL_008c: ldfld int32 assembly/Test1/X13::item - IL_0091: ldloc.s V_7 - IL_0093: ldfld int32 assembly/Test1/X13::item - IL_0098: ceq - IL_009a: ret - - IL_009b: ldarg.0 - IL_009c: castclass assembly/Test1/X14 - IL_00a1: stloc.s V_8 - IL_00a3: ldarg.1 - IL_00a4: castclass assembly/Test1/X14 - IL_00a9: stloc.s V_9 - IL_00ab: ldloc.s V_8 - IL_00ad: ldfld int32 assembly/Test1/X14::item - IL_00b2: ldloc.s V_9 - IL_00b4: ldfld int32 assembly/Test1/X14::item - IL_00b9: ceq - IL_00bb: ret - - IL_00bc: ldc.i4.0 - IL_00bd: ret - - IL_00be: ldc.i4.0 - IL_00bf: ret - - IL_00c0: ldarg.1 - IL_00c1: ldnull - IL_00c2: cgt.un - IL_00c4: ldc.i4.0 - IL_00c5: ceq - IL_00c7: ret + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/Test1/X11::.ctor(int32) + IL_0006: ret } - .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public static class assembly/Test1 NewX12(int32 item) 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 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 5 - .locals init (class assembly/Test1 V_0) - IL_0000: ldarg.1 - IL_0001: isinst assembly/Test1 - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0013 - - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: ldarg.2 - IL_000d: callvirt instance bool assembly/Test1::Equals(class assembly/Test1, - class [runtime]System.Collections.IEqualityComparer) - IL_0012: ret - - IL_0013: ldc.i4.0 - IL_0014: ret + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/Test1/X12::.ctor(int32) + IL_0006: ret } - .method public hidebysig virtual final instance bool Equals(class assembly/Test1 obj) cil managed + .method public static class assembly/Test1 NewX13(int32 item) 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 ) - .maxstack 4 - .locals init (int32 V_0, - int32 V_1, - class assembly/Test1/X11 V_2, - class assembly/Test1/X11 V_3, - class assembly/Test1/X12 V_4, - class assembly/Test1/X12 V_5, - class assembly/Test1/X13 V_6, - class assembly/Test1/X13 V_7, - class assembly/Test1/X14 V_8, - class assembly/Test1/X14 V_9) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse IL_00c0 - - IL_0006: ldarg.1 - IL_0007: brfalse IL_00be - - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/Test1::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 assembly/Test1::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un IL_00bc - - IL_0021: ldarg.0 - IL_0022: call instance int32 assembly/Test1::get_Tag() - IL_0027: switch ( - IL_003c, - IL_0059, - IL_007a, - IL_009b) - IL_003c: ldarg.0 - IL_003d: castclass assembly/Test1/X11 - IL_0042: stloc.2 - IL_0043: ldarg.1 - IL_0044: castclass assembly/Test1/X11 - IL_0049: stloc.3 - IL_004a: ldloc.2 - IL_004b: ldfld int32 assembly/Test1/X11::item - IL_0050: ldloc.3 - IL_0051: ldfld int32 assembly/Test1/X11::item - IL_0056: ceq - IL_0058: ret - - IL_0059: ldarg.0 - IL_005a: castclass assembly/Test1/X12 - IL_005f: stloc.s V_4 - IL_0061: ldarg.1 - IL_0062: castclass assembly/Test1/X12 - IL_0067: stloc.s V_5 - IL_0069: ldloc.s V_4 - IL_006b: ldfld int32 assembly/Test1/X12::item - IL_0070: ldloc.s V_5 - IL_0072: ldfld int32 assembly/Test1/X12::item - IL_0077: ceq - IL_0079: ret + IL_0001: newobj instance void assembly/Test1/X13::.ctor(int32) + IL_0006: ret + } - IL_007a: ldarg.0 - IL_007b: castclass assembly/Test1/X13 - IL_0080: stloc.s V_6 - IL_0082: ldarg.1 - IL_0083: castclass assembly/Test1/X13 - IL_0088: stloc.s V_7 - IL_008a: ldloc.s V_6 - IL_008c: ldfld int32 assembly/Test1/X13::item - IL_0091: ldloc.s V_7 - IL_0093: ldfld int32 assembly/Test1/X13::item - IL_0098: ceq - IL_009a: ret + .method public static class assembly/Test1 NewX14(int32 item) 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 03 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: ldarg.0 + IL_0001: newobj instance void assembly/Test1/X14::.ctor(int32) + IL_0006: ret + } - IL_009b: ldarg.0 - IL_009c: castclass assembly/Test1/X14 - IL_00a1: stloc.s V_8 - IL_00a3: ldarg.1 - IL_00a4: castclass assembly/Test1/X14 - IL_00a9: stloc.s V_9 - IL_00ab: ldloc.s V_8 - IL_00ad: ldfld int32 assembly/Test1/X14::item - IL_00b2: ldloc.s V_9 - IL_00b4: ldfld int32 assembly/Test1/X14::item - IL_00b9: ceq - IL_00bb: 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/Test1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } - IL_00bc: ldc.i4.0 - IL_00bd: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } - IL_00be: ldc.i4.0 - IL_00bf: ret + .method public hidebysig instance bool get_IsX11() 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/Test1::get_Tag() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } - IL_00c0: ldarg.1 - IL_00c1: ldnull - IL_00c2: cgt.un - IL_00c4: ldc.i4.0 - IL_00c5: ceq - IL_00c7: ret + .method public hidebysig instance bool get_IsX12() 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/Test1::get_Tag() + IL_0006: ldc.i4.1 + IL_0007: ceq + IL_0009: ret } - .method public hidebysig virtual final instance bool Equals(object obj) cil managed + .method public hidebysig instance bool get_IsX13() 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 4 - .locals init (class assembly/Test1 V_0) - IL_0000: ldarg.1 - IL_0001: isinst assembly/Test1 - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance int32 assembly/Test1::get_Tag() + IL_0006: ldc.i4.2 + IL_0007: ceq + IL_0009: ret + } - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: callvirt instance bool assembly/Test1::Equals(class assembly/Test1) - IL_0011: ret + .method public hidebysig instance bool get_IsX14() 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/Test1::get_Tag() + IL_0006: ldc.i4.3 + IL_0007: ceq + IL_0009: ret + } - IL_0012: ldc.i4.0 - IL_0013: 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/Test1::_tag + IL_0006: ret } .property instance int32 Tag() @@ -1099,6 +1099,15 @@ } } + .method public static int32 fm(class assembly/Test1 y) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call int32 assembly::select1(class assembly/Test1) + IL_0006: ret + } + .method public static int32 select1(class assembly/Test1 x) cil managed { @@ -1126,15 +1135,6 @@ IL_002d: ret } - .method public static int32 fm(class assembly/Test1 y) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call int32 assembly::select1(class assembly/Test1) - IL_0006: ret - } - .method assembly static int32 CompareTo$cont@4(class assembly/Test1 this, class assembly/Test1 obj, class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed @@ -1423,4 +1423,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.bsl index 3553599f1e1..4bb19b5aabd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.bsl @@ -29,20 +29,20 @@ -.class public abstract auto ansi sealed Match01 +.class public abstract auto ansi sealed assembly 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 abstract auto autochar serializable nested public beforefieldinit Test1 extends [runtime]System.Object - implements class [runtime]System.IEquatable`1, + implements class [runtime]System.IEquatable`1, [runtime]System.Collections.IStructuralEquatable, - class [runtime]System.IComparable`1, + class [runtime]System.IComparable`1, [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 ) + 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 @@ -54,32 +54,32 @@ } .class auto ansi serializable nested public beforefieldinit specialname X11 - extends Match01/Test1 + extends assembly/Test1 { .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 31 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) + 2B 58 31 31 40 44 65 62 75 67 54 79 70 65 50 72 + 6F 78 79 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 ) + 61 79 28 29 2C 6E 71 7D 00 00 ) .field assembly initonly int32 item .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 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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: ldc.i4.0 - IL_0002: call instance void Match01/Test1::.ctor(int32) + IL_0002: call instance void assembly/Test1::.ctor(int32) IL_0007: ldarg.0 IL_0008: ldarg.1 - IL_0009: stfld int32 Match01/Test1/X11::item + IL_0009: stfld int32 assembly/Test1/X11::item IL_000e: ret } @@ -90,7 +90,7 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1/X11::item + IL_0001: ldfld int32 assembly/Test1/X11::item IL_0006: ret } @@ -101,37 +101,37 @@ int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 Match01/Test1/X11::get_Item() + .get instance int32 assembly/Test1/X11::get_Item() } } .class auto ansi serializable nested public beforefieldinit specialname X12 - extends Match01/Test1 + extends assembly/Test1 { .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 32 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) + 2B 58 31 32 40 44 65 62 75 67 54 79 70 65 50 72 + 6F 78 79 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 ) + 61 79 28 29 2C 6E 71 7D 00 00 ) .field assembly initonly int32 item .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 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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: ldc.i4.1 - IL_0002: call instance void Match01/Test1::.ctor(int32) + IL_0002: call instance void assembly/Test1::.ctor(int32) IL_0007: ldarg.0 IL_0008: ldarg.1 - IL_0009: stfld int32 Match01/Test1/X12::item + IL_0009: stfld int32 assembly/Test1/X12::item IL_000e: ret } @@ -142,7 +142,7 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1/X12::item + IL_0001: ldfld int32 assembly/Test1/X12::item IL_0006: ret } @@ -153,37 +153,37 @@ int32) = ( 01 00 04 00 00 00 01 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 ) - .get instance int32 Match01/Test1/X12::get_Item() + .get instance int32 assembly/Test1/X12::get_Item() } } .class auto ansi serializable nested public beforefieldinit specialname X13 - extends Match01/Test1 + extends assembly/Test1 { .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 33 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) + 2B 58 31 33 40 44 65 62 75 67 54 79 70 65 50 72 + 6F 78 79 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 ) + 61 79 28 29 2C 6E 71 7D 00 00 ) .field assembly initonly int32 item .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 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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: ldc.i4.2 - IL_0002: call instance void Match01/Test1::.ctor(int32) + IL_0002: call instance void assembly/Test1::.ctor(int32) IL_0007: ldarg.0 IL_0008: ldarg.1 - IL_0009: stfld int32 Match01/Test1/X13::item + IL_0009: stfld int32 assembly/Test1/X13::item IL_000e: ret } @@ -194,7 +194,7 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1/X13::item + IL_0001: ldfld int32 assembly/Test1/X13::item IL_0006: ret } @@ -205,37 +205,37 @@ int32) = ( 01 00 04 00 00 00 02 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 ) - .get instance int32 Match01/Test1/X13::get_Item() + .get instance int32 assembly/Test1/X13::get_Item() } } .class auto ansi serializable nested public beforefieldinit specialname X14 - extends Match01/Test1 + extends assembly/Test1 { .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 34 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) + 2B 58 31 34 40 44 65 62 75 67 54 79 70 65 50 72 + 6F 78 79 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 ) + 61 79 28 29 2C 6E 71 7D 00 00 ) .field assembly initonly int32 item .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 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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: ldc.i4.3 - IL_0002: call instance void Match01/Test1::.ctor(int32) + IL_0002: call instance void assembly/Test1::.ctor(int32) IL_0007: ldarg.0 IL_0008: ldarg.1 - IL_0009: stfld int32 Match01/Test1/X14::item + IL_0009: stfld int32 assembly/Test1/X14::item IL_000e: ret } @@ -246,7 +246,7 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1/X14::item + IL_0001: ldfld int32 assembly/Test1/X14::item IL_0006: ret } @@ -257,22 +257,22 @@ int32) = ( 01 00 04 00 00 00 03 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 ) - .get instance int32 Match01/Test1/X14::get_Item() + .get instance int32 assembly/Test1/X14::get_Item() } } .class auto ansi nested assembly beforefieldinit specialname X11@DebugTypeProxy extends [runtime]System.Object { - .field assembly class Match01/Test1/X11 _obj + .field assembly class assembly/Test1/X11 _obj .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 public specialname rtspecialname instance void .ctor(class Match01/Test1/X11 obj) cil managed + .method public specialname rtspecialname instance void .ctor(class assembly/Test1/X11 obj) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -281,7 +281,7 @@ IL_0001: call instance void [runtime]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1/X11 Match01/Test1/X11@DebugTypeProxy::_obj + IL_0008: stfld class assembly/Test1/X11 assembly/Test1/X11@DebugTypeProxy::_obj IL_000d: ret } @@ -292,8 +292,8 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1/X11 Match01/Test1/X11@DebugTypeProxy::_obj - IL_0006: ldfld int32 Match01/Test1/X11::item + IL_0001: ldfld class assembly/Test1/X11 assembly/Test1/X11@DebugTypeProxy::_obj + IL_0006: ldfld int32 assembly/Test1/X11::item IL_000b: ret } @@ -304,22 +304,22 @@ int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 Match01/Test1/X11@DebugTypeProxy::get_Item() + .get instance int32 assembly/Test1/X11@DebugTypeProxy::get_Item() } } .class auto ansi nested assembly beforefieldinit specialname X12@DebugTypeProxy extends [runtime]System.Object { - .field assembly class Match01/Test1/X12 _obj + .field assembly class assembly/Test1/X12 _obj .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 public specialname rtspecialname instance void .ctor(class Match01/Test1/X12 obj) cil managed + .method public specialname rtspecialname instance void .ctor(class assembly/Test1/X12 obj) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -328,7 +328,7 @@ IL_0001: call instance void [runtime]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1/X12 Match01/Test1/X12@DebugTypeProxy::_obj + IL_0008: stfld class assembly/Test1/X12 assembly/Test1/X12@DebugTypeProxy::_obj IL_000d: ret } @@ -339,8 +339,8 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1/X12 Match01/Test1/X12@DebugTypeProxy::_obj - IL_0006: ldfld int32 Match01/Test1/X12::item + IL_0001: ldfld class assembly/Test1/X12 assembly/Test1/X12@DebugTypeProxy::_obj + IL_0006: ldfld int32 assembly/Test1/X12::item IL_000b: ret } @@ -351,22 +351,22 @@ int32) = ( 01 00 04 00 00 00 01 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 ) - .get instance int32 Match01/Test1/X12@DebugTypeProxy::get_Item() + .get instance int32 assembly/Test1/X12@DebugTypeProxy::get_Item() } } .class auto ansi nested assembly beforefieldinit specialname X13@DebugTypeProxy extends [runtime]System.Object { - .field assembly class Match01/Test1/X13 _obj + .field assembly class assembly/Test1/X13 _obj .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 public specialname rtspecialname instance void .ctor(class Match01/Test1/X13 obj) cil managed + .method public specialname rtspecialname instance void .ctor(class assembly/Test1/X13 obj) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -375,7 +375,7 @@ IL_0001: call instance void [runtime]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1/X13 Match01/Test1/X13@DebugTypeProxy::_obj + IL_0008: stfld class assembly/Test1/X13 assembly/Test1/X13@DebugTypeProxy::_obj IL_000d: ret } @@ -386,8 +386,8 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1/X13 Match01/Test1/X13@DebugTypeProxy::_obj - IL_0006: ldfld int32 Match01/Test1/X13::item + IL_0001: ldfld class assembly/Test1/X13 assembly/Test1/X13@DebugTypeProxy::_obj + IL_0006: ldfld int32 assembly/Test1/X13::item IL_000b: ret } @@ -398,22 +398,22 @@ int32) = ( 01 00 04 00 00 00 02 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 ) - .get instance int32 Match01/Test1/X13@DebugTypeProxy::get_Item() + .get instance int32 assembly/Test1/X13@DebugTypeProxy::get_Item() } } .class auto ansi nested assembly beforefieldinit specialname X14@DebugTypeProxy extends [runtime]System.Object { - .field assembly class Match01/Test1/X14 _obj + .field assembly class assembly/Test1/X14 _obj .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 public specialname rtspecialname instance void .ctor(class Match01/Test1/X14 obj) cil managed + .method public specialname rtspecialname instance void .ctor(class assembly/Test1/X14 obj) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -422,7 +422,7 @@ IL_0001: call instance void [runtime]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1/X14 Match01/Test1/X14@DebugTypeProxy::_obj + IL_0008: stfld class assembly/Test1/X14 assembly/Test1/X14@DebugTypeProxy::_obj IL_000d: ret } @@ -433,8 +433,8 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1/X14 Match01/Test1/X14@DebugTypeProxy::_obj - IL_0006: ldfld int32 Match01/Test1/X14::item + IL_0001: ldfld class assembly/Test1/X14 assembly/Test1/X14@DebugTypeProxy::_obj + IL_0006: ldfld int32 assembly/Test1/X14::item IL_000b: ret } @@ -445,22 +445,22 @@ int32) = ( 01 00 04 00 00 00 03 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 ) - .get instance int32 Match01/Test1/X14@DebugTypeProxy::get_Item() + .get instance int32 assembly/Test1/X14@DebugTypeProxy::get_Item() } } .class auto ansi serializable sealed nested assembly beforefieldinit clo@4 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - .field public class Match01/Test1 this + .field public class assembly/Test1 this .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 Match01/Test1 obj + .field public class assembly/Test1 obj .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 Match01/Test1 this, class Match01/Test1 obj) cil managed + .method assembly specialname rtspecialname instance void .ctor(class assembly/Test1 this, class assembly/Test1 obj) 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 ) @@ -470,10 +470,10 @@ 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 Match01/Test1 Match01/Test1/clo@4::this + IL_0008: stfld class assembly/Test1 assembly/Test1/clo@4::this IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class Match01/Test1 Match01/Test1/clo@4::obj + IL_000f: stfld class assembly/Test1 assembly/Test1/clo@4::obj IL_0014: ret } @@ -483,52 +483,52 @@ .maxstack 7 .locals init (int32 V_0, int32 V_1, - class Match01/Test1/X11 V_2, - class Match01/Test1/X11 V_3, + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, class [runtime]System.Collections.IComparer V_4, int32 V_5, int32 V_6, - class Match01/Test1/X12 V_7, - class Match01/Test1/X12 V_8, - class Match01/Test1/X13 V_9, - class Match01/Test1/X13 V_10, - class Match01/Test1/X14 V_11, - class Match01/Test1/X14 V_12) + class assembly/Test1/X12 V_7, + class assembly/Test1/X12 V_8, + class assembly/Test1/X13 V_9, + class assembly/Test1/X13 V_10, + class assembly/Test1/X14 V_11, + class assembly/Test1/X14 V_12) IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0006: ldfld int32 Match01/Test1::_tag + IL_0001: ldfld class assembly/Test1 assembly/Test1/clo@4::this + IL_0006: ldfld int32 assembly/Test1::_tag IL_000b: stloc.0 IL_000c: ldarg.0 - IL_000d: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_0012: ldfld int32 Match01/Test1::_tag + IL_000d: ldfld class assembly/Test1 assembly/Test1/clo@4::obj + IL_0012: ldfld int32 assembly/Test1::_tag IL_0017: stloc.1 IL_0018: ldloc.0 IL_0019: ldloc.1 IL_001a: bne.un IL_013f IL_001f: ldarg.0 - IL_0020: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0025: call instance int32 Match01/Test1::get_Tag() + IL_0020: ldfld class assembly/Test1 assembly/Test1/clo@4::this + IL_0025: call instance int32 assembly/Test1::get_Tag() IL_002a: switch ( IL_003f, IL_007c, IL_00bd, IL_00fe) IL_003f: ldarg.0 - IL_0040: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0045: castclass Match01/Test1/X11 + IL_0040: ldfld class assembly/Test1 assembly/Test1/clo@4::this + IL_0045: castclass assembly/Test1/X11 IL_004a: stloc.2 IL_004b: ldarg.0 - IL_004c: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_0051: castclass Match01/Test1/X11 + IL_004c: ldfld class assembly/Test1 assembly/Test1/clo@4::obj + IL_0051: castclass assembly/Test1/X11 IL_0056: stloc.3 IL_0057: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() IL_005c: stloc.s V_4 IL_005e: ldloc.2 - IL_005f: ldfld int32 Match01/Test1/X11::item + IL_005f: ldfld int32 assembly/Test1/X11::item IL_0064: stloc.s V_5 IL_0066: ldloc.3 - IL_0067: ldfld int32 Match01/Test1/X11::item + IL_0067: ldfld int32 assembly/Test1/X11::item IL_006c: stloc.s V_6 IL_006e: ldloc.s V_5 IL_0070: ldloc.s V_6 @@ -540,20 +540,20 @@ IL_007b: ret IL_007c: ldarg.0 - IL_007d: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0082: castclass Match01/Test1/X12 + IL_007d: ldfld class assembly/Test1 assembly/Test1/clo@4::this + IL_0082: castclass assembly/Test1/X12 IL_0087: stloc.s V_7 IL_0089: ldarg.0 - IL_008a: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_008f: castclass Match01/Test1/X12 + IL_008a: ldfld class assembly/Test1 assembly/Test1/clo@4::obj + IL_008f: castclass assembly/Test1/X12 IL_0094: stloc.s V_8 IL_0096: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() IL_009b: stloc.s V_4 IL_009d: ldloc.s V_7 - IL_009f: ldfld int32 Match01/Test1/X12::item + IL_009f: ldfld int32 assembly/Test1/X12::item IL_00a4: stloc.s V_5 IL_00a6: ldloc.s V_8 - IL_00a8: ldfld int32 Match01/Test1/X12::item + IL_00a8: ldfld int32 assembly/Test1/X12::item IL_00ad: stloc.s V_6 IL_00af: ldloc.s V_5 IL_00b1: ldloc.s V_6 @@ -565,20 +565,20 @@ IL_00bc: ret IL_00bd: ldarg.0 - IL_00be: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_00c3: castclass Match01/Test1/X13 + IL_00be: ldfld class assembly/Test1 assembly/Test1/clo@4::this + IL_00c3: castclass assembly/Test1/X13 IL_00c8: stloc.s V_9 IL_00ca: ldarg.0 - IL_00cb: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_00d0: castclass Match01/Test1/X13 + IL_00cb: ldfld class assembly/Test1 assembly/Test1/clo@4::obj + IL_00d0: castclass assembly/Test1/X13 IL_00d5: stloc.s V_10 IL_00d7: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() IL_00dc: stloc.s V_4 IL_00de: ldloc.s V_9 - IL_00e0: ldfld int32 Match01/Test1/X13::item + IL_00e0: ldfld int32 assembly/Test1/X13::item IL_00e5: stloc.s V_5 IL_00e7: ldloc.s V_10 - IL_00e9: ldfld int32 Match01/Test1/X13::item + IL_00e9: ldfld int32 assembly/Test1/X13::item IL_00ee: stloc.s V_6 IL_00f0: ldloc.s V_5 IL_00f2: ldloc.s V_6 @@ -590,20 +590,20 @@ IL_00fd: ret IL_00fe: ldarg.0 - IL_00ff: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0104: castclass Match01/Test1/X14 + IL_00ff: ldfld class assembly/Test1 assembly/Test1/clo@4::this + IL_0104: castclass assembly/Test1/X14 IL_0109: stloc.s V_11 IL_010b: ldarg.0 - IL_010c: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_0111: castclass Match01/Test1/X14 + IL_010c: ldfld class assembly/Test1 assembly/Test1/clo@4::obj + IL_0111: castclass assembly/Test1/X14 IL_0116: stloc.s V_12 IL_0118: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() IL_011d: stloc.s V_4 IL_011f: ldloc.s V_11 - IL_0121: ldfld int32 Match01/Test1/X14::item + IL_0121: ldfld int32 assembly/Test1/X14::item IL_0126: stloc.s V_5 IL_0128: ldloc.s V_12 - IL_012a: ldfld int32 Match01/Test1/X14::item + IL_012a: ldfld int32 assembly/Test1/X14::item IL_012f: stloc.s V_6 IL_0131: ldloc.s V_5 IL_0133: ldloc.s V_6 @@ -625,7 +625,7 @@ .class auto ansi serializable sealed nested assembly beforefieldinit 'clo@4-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - .field public class Match01/Test1 this + .field public class assembly/Test1 this .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 ) @@ -633,14 +633,14 @@ .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 Match01/Test1 objTemp + .field public class assembly/Test1 objTemp .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 Match01/Test1 this, + instance void .ctor(class assembly/Test1 this, object obj, - class Match01/Test1 objTemp) cil managed + class assembly/Test1 objTemp) 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 ) @@ -650,13 +650,13 @@ 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 Match01/Test1 Match01/Test1/'clo@4-1'::this + IL_0008: stfld class assembly/Test1 assembly/Test1/'clo@4-1'::this IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld object Match01/Test1/'clo@4-1'::obj + IL_000f: stfld object assembly/Test1/'clo@4-1'::obj IL_0014: ldarg.0 IL_0015: ldarg.3 - IL_0016: stfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp + IL_0016: stfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp IL_001b: ret } @@ -666,54 +666,54 @@ .maxstack 7 .locals init (int32 V_0, int32 V_1, - class Match01/Test1/X11 V_2, - class Match01/Test1/X11 V_3, + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, int32 V_4, int32 V_5, - class Match01/Test1/X12 V_6, - class Match01/Test1/X12 V_7, - class Match01/Test1/X13 V_8, - class Match01/Test1/X13 V_9, - class Match01/Test1/X14 V_10, - class Match01/Test1/X14 V_11) + class assembly/Test1/X12 V_6, + class assembly/Test1/X12 V_7, + class assembly/Test1/X13 V_8, + class assembly/Test1/X13 V_9, + class assembly/Test1/X14 V_10, + class assembly/Test1/X14 V_11) IL_0000: ldarg.0 - IL_0001: ldfld object Match01/Test1/'clo@4-1'::obj - IL_0006: unbox.any Match01/Test1 + IL_0001: ldfld object assembly/Test1/'clo@4-1'::obj + IL_0006: unbox.any assembly/Test1 IL_000b: brfalse IL_0137 IL_0010: ldarg.0 - IL_0011: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_0016: ldfld int32 Match01/Test1::_tag + IL_0011: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this + IL_0016: ldfld int32 assembly/Test1::_tag IL_001b: stloc.0 IL_001c: ldarg.0 - IL_001d: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_0022: ldfld int32 Match01/Test1::_tag + IL_001d: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp + IL_0022: ldfld int32 assembly/Test1::_tag IL_0027: stloc.1 IL_0028: ldloc.0 IL_0029: ldloc.1 IL_002a: bne.un IL_0133 IL_002f: ldarg.0 - IL_0030: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_0035: call instance int32 Match01/Test1::get_Tag() + IL_0030: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this + IL_0035: call instance int32 assembly/Test1::get_Tag() IL_003a: switch ( IL_004f, IL_0085, IL_00bf, IL_00f9) IL_004f: ldarg.0 - IL_0050: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_0055: castclass Match01/Test1/X11 + IL_0050: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this + IL_0055: castclass assembly/Test1/X11 IL_005a: stloc.2 IL_005b: ldarg.0 - IL_005c: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_0061: castclass Match01/Test1/X11 + IL_005c: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp + IL_0061: castclass assembly/Test1/X11 IL_0066: stloc.3 IL_0067: ldloc.2 - IL_0068: ldfld int32 Match01/Test1/X11::item + IL_0068: ldfld int32 assembly/Test1/X11::item IL_006d: stloc.s V_4 IL_006f: ldloc.3 - IL_0070: ldfld int32 Match01/Test1/X11::item + IL_0070: ldfld int32 assembly/Test1/X11::item IL_0075: stloc.s V_5 IL_0077: ldloc.s V_4 IL_0079: ldloc.s V_5 @@ -725,18 +725,18 @@ IL_0084: ret IL_0085: ldarg.0 - IL_0086: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_008b: castclass Match01/Test1/X12 + IL_0086: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this + IL_008b: castclass assembly/Test1/X12 IL_0090: stloc.s V_6 IL_0092: ldarg.0 - IL_0093: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_0098: castclass Match01/Test1/X12 + IL_0093: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp + IL_0098: castclass assembly/Test1/X12 IL_009d: stloc.s V_7 IL_009f: ldloc.s V_6 - IL_00a1: ldfld int32 Match01/Test1/X12::item + IL_00a1: ldfld int32 assembly/Test1/X12::item IL_00a6: stloc.s V_4 IL_00a8: ldloc.s V_7 - IL_00aa: ldfld int32 Match01/Test1/X12::item + IL_00aa: ldfld int32 assembly/Test1/X12::item IL_00af: stloc.s V_5 IL_00b1: ldloc.s V_4 IL_00b3: ldloc.s V_5 @@ -748,18 +748,18 @@ IL_00be: ret IL_00bf: ldarg.0 - IL_00c0: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_00c5: castclass Match01/Test1/X13 + IL_00c0: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this + IL_00c5: castclass assembly/Test1/X13 IL_00ca: stloc.s V_8 IL_00cc: ldarg.0 - IL_00cd: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_00d2: castclass Match01/Test1/X13 + IL_00cd: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp + IL_00d2: castclass assembly/Test1/X13 IL_00d7: stloc.s V_9 IL_00d9: ldloc.s V_8 - IL_00db: ldfld int32 Match01/Test1/X13::item + IL_00db: ldfld int32 assembly/Test1/X13::item IL_00e0: stloc.s V_4 IL_00e2: ldloc.s V_9 - IL_00e4: ldfld int32 Match01/Test1/X13::item + IL_00e4: ldfld int32 assembly/Test1/X13::item IL_00e9: stloc.s V_5 IL_00eb: ldloc.s V_4 IL_00ed: ldloc.s V_5 @@ -771,18 +771,18 @@ IL_00f8: ret IL_00f9: ldarg.0 - IL_00fa: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_00ff: castclass Match01/Test1/X14 + IL_00fa: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this + IL_00ff: castclass assembly/Test1/X14 IL_0104: stloc.s V_10 IL_0106: ldarg.0 - IL_0107: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_010c: castclass Match01/Test1/X14 + IL_0107: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp + IL_010c: castclass assembly/Test1/X14 IL_0111: stloc.s V_11 IL_0113: ldloc.s V_10 - IL_0115: ldfld int32 Match01/Test1/X14::item + IL_0115: ldfld int32 assembly/Test1/X14::item IL_011a: stloc.s V_4 IL_011c: ldloc.s V_11 - IL_011e: ldfld int32 Match01/Test1/X14::item + IL_011e: ldfld int32 assembly/Test1/X14::item IL_0123: stloc.s V_5 IL_0125: ldloc.s V_4 IL_0127: ldloc.s V_5 @@ -810,9 +810,9 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) + .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 0D 4D 61 74 63 68 30 31 2B 54 + 65 73 74 31 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 ) @@ -821,153 +821,11 @@ IL_0001: call instance void [runtime]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld int32 Match01/Test1::_tag + IL_0008: stfld int32 assembly/Test1::_tag IL_000d: ret } - .method public static class Match01/Test1 NewX11(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void Match01/Test1/X11::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX11() 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 Match01/Test1::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret - } - - .method public static class Match01/Test1 NewX12(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void Match01/Test1/X12::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX12() 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 Match01/Test1::get_Tag() - IL_0006: ldc.i4.1 - IL_0007: ceq - IL_0009: ret - } - - .method public static class Match01/Test1 NewX13(int32 item) 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 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void Match01/Test1/X13::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX13() 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 Match01/Test1::get_Tag() - IL_0006: ldc.i4.2 - IL_0007: ceq - IL_0009: ret - } - - .method public static class Match01/Test1 NewX14(int32 item) 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 03 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: ldarg.0 - IL_0001: newobj instance void Match01/Test1/X14::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX14() 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 Match01/Test1::get_Tag() - IL_0006: ldc.i4.3 - 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 Match01/Test1::_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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 Match01/Test1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 Match01/Test1 obj) cil managed + .method public hidebysig virtual final instance int32 CompareTo(class assembly/Test1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -981,8 +839,8 @@ IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: newobj instance void Match01/Test1/clo@4::.ctor(class Match01/Test1, - class Match01/Test1) + IL_0008: newobj instance void assembly/Test1/clo@4::.ctor(class assembly/Test1, + class assembly/Test1) IL_000d: stloc.0 IL_000e: ldloc.0 IL_000f: ldnull @@ -1010,8 +868,8 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: unbox.any Match01/Test1 - IL_0007: callvirt instance int32 Match01/Test1::CompareTo(class Match01/Test1) + IL_0002: unbox.any assembly/Test1 + IL_0007: callvirt instance int32 assembly/Test1::CompareTo(class assembly/Test1) IL_000c: ret } @@ -1020,10 +878,10 @@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 5 - .locals init (class Match01/Test1 V_0, + .locals init (class assembly/Test1 V_0, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_1) IL_0000: ldarg.1 - IL_0001: unbox.any Match01/Test1 + IL_0001: unbox.any assembly/Test1 IL_0006: stloc.0 IL_0007: ldarg.0 IL_0008: brfalse.s IL_001d @@ -1031,9 +889,9 @@ IL_000a: ldarg.0 IL_000b: ldarg.1 IL_000c: ldloc.0 - IL_000d: newobj instance void Match01/Test1/'clo@4-1'::.ctor(class Match01/Test1, + IL_000d: newobj instance void assembly/Test1/'clo@4-1'::.ctor(class assembly/Test1, object, - class Match01/Test1) + class assembly/Test1) IL_0012: stloc.1 IL_0013: ldloc.1 IL_0014: ldnull @@ -1042,7 +900,7 @@ IL_001c: ret IL_001d: ldarg.1 - IL_001e: unbox.any Match01/Test1 + IL_001e: unbox.any assembly/Test1 IL_0023: brfalse.s IL_0027 IL_0025: ldc.i4.m1 @@ -1052,142 +910,21 @@ IL_0028: 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 7 - .locals init (int32 V_0, - class Match01/Test1/X11 V_1, - class Match01/Test1/X12 V_2, - class Match01/Test1/X13 V_3, - class Match01/Test1/X14 V_4) - IL_0000: ldarg.0 - IL_0001: brfalse IL_00a5 - - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: call instance int32 Match01/Test1::get_Tag() - IL_000e: switch ( - IL_0023, - IL_0043, - IL_0063, - IL_0083) - IL_0023: ldarg.0 - IL_0024: castclass Match01/Test1/X11 - IL_0029: stloc.1 - IL_002a: ldc.i4.0 - IL_002b: stloc.0 - IL_002c: ldc.i4 0x9e3779b9 - IL_0031: ldloc.1 - IL_0032: ldfld int32 Match01/Test1/X11::item - IL_0037: ldloc.0 - IL_0038: ldc.i4.6 - IL_0039: shl - IL_003a: ldloc.0 - IL_003b: ldc.i4.2 - IL_003c: shr - IL_003d: add - IL_003e: add - IL_003f: add - IL_0040: stloc.0 - IL_0041: ldloc.0 - IL_0042: ret - - IL_0043: ldarg.0 - IL_0044: castclass Match01/Test1/X12 - IL_0049: stloc.2 - IL_004a: ldc.i4.1 - IL_004b: stloc.0 - IL_004c: ldc.i4 0x9e3779b9 - IL_0051: ldloc.2 - IL_0052: ldfld int32 Match01/Test1/X12::item - IL_0057: ldloc.0 - IL_0058: ldc.i4.6 - IL_0059: shl - IL_005a: ldloc.0 - IL_005b: ldc.i4.2 - IL_005c: shr - IL_005d: add - IL_005e: add - IL_005f: add - IL_0060: stloc.0 - IL_0061: ldloc.0 - IL_0062: ret - - IL_0063: ldarg.0 - IL_0064: castclass Match01/Test1/X13 - IL_0069: stloc.3 - IL_006a: ldc.i4.2 - IL_006b: stloc.0 - IL_006c: ldc.i4 0x9e3779b9 - IL_0071: ldloc.3 - IL_0072: ldfld int32 Match01/Test1/X13::item - IL_0077: ldloc.0 - IL_0078: ldc.i4.6 - IL_0079: shl - IL_007a: ldloc.0 - IL_007b: ldc.i4.2 - IL_007c: shr - IL_007d: add - IL_007e: add - IL_007f: add - IL_0080: stloc.0 - IL_0081: ldloc.0 - IL_0082: ret - - IL_0083: ldarg.0 - IL_0084: castclass Match01/Test1/X14 - IL_0089: stloc.s V_4 - IL_008b: ldc.i4.3 - IL_008c: stloc.0 - IL_008d: ldc.i4 0x9e3779b9 - IL_0092: ldloc.s V_4 - IL_0094: ldfld int32 Match01/Test1/X14::item - IL_0099: ldloc.0 - IL_009a: ldc.i4.6 - IL_009b: shl - IL_009c: ldloc.0 - IL_009d: ldc.i4.2 - IL_009e: shr - IL_009f: add - IL_00a0: add - IL_00a1: add - IL_00a2: stloc.0 - IL_00a3: ldloc.0 - IL_00a4: ret - - IL_00a5: ldc.i4.0 - IL_00a6: 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 Match01/Test1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool Equals(class Match01/Test1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class assembly/Test1 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 (int32 V_0, int32 V_1, - class Match01/Test1/X11 V_2, - class Match01/Test1/X11 V_3, - class Match01/Test1/X12 V_4, - class Match01/Test1/X12 V_5, - class Match01/Test1/X13 V_6, - class Match01/Test1/X13 V_7, - class Match01/Test1/X14 V_8, - class Match01/Test1/X14 V_9) + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, + class assembly/Test1/X12 V_4, + class assembly/Test1/X12 V_5, + class assembly/Test1/X13 V_6, + class assembly/Test1/X13 V_7, + class assembly/Test1/X14 V_8, + class assembly/Test1/X14 V_9) IL_0000: ldarg.0 IL_0001: brfalse IL_00c0 @@ -1195,71 +932,71 @@ IL_0007: brfalse IL_00be IL_000c: ldarg.0 - IL_000d: ldfld int32 Match01/Test1::_tag + IL_000d: ldfld int32 assembly/Test1::_tag IL_0012: stloc.0 IL_0013: ldarg.1 - IL_0014: ldfld int32 Match01/Test1::_tag + IL_0014: ldfld int32 assembly/Test1::_tag IL_0019: stloc.1 IL_001a: ldloc.0 IL_001b: ldloc.1 IL_001c: bne.un IL_00bc IL_0021: ldarg.0 - IL_0022: call instance int32 Match01/Test1::get_Tag() + IL_0022: call instance int32 assembly/Test1::get_Tag() IL_0027: switch ( IL_003c, IL_0059, IL_007a, IL_009b) IL_003c: ldarg.0 - IL_003d: castclass Match01/Test1/X11 + IL_003d: castclass assembly/Test1/X11 IL_0042: stloc.2 IL_0043: ldarg.1 - IL_0044: castclass Match01/Test1/X11 + IL_0044: castclass assembly/Test1/X11 IL_0049: stloc.3 IL_004a: ldloc.2 - IL_004b: ldfld int32 Match01/Test1/X11::item + IL_004b: ldfld int32 assembly/Test1/X11::item IL_0050: ldloc.3 - IL_0051: ldfld int32 Match01/Test1/X11::item + IL_0051: ldfld int32 assembly/Test1/X11::item IL_0056: ceq IL_0058: ret IL_0059: ldarg.0 - IL_005a: castclass Match01/Test1/X12 + IL_005a: castclass assembly/Test1/X12 IL_005f: stloc.s V_4 IL_0061: ldarg.1 - IL_0062: castclass Match01/Test1/X12 + IL_0062: castclass assembly/Test1/X12 IL_0067: stloc.s V_5 IL_0069: ldloc.s V_4 - IL_006b: ldfld int32 Match01/Test1/X12::item + IL_006b: ldfld int32 assembly/Test1/X12::item IL_0070: ldloc.s V_5 - IL_0072: ldfld int32 Match01/Test1/X12::item + IL_0072: ldfld int32 assembly/Test1/X12::item IL_0077: ceq IL_0079: ret IL_007a: ldarg.0 - IL_007b: castclass Match01/Test1/X13 + IL_007b: castclass assembly/Test1/X13 IL_0080: stloc.s V_6 IL_0082: ldarg.1 - IL_0083: castclass Match01/Test1/X13 + IL_0083: castclass assembly/Test1/X13 IL_0088: stloc.s V_7 IL_008a: ldloc.s V_6 - IL_008c: ldfld int32 Match01/Test1/X13::item + IL_008c: ldfld int32 assembly/Test1/X13::item IL_0091: ldloc.s V_7 - IL_0093: ldfld int32 Match01/Test1/X13::item + IL_0093: ldfld int32 assembly/Test1/X13::item IL_0098: ceq IL_009a: ret IL_009b: ldarg.0 - IL_009c: castclass Match01/Test1/X14 + IL_009c: castclass assembly/Test1/X14 IL_00a1: stloc.s V_8 IL_00a3: ldarg.1 - IL_00a4: castclass Match01/Test1/X14 + IL_00a4: castclass assembly/Test1/X14 IL_00a9: stloc.s V_9 IL_00ab: ldloc.s V_8 - IL_00ad: ldfld int32 Match01/Test1/X14::item + IL_00ad: ldfld int32 assembly/Test1/X14::item IL_00b2: ldloc.s V_9 - IL_00b4: ldfld int32 Match01/Test1/X14::item + IL_00b4: ldfld int32 assembly/Test1/X14::item IL_00b9: ceq IL_00bb: ret @@ -1282,9 +1019,9 @@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 5 - .locals init (class Match01/Test1 V_0) + .locals init (class assembly/Test1 V_0) IL_0000: ldarg.1 - IL_0001: isinst Match01/Test1 + IL_0001: isinst assembly/Test1 IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: brfalse.s IL_0013 @@ -1292,7 +1029,7 @@ IL_000a: ldarg.0 IL_000b: ldloc.0 IL_000c: ldarg.2 - IL_000d: callvirt instance bool Match01/Test1::Equals(class Match01/Test1, + IL_000d: callvirt instance bool assembly/Test1::Equals(class assembly/Test1, class [runtime]System.Collections.IEqualityComparer) IL_0012: ret @@ -1300,21 +1037,21 @@ IL_0014: ret } - .method public hidebysig virtual final instance bool Equals(class Match01/Test1 obj) cil managed + .method public hidebysig virtual final instance bool Equals(class assembly/Test1 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, - class Match01/Test1/X11 V_2, - class Match01/Test1/X11 V_3, - class Match01/Test1/X12 V_4, - class Match01/Test1/X12 V_5, - class Match01/Test1/X13 V_6, - class Match01/Test1/X13 V_7, - class Match01/Test1/X14 V_8, - class Match01/Test1/X14 V_9) + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, + class assembly/Test1/X12 V_4, + class assembly/Test1/X12 V_5, + class assembly/Test1/X13 V_6, + class assembly/Test1/X13 V_7, + class assembly/Test1/X14 V_8, + class assembly/Test1/X14 V_9) IL_0000: ldarg.0 IL_0001: brfalse IL_00c0 @@ -1322,71 +1059,71 @@ IL_0007: brfalse IL_00be IL_000c: ldarg.0 - IL_000d: ldfld int32 Match01/Test1::_tag + IL_000d: ldfld int32 assembly/Test1::_tag IL_0012: stloc.0 IL_0013: ldarg.1 - IL_0014: ldfld int32 Match01/Test1::_tag + IL_0014: ldfld int32 assembly/Test1::_tag IL_0019: stloc.1 IL_001a: ldloc.0 IL_001b: ldloc.1 IL_001c: bne.un IL_00bc IL_0021: ldarg.0 - IL_0022: call instance int32 Match01/Test1::get_Tag() + IL_0022: call instance int32 assembly/Test1::get_Tag() IL_0027: switch ( IL_003c, IL_0059, IL_007a, IL_009b) IL_003c: ldarg.0 - IL_003d: castclass Match01/Test1/X11 + IL_003d: castclass assembly/Test1/X11 IL_0042: stloc.2 IL_0043: ldarg.1 - IL_0044: castclass Match01/Test1/X11 + IL_0044: castclass assembly/Test1/X11 IL_0049: stloc.3 IL_004a: ldloc.2 - IL_004b: ldfld int32 Match01/Test1/X11::item + IL_004b: ldfld int32 assembly/Test1/X11::item IL_0050: ldloc.3 - IL_0051: ldfld int32 Match01/Test1/X11::item + IL_0051: ldfld int32 assembly/Test1/X11::item IL_0056: ceq IL_0058: ret IL_0059: ldarg.0 - IL_005a: castclass Match01/Test1/X12 + IL_005a: castclass assembly/Test1/X12 IL_005f: stloc.s V_4 IL_0061: ldarg.1 - IL_0062: castclass Match01/Test1/X12 + IL_0062: castclass assembly/Test1/X12 IL_0067: stloc.s V_5 IL_0069: ldloc.s V_4 - IL_006b: ldfld int32 Match01/Test1/X12::item + IL_006b: ldfld int32 assembly/Test1/X12::item IL_0070: ldloc.s V_5 - IL_0072: ldfld int32 Match01/Test1/X12::item + IL_0072: ldfld int32 assembly/Test1/X12::item IL_0077: ceq IL_0079: ret IL_007a: ldarg.0 - IL_007b: castclass Match01/Test1/X13 + IL_007b: castclass assembly/Test1/X13 IL_0080: stloc.s V_6 IL_0082: ldarg.1 - IL_0083: castclass Match01/Test1/X13 + IL_0083: castclass assembly/Test1/X13 IL_0088: stloc.s V_7 IL_008a: ldloc.s V_6 - IL_008c: ldfld int32 Match01/Test1/X13::item + IL_008c: ldfld int32 assembly/Test1/X13::item IL_0091: ldloc.s V_7 - IL_0093: ldfld int32 Match01/Test1/X13::item + IL_0093: ldfld int32 assembly/Test1/X13::item IL_0098: ceq IL_009a: ret IL_009b: ldarg.0 - IL_009c: castclass Match01/Test1/X14 + IL_009c: castclass assembly/Test1/X14 IL_00a1: stloc.s V_8 IL_00a3: ldarg.1 - IL_00a4: castclass Match01/Test1/X14 + IL_00a4: castclass assembly/Test1/X14 IL_00a9: stloc.s V_9 IL_00ab: ldloc.s V_8 - IL_00ad: ldfld int32 Match01/Test1/X14::item + IL_00ad: ldfld int32 assembly/Test1/X14::item IL_00b2: ldloc.s V_9 - IL_00b4: ldfld int32 Match01/Test1/X14::item + IL_00b4: ldfld int32 assembly/Test1/X14::item IL_00b9: ceq IL_00bb: ret @@ -1409,74 +1146,346 @@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 4 - .locals init (class Match01/Test1 V_0) + .locals init (class assembly/Test1 V_0) IL_0000: ldarg.1 - IL_0001: isinst Match01/Test1 + IL_0001: isinst assembly/Test1 IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 IL_000a: ldarg.0 IL_000b: ldloc.0 - IL_000c: callvirt instance bool Match01/Test1::Equals(class Match01/Test1) + IL_000c: callvirt instance bool assembly/Test1::Equals(class assembly/Test1) IL_0011: ret IL_0012: ldc.i4.0 IL_0013: ret } - .property instance int32 Tag() - { - .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 int32 Match01/Test1::get_Tag() - } - .property instance bool IsX11() - { - .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 Match01/Test1::get_IsX11() - } - .property instance bool IsX12() - { - .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 Match01/Test1::get_IsX12() - } - .property instance bool IsX13() - { - .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 Match01/Test1::get_IsX13() - } - .property instance bool IsX14() + .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 7 + .locals init (int32 V_0, + class assembly/Test1/X11 V_1, + class assembly/Test1/X12 V_2, + class assembly/Test1/X13 V_3, + class assembly/Test1/X14 V_4) + IL_0000: ldarg.0 + IL_0001: brfalse IL_00a5 + + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: call instance int32 assembly/Test1::get_Tag() + IL_000e: switch ( + IL_0023, + IL_0043, + IL_0063, + IL_0083) + IL_0023: ldarg.0 + IL_0024: castclass assembly/Test1/X11 + IL_0029: stloc.1 + IL_002a: ldc.i4.0 + IL_002b: stloc.0 + IL_002c: ldc.i4 0x9e3779b9 + IL_0031: ldloc.1 + IL_0032: ldfld int32 assembly/Test1/X11::item + IL_0037: ldloc.0 + IL_0038: ldc.i4.6 + IL_0039: shl + IL_003a: ldloc.0 + IL_003b: ldc.i4.2 + IL_003c: shr + IL_003d: add + IL_003e: add + IL_003f: add + IL_0040: stloc.0 + IL_0041: ldloc.0 + IL_0042: ret + + IL_0043: ldarg.0 + IL_0044: castclass assembly/Test1/X12 + IL_0049: stloc.2 + IL_004a: ldc.i4.1 + IL_004b: stloc.0 + IL_004c: ldc.i4 0x9e3779b9 + IL_0051: ldloc.2 + IL_0052: ldfld int32 assembly/Test1/X12::item + IL_0057: ldloc.0 + IL_0058: ldc.i4.6 + IL_0059: shl + IL_005a: ldloc.0 + IL_005b: ldc.i4.2 + IL_005c: shr + IL_005d: add + IL_005e: add + IL_005f: add + IL_0060: stloc.0 + IL_0061: ldloc.0 + IL_0062: ret + + IL_0063: ldarg.0 + IL_0064: castclass assembly/Test1/X13 + IL_0069: stloc.3 + IL_006a: ldc.i4.2 + IL_006b: stloc.0 + IL_006c: ldc.i4 0x9e3779b9 + IL_0071: ldloc.3 + IL_0072: ldfld int32 assembly/Test1/X13::item + IL_0077: ldloc.0 + IL_0078: ldc.i4.6 + IL_0079: shl + IL_007a: ldloc.0 + IL_007b: ldc.i4.2 + IL_007c: shr + IL_007d: add + IL_007e: add + IL_007f: add + IL_0080: stloc.0 + IL_0081: ldloc.0 + IL_0082: ret + + IL_0083: ldarg.0 + IL_0084: castclass assembly/Test1/X14 + IL_0089: stloc.s V_4 + IL_008b: ldc.i4.3 + IL_008c: stloc.0 + IL_008d: ldc.i4 0x9e3779b9 + IL_0092: ldloc.s V_4 + IL_0094: ldfld int32 assembly/Test1/X14::item + IL_0099: ldloc.0 + IL_009a: ldc.i4.6 + IL_009b: shl + IL_009c: ldloc.0 + IL_009d: ldc.i4.2 + IL_009e: shr + IL_009f: add + IL_00a0: add + IL_00a1: add + IL_00a2: stloc.0 + IL_00a3: ldloc.0 + IL_00a4: ret + + IL_00a5: ldc.i4.0 + IL_00a6: 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/Test1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/Test1 NewX11(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void assembly/Test1/X11::.ctor(int32) + IL_0006: ret + } + + .method public static class assembly/Test1 NewX12(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void assembly/Test1/X12::.ctor(int32) + IL_0006: ret + } + + .method public static class assembly/Test1 NewX13(int32 item) 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 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/Test1/X13::.ctor(int32) + IL_0006: ret + } + + .method public static class assembly/Test1 NewX14(int32 item) 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 03 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: ldarg.0 + IL_0001: newobj instance void assembly/Test1/X14::.ctor(int32) + IL_0006: 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/Test1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance bool get_IsX11() 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/Test1::get_Tag() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } + + .method public hidebysig instance bool get_IsX12() 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/Test1::get_Tag() + IL_0006: ldc.i4.1 + IL_0007: ceq + IL_0009: ret + } + + .method public hidebysig instance bool get_IsX13() 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/Test1::get_Tag() + IL_0006: ldc.i4.2 + IL_0007: ceq + IL_0009: ret + } + + .method public hidebysig instance bool get_IsX14() 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/Test1::get_Tag() + IL_0006: ldc.i4.3 + 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/Test1::_tag + IL_0006: ret + } + + .property instance int32 Tag() + { + .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 int32 assembly/Test1::get_Tag() + } + .property instance bool IsX11() + { + .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/Test1::get_IsX11() + } + .property instance bool IsX12() { .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 Match01/Test1::get_IsX14() + .get instance bool assembly/Test1::get_IsX12() } + .property instance bool IsX13() + { + .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/Test1::get_IsX13() + } + .property instance bool IsX14() + { + .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/Test1::get_IsX14() + } + } + + .method public static int32 fm(class assembly/Test1 y) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call int32 assembly::select1(class assembly/Test1) + IL_0006: ret } - .method public static int32 select1(class Match01/Test1 x) cil managed + .method public static int32 select1(class assembly/Test1 x) cil managed { .maxstack 8 IL_0000: nop IL_0001: ldarg.0 - IL_0002: call instance int32 Match01/Test1::get_Tag() + IL_0002: call instance int32 assembly/Test1::get_Tag() IL_0007: switch ( IL_001c, IL_0028, IL_002a, IL_002c) IL_001c: ldarg.0 - IL_001d: castclass Match01/Test1/X11 - IL_0022: ldfld int32 Match01/Test1/X11::item + IL_001d: castclass assembly/Test1/X11 + IL_0022: ldfld int32 assembly/Test1/X11::item IL_0027: ret IL_0028: ldc.i4.2 @@ -1489,18 +1498,9 @@ IL_002d: ret } - .method public static int32 fm(class Match01/Test1 y) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call int32 Match01::select1(class Match01/Test1) - IL_0006: ret - } - } -.class private abstract auto ansi sealed ''.$Match01 +.class private abstract auto ansi sealed ''.$assembly extends [runtime]System.Object { .method public static void main@() cil managed @@ -1513,97 +1513,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..4bb19b5aabd 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 @@ -825,148 +825,6 @@ IL_000d: ret } - .method public static class assembly/Test1 NewX11(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void assembly/Test1/X11::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX11() 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/Test1::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret - } - - .method public static class assembly/Test1 NewX12(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void assembly/Test1/X12::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX12() 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/Test1::get_Tag() - IL_0006: ldc.i4.1 - IL_0007: ceq - IL_0009: ret - } - - .method public static class assembly/Test1 NewX13(int32 item) 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 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void assembly/Test1/X13::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX13() 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/Test1::get_Tag() - IL_0006: ldc.i4.2 - IL_0007: ceq - IL_0009: ret - } - - .method public static class assembly/Test1 NewX14(int32 item) 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 03 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: ldarg.0 - IL_0001: newobj instance void assembly/Test1/X14::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX14() 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/Test1::get_Tag() - IL_0006: ldc.i4.3 - 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/Test1::_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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Test1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Test1 obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1052,6 +910,258 @@ IL_0028: ret } + .method public hidebysig instance bool Equals(class assembly/Test1 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 (int32 V_0, + int32 V_1, + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, + class assembly/Test1/X12 V_4, + class assembly/Test1/X12 V_5, + class assembly/Test1/X13 V_6, + class assembly/Test1/X13 V_7, + class assembly/Test1/X14 V_8, + class assembly/Test1/X14 V_9) + IL_0000: ldarg.0 + IL_0001: brfalse IL_00c0 + + IL_0006: ldarg.1 + IL_0007: brfalse IL_00be + + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Test1::_tag + IL_0012: stloc.0 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Test1::_tag + IL_0019: stloc.1 + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: bne.un IL_00bc + + IL_0021: ldarg.0 + IL_0022: call instance int32 assembly/Test1::get_Tag() + IL_0027: switch ( + IL_003c, + IL_0059, + IL_007a, + IL_009b) + IL_003c: ldarg.0 + IL_003d: castclass assembly/Test1/X11 + IL_0042: stloc.2 + IL_0043: ldarg.1 + IL_0044: castclass assembly/Test1/X11 + IL_0049: stloc.3 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/Test1/X11::item + IL_0050: ldloc.3 + IL_0051: ldfld int32 assembly/Test1/X11::item + IL_0056: ceq + IL_0058: ret + + IL_0059: ldarg.0 + IL_005a: castclass assembly/Test1/X12 + IL_005f: stloc.s V_4 + IL_0061: ldarg.1 + IL_0062: castclass assembly/Test1/X12 + IL_0067: stloc.s V_5 + IL_0069: ldloc.s V_4 + IL_006b: ldfld int32 assembly/Test1/X12::item + IL_0070: ldloc.s V_5 + IL_0072: ldfld int32 assembly/Test1/X12::item + IL_0077: ceq + IL_0079: ret + + IL_007a: ldarg.0 + IL_007b: castclass assembly/Test1/X13 + IL_0080: stloc.s V_6 + IL_0082: ldarg.1 + IL_0083: castclass assembly/Test1/X13 + IL_0088: stloc.s V_7 + IL_008a: ldloc.s V_6 + IL_008c: ldfld int32 assembly/Test1/X13::item + IL_0091: ldloc.s V_7 + IL_0093: ldfld int32 assembly/Test1/X13::item + IL_0098: ceq + IL_009a: ret + + IL_009b: ldarg.0 + IL_009c: castclass assembly/Test1/X14 + IL_00a1: stloc.s V_8 + IL_00a3: ldarg.1 + IL_00a4: castclass assembly/Test1/X14 + IL_00a9: stloc.s V_9 + IL_00ab: ldloc.s V_8 + IL_00ad: ldfld int32 assembly/Test1/X14::item + IL_00b2: ldloc.s V_9 + IL_00b4: ldfld int32 assembly/Test1/X14::item + IL_00b9: ceq + IL_00bb: ret + + IL_00bc: ldc.i4.0 + IL_00bd: ret + + IL_00be: ldc.i4.0 + IL_00bf: ret + + IL_00c0: ldarg.1 + IL_00c1: ldnull + IL_00c2: cgt.un + IL_00c4: ldc.i4.0 + IL_00c5: ceq + IL_00c7: 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/Test1 V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Test1 + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool assembly/Test1::Equals(class assembly/Test1, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class assembly/Test1 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, + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, + class assembly/Test1/X12 V_4, + class assembly/Test1/X12 V_5, + class assembly/Test1/X13 V_6, + class assembly/Test1/X13 V_7, + class assembly/Test1/X14 V_8, + class assembly/Test1/X14 V_9) + IL_0000: ldarg.0 + IL_0001: brfalse IL_00c0 + + IL_0006: ldarg.1 + IL_0007: brfalse IL_00be + + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Test1::_tag + IL_0012: stloc.0 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Test1::_tag + IL_0019: stloc.1 + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: bne.un IL_00bc + + IL_0021: ldarg.0 + IL_0022: call instance int32 assembly/Test1::get_Tag() + IL_0027: switch ( + IL_003c, + IL_0059, + IL_007a, + IL_009b) + IL_003c: ldarg.0 + IL_003d: castclass assembly/Test1/X11 + IL_0042: stloc.2 + IL_0043: ldarg.1 + IL_0044: castclass assembly/Test1/X11 + IL_0049: stloc.3 + IL_004a: ldloc.2 + IL_004b: ldfld int32 assembly/Test1/X11::item + IL_0050: ldloc.3 + IL_0051: ldfld int32 assembly/Test1/X11::item + IL_0056: ceq + IL_0058: ret + + IL_0059: ldarg.0 + IL_005a: castclass assembly/Test1/X12 + IL_005f: stloc.s V_4 + IL_0061: ldarg.1 + IL_0062: castclass assembly/Test1/X12 + IL_0067: stloc.s V_5 + IL_0069: ldloc.s V_4 + IL_006b: ldfld int32 assembly/Test1/X12::item + IL_0070: ldloc.s V_5 + IL_0072: ldfld int32 assembly/Test1/X12::item + IL_0077: ceq + IL_0079: ret + + IL_007a: ldarg.0 + IL_007b: castclass assembly/Test1/X13 + IL_0080: stloc.s V_6 + IL_0082: ldarg.1 + IL_0083: castclass assembly/Test1/X13 + IL_0088: stloc.s V_7 + IL_008a: ldloc.s V_6 + IL_008c: ldfld int32 assembly/Test1/X13::item + IL_0091: ldloc.s V_7 + IL_0093: ldfld int32 assembly/Test1/X13::item + IL_0098: ceq + IL_009a: ret + + IL_009b: ldarg.0 + IL_009c: castclass assembly/Test1/X14 + IL_00a1: stloc.s V_8 + IL_00a3: ldarg.1 + IL_00a4: castclass assembly/Test1/X14 + IL_00a9: stloc.s V_9 + IL_00ab: ldloc.s V_8 + IL_00ad: ldfld int32 assembly/Test1/X14::item + IL_00b2: ldloc.s V_9 + IL_00b4: ldfld int32 assembly/Test1/X14::item + IL_00b9: ceq + IL_00bb: ret + + IL_00bc: ldc.i4.0 + IL_00bd: ret + + IL_00be: ldc.i4.0 + IL_00bf: ret + + IL_00c0: ldarg.1 + IL_00c1: ldnull + IL_00c2: cgt.un + IL_00c4: ldc.i4.0 + IL_00c5: ceq + IL_00c7: 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/Test1 V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Test1 + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool assembly/Test1::Equals(class assembly/Test1) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: 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 ) @@ -1173,256 +1283,146 @@ IL_000b: ret } - .method public hidebysig instance bool Equals(class assembly/Test1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public static class assembly/Test1 NewX11(int32 item) 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 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 4 - .locals init (int32 V_0, - int32 V_1, - class assembly/Test1/X11 V_2, - class assembly/Test1/X11 V_3, - class assembly/Test1/X12 V_4, - class assembly/Test1/X12 V_5, - class assembly/Test1/X13 V_6, - class assembly/Test1/X13 V_7, - class assembly/Test1/X14 V_8, - class assembly/Test1/X14 V_9) - IL_0000: ldarg.0 - IL_0001: brfalse IL_00c0 - - IL_0006: ldarg.1 - IL_0007: brfalse IL_00be - - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/Test1::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 assembly/Test1::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un IL_00bc - - IL_0021: ldarg.0 - IL_0022: call instance int32 assembly/Test1::get_Tag() - IL_0027: switch ( - IL_003c, - IL_0059, - IL_007a, - IL_009b) - IL_003c: ldarg.0 - IL_003d: castclass assembly/Test1/X11 - IL_0042: stloc.2 - IL_0043: ldarg.1 - IL_0044: castclass assembly/Test1/X11 - IL_0049: stloc.3 - IL_004a: ldloc.2 - IL_004b: ldfld int32 assembly/Test1/X11::item - IL_0050: ldloc.3 - IL_0051: ldfld int32 assembly/Test1/X11::item - IL_0056: ceq - IL_0058: ret - - IL_0059: ldarg.0 - IL_005a: castclass assembly/Test1/X12 - IL_005f: stloc.s V_4 - IL_0061: ldarg.1 - IL_0062: castclass assembly/Test1/X12 - IL_0067: stloc.s V_5 - IL_0069: ldloc.s V_4 - IL_006b: ldfld int32 assembly/Test1/X12::item - IL_0070: ldloc.s V_5 - IL_0072: ldfld int32 assembly/Test1/X12::item - IL_0077: ceq - IL_0079: ret - - IL_007a: ldarg.0 - IL_007b: castclass assembly/Test1/X13 - IL_0080: stloc.s V_6 - IL_0082: ldarg.1 - IL_0083: castclass assembly/Test1/X13 - IL_0088: stloc.s V_7 - IL_008a: ldloc.s V_6 - IL_008c: ldfld int32 assembly/Test1/X13::item - IL_0091: ldloc.s V_7 - IL_0093: ldfld int32 assembly/Test1/X13::item - IL_0098: ceq - IL_009a: ret - - IL_009b: ldarg.0 - IL_009c: castclass assembly/Test1/X14 - IL_00a1: stloc.s V_8 - IL_00a3: ldarg.1 - IL_00a4: castclass assembly/Test1/X14 - IL_00a9: stloc.s V_9 - IL_00ab: ldloc.s V_8 - IL_00ad: ldfld int32 assembly/Test1/X14::item - IL_00b2: ldloc.s V_9 - IL_00b4: ldfld int32 assembly/Test1/X14::item - IL_00b9: ceq - IL_00bb: ret - - IL_00bc: ldc.i4.0 - IL_00bd: ret - - IL_00be: ldc.i4.0 - IL_00bf: ret - - IL_00c0: ldarg.1 - IL_00c1: ldnull - IL_00c2: cgt.un - IL_00c4: ldc.i4.0 - IL_00c5: ceq - IL_00c7: ret + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/Test1/X11::.ctor(int32) + IL_0006: ret } - .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public static class assembly/Test1 NewX12(int32 item) 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 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 5 - .locals init (class assembly/Test1 V_0) - IL_0000: ldarg.1 - IL_0001: isinst assembly/Test1 - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0013 - - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: ldarg.2 - IL_000d: callvirt instance bool assembly/Test1::Equals(class assembly/Test1, - class [runtime]System.Collections.IEqualityComparer) - IL_0012: ret - - IL_0013: ldc.i4.0 - IL_0014: ret + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/Test1/X12::.ctor(int32) + IL_0006: ret } - .method public hidebysig virtual final instance bool Equals(class assembly/Test1 obj) cil managed + .method public static class assembly/Test1 NewX13(int32 item) 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 ) - .maxstack 4 - .locals init (int32 V_0, - int32 V_1, - class assembly/Test1/X11 V_2, - class assembly/Test1/X11 V_3, - class assembly/Test1/X12 V_4, - class assembly/Test1/X12 V_5, - class assembly/Test1/X13 V_6, - class assembly/Test1/X13 V_7, - class assembly/Test1/X14 V_8, - class assembly/Test1/X14 V_9) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse IL_00c0 - - IL_0006: ldarg.1 - IL_0007: brfalse IL_00be - - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/Test1::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 assembly/Test1::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un IL_00bc - - IL_0021: ldarg.0 - IL_0022: call instance int32 assembly/Test1::get_Tag() - IL_0027: switch ( - IL_003c, - IL_0059, - IL_007a, - IL_009b) - IL_003c: ldarg.0 - IL_003d: castclass assembly/Test1/X11 - IL_0042: stloc.2 - IL_0043: ldarg.1 - IL_0044: castclass assembly/Test1/X11 - IL_0049: stloc.3 - IL_004a: ldloc.2 - IL_004b: ldfld int32 assembly/Test1/X11::item - IL_0050: ldloc.3 - IL_0051: ldfld int32 assembly/Test1/X11::item - IL_0056: ceq - IL_0058: ret - - IL_0059: ldarg.0 - IL_005a: castclass assembly/Test1/X12 - IL_005f: stloc.s V_4 - IL_0061: ldarg.1 - IL_0062: castclass assembly/Test1/X12 - IL_0067: stloc.s V_5 - IL_0069: ldloc.s V_4 - IL_006b: ldfld int32 assembly/Test1/X12::item - IL_0070: ldloc.s V_5 - IL_0072: ldfld int32 assembly/Test1/X12::item - IL_0077: ceq - IL_0079: ret + IL_0001: newobj instance void assembly/Test1/X13::.ctor(int32) + IL_0006: ret + } - IL_007a: ldarg.0 - IL_007b: castclass assembly/Test1/X13 - IL_0080: stloc.s V_6 - IL_0082: ldarg.1 - IL_0083: castclass assembly/Test1/X13 - IL_0088: stloc.s V_7 - IL_008a: ldloc.s V_6 - IL_008c: ldfld int32 assembly/Test1/X13::item - IL_0091: ldloc.s V_7 - IL_0093: ldfld int32 assembly/Test1/X13::item - IL_0098: ceq - IL_009a: ret + .method public static class assembly/Test1 NewX14(int32 item) 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 03 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: ldarg.0 + IL_0001: newobj instance void assembly/Test1/X14::.ctor(int32) + IL_0006: ret + } - IL_009b: ldarg.0 - IL_009c: castclass assembly/Test1/X14 - IL_00a1: stloc.s V_8 - IL_00a3: ldarg.1 - IL_00a4: castclass assembly/Test1/X14 - IL_00a9: stloc.s V_9 - IL_00ab: ldloc.s V_8 - IL_00ad: ldfld int32 assembly/Test1/X14::item - IL_00b2: ldloc.s V_9 - IL_00b4: ldfld int32 assembly/Test1/X14::item - IL_00b9: ceq - IL_00bb: 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/Test1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } - IL_00bc: ldc.i4.0 - IL_00bd: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } - IL_00be: ldc.i4.0 - IL_00bf: ret + .method public hidebysig instance bool get_IsX11() 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/Test1::get_Tag() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } - IL_00c0: ldarg.1 - IL_00c1: ldnull - IL_00c2: cgt.un - IL_00c4: ldc.i4.0 - IL_00c5: ceq - IL_00c7: ret + .method public hidebysig instance bool get_IsX12() 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/Test1::get_Tag() + IL_0006: ldc.i4.1 + IL_0007: ceq + IL_0009: ret } - .method public hidebysig virtual final instance bool Equals(object obj) cil managed + .method public hidebysig instance bool get_IsX13() 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 4 - .locals init (class assembly/Test1 V_0) - IL_0000: ldarg.1 - IL_0001: isinst assembly/Test1 - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance int32 assembly/Test1::get_Tag() + IL_0006: ldc.i4.2 + IL_0007: ceq + IL_0009: ret + } - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: callvirt instance bool assembly/Test1::Equals(class assembly/Test1) - IL_0011: ret + .method public hidebysig instance bool get_IsX14() 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/Test1::get_Tag() + IL_0006: ldc.i4.3 + IL_0007: ceq + IL_0009: ret + } - IL_0012: ldc.i4.0 - IL_0013: 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/Test1::_tag + IL_0006: ret } .property instance int32 Tag() @@ -1462,6 +1462,15 @@ } } + .method public static int32 fm(class assembly/Test1 y) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call int32 assembly::select1(class assembly/Test1) + IL_0006: ret + } + .method public static int32 select1(class assembly/Test1 x) cil managed { @@ -1489,15 +1498,6 @@ IL_002d: ret } - .method public static int32 fm(class assembly/Test1 y) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call int32 assembly::select1(class assembly/Test1) - IL_0006: ret - } - } .class private abstract auto ansi sealed ''.$assembly @@ -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..e18c604da84 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match02.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match02.fs.il.bsl @@ -50,19 +50,19 @@ IL_0001: ret } - .method public specialname static int32 op_Multiply(!!a _arg3, valuetype assembly/S _arg4) cil managed + .method public specialname static int32 op_Addition(valuetype assembly/S _arg5, !!a _arg6) cil managed { .maxstack 8 - IL_0000: ldc.i4.1 + IL_0000: ldc.i4.2 IL_0001: ret } - .method public specialname static int32 op_Addition(valuetype assembly/S _arg5, !!a _arg6) cil managed + .method public specialname static int32 op_Multiply(!!a _arg3, valuetype assembly/S _arg4) cil managed { .maxstack 8 - IL_0000: ldc.i4.2 + IL_0000: ldc.i4.1 IL_0001: ret } @@ -111,4 +111,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/StructUnion01.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/StructUnion01.fs.il.net472.bsl index 7a3e23d7437..72bd9a9d46a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/StructUnion01.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/StructUnion01.fs.il.net472.bsl @@ -43,7 +43,7 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 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 ) + 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 ) .field assembly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -53,90 +53,6 @@ .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 public static valuetype assembly/U NewU(int32 item1, int32 item2) 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 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 3 - .locals init (valuetype assembly/U V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj assembly/U - IL_0008: ldloca.s V_0 - IL_000a: ldarg.0 - IL_000b: stfld int32 assembly/U::item1 - IL_0010: ldloca.s V_0 - IL_0012: ldarg.1 - IL_0013: stfld int32 assembly/U::item2 - IL_0018: ldloc.0 - IL_0019: ret - } - - .method public hidebysig instance int32 get_Item1() 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/U::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/U::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/U - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: 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,valuetype assembly/U>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/U - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/U obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -266,59 +182,6 @@ IL_0046: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: pop - IL_0004: ldc.i4.0 - IL_0005: stloc.0 - IL_0006: ldc.i4 0x9e3779b9 - IL_000b: ldarg.0 - IL_000c: ldfld int32 assembly/U::item2 - IL_0011: ldloc.0 - IL_0012: ldc.i4.6 - IL_0013: shl - IL_0014: ldloc.0 - IL_0015: ldc.i4.2 - IL_0016: shr - IL_0017: add - IL_0018: add - IL_0019: add - IL_001a: stloc.0 - IL_001b: ldc.i4 0x9e3779b9 - IL_0020: ldarg.0 - IL_0021: ldfld int32 assembly/U::item1 - IL_0026: ldloc.0 - IL_0027: ldc.i4.6 - IL_0028: shl - IL_0029: ldloc.0 - IL_002a: ldc.i4.2 - IL_002b: shr - IL_002c: add - IL_002d: add - IL_002e: add - IL_002f: stloc.0 - IL_0030: ldloc.0 - IL_0031: 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: call instance int32 assembly/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -410,6 +273,143 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: pop + IL_0004: ldc.i4.0 + IL_0005: stloc.0 + IL_0006: ldc.i4 0x9e3779b9 + IL_000b: ldarg.0 + IL_000c: ldfld int32 assembly/U::item2 + IL_0011: ldloc.0 + IL_0012: ldc.i4.6 + IL_0013: shl + IL_0014: ldloc.0 + IL_0015: ldc.i4.2 + IL_0016: shr + IL_0017: add + IL_0018: add + IL_0019: add + IL_001a: stloc.0 + IL_001b: ldc.i4 0x9e3779b9 + IL_0020: ldarg.0 + IL_0021: ldfld int32 assembly/U::item1 + IL_0026: ldloc.0 + IL_0027: ldc.i4.6 + IL_0028: shl + IL_0029: ldloc.0 + IL_002a: ldc.i4.2 + IL_002b: shr + IL_002c: add + IL_002d: add + IL_002e: add + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: 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: call instance int32 assembly/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static valuetype assembly/U NewU(int32 item1, int32 item2) 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 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 3 + .locals init (valuetype assembly/U V_0) + IL_0000: ldloca.s V_0 + IL_0002: initobj assembly/U + IL_0008: ldloca.s V_0 + IL_000a: ldarg.0 + IL_000b: stfld int32 assembly/U::item1 + IL_0010: ldloca.s V_0 + IL_0012: ldarg.1 + IL_0013: stfld int32 assembly/U::item2 + IL_0018: ldloc.0 + IL_0019: 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,valuetype assembly/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/U + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/U + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig instance int32 get_Item1() 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/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/U::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -437,124 +437,6 @@ } } - .method public static int32 g1(valuetype assembly/U _arg1) cil managed - { - - .maxstack 8 - IL_0000: ldarga.s _arg1 - IL_0002: ldfld int32 assembly/U::item1 - IL_0007: ldarga.s _arg1 - IL_0009: ldfld int32 assembly/U::item2 - IL_000e: add - IL_000f: ret - } - - .method public static int32 g2(valuetype assembly/U u) cil managed - { - - .maxstack 8 - IL_0000: nop - IL_0001: ldarga.s u - IL_0003: ldfld int32 assembly/U::item1 - IL_0008: ldarga.s u - IL_000a: ldfld int32 assembly/U::item2 - IL_000f: add - IL_0010: ret - } - - .method public static int32 g3(valuetype assembly/U x) cil managed - { - - .maxstack 8 - IL_0000: nop - IL_0001: ldarga.s x - IL_0003: ldfld int32 assembly/U::item1 - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001d - - IL_0015: ldarga.s x - IL_0017: ldfld int32 assembly/U::item2 - IL_001c: ret - - IL_001d: ldarga.s x - IL_001f: ldfld int32 assembly/U::item1 - IL_0024: ldarga.s x - IL_0026: ldfld int32 assembly/U::item2 - IL_002b: add - IL_002c: ret - } - - .method public static int32 g4(valuetype assembly/U x, - valuetype assembly/U y) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 6 - .locals init (int32 V_0, - int32 V_1, - int32 V_2, - int32 V_3) - IL_0000: nop - IL_0001: ldarga.s x - IL_0003: ldfld int32 assembly/U::item1 - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_0059 - - IL_0015: ldarga.s y - IL_0017: ldfld int32 assembly/U::item1 - IL_001c: ldc.i4.5 - IL_001d: sub - IL_001e: switch ( - IL_0049) - IL_0027: ldarga.s y - IL_0029: ldfld int32 assembly/U::item2 - IL_002e: ldarga.s y - IL_0030: ldfld int32 assembly/U::item1 - IL_0035: ldarga.s x - IL_0037: ldfld int32 assembly/U::item2 - IL_003c: ldarga.s x - IL_003e: ldfld int32 assembly/U::item1 - IL_0043: stloc.3 - IL_0044: stloc.2 - IL_0045: stloc.1 - IL_0046: stloc.0 - IL_0047: br.s IL_0079 - - IL_0049: ldarga.s x - IL_004b: ldfld int32 assembly/U::item2 - IL_0050: ldarga.s y - IL_0052: ldfld int32 assembly/U::item2 - IL_0057: add - IL_0058: ret - - IL_0059: ldarga.s y - IL_005b: ldfld int32 assembly/U::item2 - IL_0060: stloc.0 - IL_0061: ldarga.s y - IL_0063: ldfld int32 assembly/U::item1 - IL_0068: stloc.1 - IL_0069: ldarga.s x - IL_006b: ldfld int32 assembly/U::item2 - IL_0070: stloc.2 - IL_0071: ldarga.s x - IL_0073: ldfld int32 assembly/U::item1 - IL_0078: stloc.3 - IL_0079: ldloc.3 - IL_007a: ldloc.2 - IL_007b: add - IL_007c: ldloc.1 - IL_007d: add - IL_007e: ldloc.0 - IL_007f: add - IL_0080: ret - } - .method public static int32 f1(valuetype assembly/U& x) cil managed { @@ -682,6 +564,124 @@ IL_0094: ret } + .method public static int32 g1(valuetype assembly/U _arg1) cil managed + { + + .maxstack 8 + IL_0000: ldarga.s _arg1 + IL_0002: ldfld int32 assembly/U::item1 + IL_0007: ldarga.s _arg1 + IL_0009: ldfld int32 assembly/U::item2 + IL_000e: add + IL_000f: ret + } + + .method public static int32 g2(valuetype assembly/U u) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarga.s u + IL_0003: ldfld int32 assembly/U::item1 + IL_0008: ldarga.s u + IL_000a: ldfld int32 assembly/U::item2 + IL_000f: add + IL_0010: ret + } + + .method public static int32 g3(valuetype assembly/U x) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarga.s x + IL_0003: ldfld int32 assembly/U::item1 + IL_0008: ldc.i4.3 + IL_0009: sub + IL_000a: switch ( + IL_0015) + IL_0013: br.s IL_001d + + IL_0015: ldarga.s x + IL_0017: ldfld int32 assembly/U::item2 + IL_001c: ret + + IL_001d: ldarga.s x + IL_001f: ldfld int32 assembly/U::item1 + IL_0024: ldarga.s x + IL_0026: ldfld int32 assembly/U::item2 + IL_002b: add + IL_002c: ret + } + + .method public static int32 g4(valuetype assembly/U x, + valuetype assembly/U y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 6 + .locals init (int32 V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: nop + IL_0001: ldarga.s x + IL_0003: ldfld int32 assembly/U::item1 + IL_0008: ldc.i4.3 + IL_0009: sub + IL_000a: switch ( + IL_0015) + IL_0013: br.s IL_0059 + + IL_0015: ldarga.s y + IL_0017: ldfld int32 assembly/U::item1 + IL_001c: ldc.i4.5 + IL_001d: sub + IL_001e: switch ( + IL_0049) + IL_0027: ldarga.s y + IL_0029: ldfld int32 assembly/U::item2 + IL_002e: ldarga.s y + IL_0030: ldfld int32 assembly/U::item1 + IL_0035: ldarga.s x + IL_0037: ldfld int32 assembly/U::item2 + IL_003c: ldarga.s x + IL_003e: ldfld int32 assembly/U::item1 + IL_0043: stloc.3 + IL_0044: stloc.2 + IL_0045: stloc.1 + IL_0046: stloc.0 + IL_0047: br.s IL_0079 + + IL_0049: ldarga.s x + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: ldarga.s y + IL_0052: ldfld int32 assembly/U::item2 + IL_0057: add + IL_0058: ret + + IL_0059: ldarga.s y + IL_005b: ldfld int32 assembly/U::item2 + IL_0060: stloc.0 + IL_0061: ldarga.s y + IL_0063: ldfld int32 assembly/U::item1 + IL_0068: stloc.1 + IL_0069: ldarga.s x + IL_006b: ldfld int32 assembly/U::item2 + IL_0070: stloc.2 + IL_0071: ldarga.s x + IL_0073: ldfld int32 assembly/U::item1 + IL_0078: stloc.3 + IL_0079: ldloc.3 + IL_007a: ldloc.2 + IL_007b: add + IL_007c: ldloc.1 + IL_007d: add + IL_007e: ldloc.0 + IL_007f: add + IL_0080: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -701,4 +701,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..72bd9a9d46a 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 @@ -53,90 +53,6 @@ .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 public static valuetype assembly/U NewU(int32 item1, int32 item2) 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 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 3 - .locals init (valuetype assembly/U V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj assembly/U - IL_0008: ldloca.s V_0 - IL_000a: ldarg.0 - IL_000b: stfld int32 assembly/U::item1 - IL_0010: ldloca.s V_0 - IL_0012: ldarg.1 - IL_0013: stfld int32 assembly/U::item2 - IL_0018: ldloc.0 - IL_0019: ret - } - - .method public hidebysig instance int32 get_Item1() 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/U::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/U::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/U - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: 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,valuetype assembly/U>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj assembly/U - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret - } - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/U obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -266,59 +182,6 @@ IL_0046: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: pop - IL_0004: ldc.i4.0 - IL_0005: stloc.0 - IL_0006: ldc.i4 0x9e3779b9 - IL_000b: ldarg.0 - IL_000c: ldfld int32 assembly/U::item2 - IL_0011: ldloc.0 - IL_0012: ldc.i4.6 - IL_0013: shl - IL_0014: ldloc.0 - IL_0015: ldc.i4.2 - IL_0016: shr - IL_0017: add - IL_0018: add - IL_0019: add - IL_001a: stloc.0 - IL_001b: ldc.i4 0x9e3779b9 - IL_0020: ldarg.0 - IL_0021: ldfld int32 assembly/U::item1 - IL_0026: ldloc.0 - IL_0027: ldc.i4.6 - IL_0028: shl - IL_0029: ldloc.0 - IL_002a: ldc.i4.2 - IL_002b: shr - IL_002c: add - IL_002d: add - IL_002e: add - IL_002f: stloc.0 - IL_0030: ldloc.0 - IL_0031: 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: call instance int32 assembly/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -410,6 +273,143 @@ IL_0016: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: pop + IL_0004: ldc.i4.0 + IL_0005: stloc.0 + IL_0006: ldc.i4 0x9e3779b9 + IL_000b: ldarg.0 + IL_000c: ldfld int32 assembly/U::item2 + IL_0011: ldloc.0 + IL_0012: ldc.i4.6 + IL_0013: shl + IL_0014: ldloc.0 + IL_0015: ldc.i4.2 + IL_0016: shr + IL_0017: add + IL_0018: add + IL_0019: add + IL_001a: stloc.0 + IL_001b: ldc.i4 0x9e3779b9 + IL_0020: ldarg.0 + IL_0021: ldfld int32 assembly/U::item1 + IL_0026: ldloc.0 + IL_0027: ldc.i4.6 + IL_0028: shl + IL_0029: ldloc.0 + IL_002a: ldc.i4.2 + IL_002b: shr + IL_002c: add + IL_002d: add + IL_002e: add + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: 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: call instance int32 assembly/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static valuetype assembly/U NewU(int32 item1, int32 item2) 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 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 3 + .locals init (valuetype assembly/U V_0) + IL_0000: ldloca.s V_0 + IL_0002: initobj assembly/U + IL_0008: ldloca.s V_0 + IL_000a: ldarg.0 + IL_000b: stfld int32 assembly/U::item1 + IL_0010: ldloca.s V_0 + IL_0012: ldarg.1 + IL_0013: stfld int32 assembly/U::item2 + IL_0018: ldloc.0 + IL_0019: 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,valuetype assembly/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/U + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj assembly/U + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig instance int32 get_Item1() 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/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/U::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -437,124 +437,6 @@ } } - .method public static int32 g1(valuetype assembly/U _arg1) cil managed - { - - .maxstack 8 - IL_0000: ldarga.s _arg1 - IL_0002: ldfld int32 assembly/U::item1 - IL_0007: ldarga.s _arg1 - IL_0009: ldfld int32 assembly/U::item2 - IL_000e: add - IL_000f: ret - } - - .method public static int32 g2(valuetype assembly/U u) cil managed - { - - .maxstack 8 - IL_0000: nop - IL_0001: ldarga.s u - IL_0003: ldfld int32 assembly/U::item1 - IL_0008: ldarga.s u - IL_000a: ldfld int32 assembly/U::item2 - IL_000f: add - IL_0010: ret - } - - .method public static int32 g3(valuetype assembly/U x) cil managed - { - - .maxstack 8 - IL_0000: nop - IL_0001: ldarga.s x - IL_0003: ldfld int32 assembly/U::item1 - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001d - - IL_0015: ldarga.s x - IL_0017: ldfld int32 assembly/U::item2 - IL_001c: ret - - IL_001d: ldarga.s x - IL_001f: ldfld int32 assembly/U::item1 - IL_0024: ldarga.s x - IL_0026: ldfld int32 assembly/U::item2 - IL_002b: add - IL_002c: ret - } - - .method public static int32 g4(valuetype assembly/U x, - valuetype assembly/U y) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - - .maxstack 6 - .locals init (int32 V_0, - int32 V_1, - int32 V_2, - int32 V_3) - IL_0000: nop - IL_0001: ldarga.s x - IL_0003: ldfld int32 assembly/U::item1 - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_0059 - - IL_0015: ldarga.s y - IL_0017: ldfld int32 assembly/U::item1 - IL_001c: ldc.i4.5 - IL_001d: sub - IL_001e: switch ( - IL_0049) - IL_0027: ldarga.s y - IL_0029: ldfld int32 assembly/U::item2 - IL_002e: ldarga.s y - IL_0030: ldfld int32 assembly/U::item1 - IL_0035: ldarga.s x - IL_0037: ldfld int32 assembly/U::item2 - IL_003c: ldarga.s x - IL_003e: ldfld int32 assembly/U::item1 - IL_0043: stloc.3 - IL_0044: stloc.2 - IL_0045: stloc.1 - IL_0046: stloc.0 - IL_0047: br.s IL_0079 - - IL_0049: ldarga.s x - IL_004b: ldfld int32 assembly/U::item2 - IL_0050: ldarga.s y - IL_0052: ldfld int32 assembly/U::item2 - IL_0057: add - IL_0058: ret - - IL_0059: ldarga.s y - IL_005b: ldfld int32 assembly/U::item2 - IL_0060: stloc.0 - IL_0061: ldarga.s y - IL_0063: ldfld int32 assembly/U::item1 - IL_0068: stloc.1 - IL_0069: ldarga.s x - IL_006b: ldfld int32 assembly/U::item2 - IL_0070: stloc.2 - IL_0071: ldarga.s x - IL_0073: ldfld int32 assembly/U::item1 - IL_0078: stloc.3 - IL_0079: ldloc.3 - IL_007a: ldloc.2 - IL_007b: add - IL_007c: ldloc.1 - IL_007d: add - IL_007e: ldloc.0 - IL_007f: add - IL_0080: ret - } - .method public static int32 f1(valuetype assembly/U& x) cil managed { @@ -682,6 +564,124 @@ IL_0094: ret } + .method public static int32 g1(valuetype assembly/U _arg1) cil managed + { + + .maxstack 8 + IL_0000: ldarga.s _arg1 + IL_0002: ldfld int32 assembly/U::item1 + IL_0007: ldarga.s _arg1 + IL_0009: ldfld int32 assembly/U::item2 + IL_000e: add + IL_000f: ret + } + + .method public static int32 g2(valuetype assembly/U u) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarga.s u + IL_0003: ldfld int32 assembly/U::item1 + IL_0008: ldarga.s u + IL_000a: ldfld int32 assembly/U::item2 + IL_000f: add + IL_0010: ret + } + + .method public static int32 g3(valuetype assembly/U x) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarga.s x + IL_0003: ldfld int32 assembly/U::item1 + IL_0008: ldc.i4.3 + IL_0009: sub + IL_000a: switch ( + IL_0015) + IL_0013: br.s IL_001d + + IL_0015: ldarga.s x + IL_0017: ldfld int32 assembly/U::item2 + IL_001c: ret + + IL_001d: ldarga.s x + IL_001f: ldfld int32 assembly/U::item1 + IL_0024: ldarga.s x + IL_0026: ldfld int32 assembly/U::item2 + IL_002b: add + IL_002c: ret + } + + .method public static int32 g4(valuetype assembly/U x, + valuetype assembly/U y) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 6 + .locals init (int32 V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: nop + IL_0001: ldarga.s x + IL_0003: ldfld int32 assembly/U::item1 + IL_0008: ldc.i4.3 + IL_0009: sub + IL_000a: switch ( + IL_0015) + IL_0013: br.s IL_0059 + + IL_0015: ldarga.s y + IL_0017: ldfld int32 assembly/U::item1 + IL_001c: ldc.i4.5 + IL_001d: sub + IL_001e: switch ( + IL_0049) + IL_0027: ldarga.s y + IL_0029: ldfld int32 assembly/U::item2 + IL_002e: ldarga.s y + IL_0030: ldfld int32 assembly/U::item1 + IL_0035: ldarga.s x + IL_0037: ldfld int32 assembly/U::item2 + IL_003c: ldarga.s x + IL_003e: ldfld int32 assembly/U::item1 + IL_0043: stloc.3 + IL_0044: stloc.2 + IL_0045: stloc.1 + IL_0046: stloc.0 + IL_0047: br.s IL_0079 + + IL_0049: ldarga.s x + IL_004b: ldfld int32 assembly/U::item2 + IL_0050: ldarga.s y + IL_0052: ldfld int32 assembly/U::item2 + IL_0057: add + IL_0058: ret + + IL_0059: ldarga.s y + IL_005b: ldfld int32 assembly/U::item2 + IL_0060: stloc.0 + IL_0061: ldarga.s y + IL_0063: ldfld int32 assembly/U::item1 + IL_0068: stloc.1 + IL_0069: ldarga.s x + IL_006b: ldfld int32 assembly/U::item2 + IL_0070: stloc.2 + IL_0071: ldarga.s x + IL_0073: ldfld int32 assembly/U::item1 + IL_0078: stloc.3 + IL_0079: ldloc.3 + IL_007a: ldloc.2 + IL_007b: add + IL_007c: ldloc.1 + IL_007d: add + IL_007e: ldloc.0 + IL_007f: add + IL_0080: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -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..7df7b114af2 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 @@ -37,6 +37,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 ''.$ListExpressionSteppingTest1::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest1::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f0() cil managed { @@ -54,6 +65,17 @@ } + .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 + } + } .class private abstract auto ansi sealed ''.$ListExpressionSteppingTest1 @@ -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..b9ff3cd77c8 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 @@ -37,6 +37,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 ''.$ListExpressionSteppingTest1::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest1::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f0() cil managed { @@ -52,17 +63,6 @@ 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 assembly static void staticInitialization@() cil managed { @@ -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..5fc8a59095e 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 @@ -41,6 +41,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`2> { .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18' @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::.ctor() + IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -73,21 +82,21 @@ IL_0017: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit xs1@19 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`2> + { + .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::.ctor() - IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::@_instance + IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::.ctor() + IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit xs1@19 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`2> - { - .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -120,21 +129,21 @@ IL_0017: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 stage #2 at line 24@24' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`3> + { + .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::.ctor() - IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::@_instance + IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::.ctor() + IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 stage #2 at line 24@24' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`3> - { - .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -173,21 +182,21 @@ IL_001f: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit xs2@25 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`3> + { + .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::.ctor() - IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::@_instance + IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::.ctor() + IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit xs2@25 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`3> - { - .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -226,15 +235,17 @@ IL_001f: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::.ctor() - IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::@_instance - IL_000a: 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 public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f1() cil managed @@ -435,6 +446,17 @@ } + .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 + } + } .class private abstract auto ansi sealed ''.$ListExpressionSteppingTest2 @@ -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..6e822018497 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 @@ -41,6 +41,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`2> { .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18' @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::.ctor() + IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -73,21 +82,21 @@ IL_0017: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit xs1@19 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`2> + { + .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::.ctor() - IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::@_instance + IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::.ctor() + IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit xs1@19 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`2> - { - .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -120,21 +129,21 @@ IL_0017: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 stage #2 at line 24@24' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`3> + { + .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::.ctor() - IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::@_instance + IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::.ctor() + IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'Pipe #2 stage #2 at line 24@24' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`3> - { - .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -173,21 +182,21 @@ IL_001f: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit xs2@25 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`3> + { + .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::.ctor() - IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::@_instance + IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::.ctor() + IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit xs2@25 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [runtime]System.Tuple`3> - { - .field static assembly initonly class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -226,15 +235,17 @@ IL_001f: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::.ctor() - IL_0005: stsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::@_instance - IL_000a: 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 public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f1() cil managed @@ -433,17 +444,6 @@ 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 assembly static void staticInitialization@() cil managed { @@ -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..6c93ffd33bf 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 @@ -37,6 +37,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 ''.$ListExpressionSteppingTest3::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest3::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2() cil managed { @@ -75,6 +86,17 @@ } + .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 + } + } .class private abstract auto ansi sealed ''.$ListExpressionSteppingTest3 @@ -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..a48705d9334 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 @@ -37,6 +37,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 ''.$ListExpressionSteppingTest3::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest3::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2() cil managed { @@ -73,17 +84,6 @@ 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 assembly static void staticInitialization@() cil managed { @@ -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..94140250ac1 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 @@ -37,6 +37,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 ''.$ListExpressionSteppingTest4::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest4::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3() cil managed { @@ -86,6 +97,17 @@ } + .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 + } + } .class private abstract auto ansi sealed ''.$ListExpressionSteppingTest4 @@ -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..42b76d3a6fe 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 @@ -37,6 +37,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 ''.$ListExpressionSteppingTest4::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest4::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3() cil managed { @@ -84,17 +95,6 @@ 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 assembly static void staticInitialization@() cil managed { @@ -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..2eca5919966 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 @@ -37,6 +37,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 ''.$ListExpressionSteppingTest5::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest5::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f4() cil managed { @@ -106,6 +117,17 @@ } + .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 + } + } .class private abstract auto ansi sealed ''.$ListExpressionSteppingTest5 @@ -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..1512de269aa 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 @@ -37,6 +37,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 ''.$ListExpressionSteppingTest5::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest5::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f4() cil managed { @@ -104,17 +115,6 @@ 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 assembly static void staticInitialization@() cil managed { @@ -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..210cbaf5f5d 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 @@ -37,12 +37,15 @@ 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 public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$ListExpressionSteppingTest6::es@5 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest6::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest6::init@ + IL_000b: pop + IL_000c: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f7() cil managed @@ -150,6 +153,14 @@ IL_00b2: ret } + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$ListExpressionSteppingTest6::es@5 + IL_0005: 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..0258bc6413a 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 @@ -39,12 +39,15 @@ .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.Collections.FSharpList`1 es@5 .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 + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::es@5 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest6::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest6::init@ + IL_000b: pop + IL_000c: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f7() cil managed @@ -152,15 +155,12 @@ IL_00b2: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() 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 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::es@5 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -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/AnonRecd.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/AnonRecd.fs.il.net472.bsl index af11ac26847..13f7c07b1f8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/AnonRecd.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/AnonRecd.fs.il.net472.bsl @@ -90,14 +90,12 @@ .field private !'j__TPar' B@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public specialname rtspecialname - instance void .ctor(!'j__TPar' A, - !'j__TPar' B) cil managed + .method public specialname rtspecialname instance void .ctor(!'j__TPar' A, !'j__TPar' B) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E - 79 6D 6F 75 73 54 79 70 65 31 39 31 32 37 35 36 - 36 33 33 60 32 00 00 ) + .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 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 31 39 31 32 37 35 36 + 36 33 33 60 32 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -111,41 +109,6 @@ IL_0014: ret } - .method public hidebysig specialname instance !'j__TPar' get_A() 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 !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0006: ret - } - - .method public hidebysig specialname instance !'j__TPar' get_B() 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 !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0006: 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`5f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) - IL_0015: ret - } - .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -218,9 +181,7 @@ IL_000e: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -288,71 +249,7 @@ IL_0055: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_003d - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: ldarg.0 - IL_000c: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldarg.1 - IL_0026: ldarg.0 - IL_0027: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0031: ldloc.0 - IL_0032: ldc.i4.6 - IL_0033: shl - IL_0034: ldloc.0 - IL_0035: ldc.i4.2 - IL_0036: shr - IL_0037: add - IL_0038: add - IL_0039: add - IL_003a: stloc.0 - IL_003b: ldloc.0 - IL_003c: ret - - IL_003d: ldc.i4.0 - IL_003e: 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: tail. - IL_0008: callvirt instance int32 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000d: ret - } - - .method public hidebysig instance bool - Equals(class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -401,9 +298,7 @@ IL_003c: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -491,109 +386,114 @@ IL_0015: ret } - .property instance !'j__TPar' A() + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) - .get instance !'j__TPar' '<>f__AnonymousType1912756633`2'::get_A() + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: ret } - .property instance !'j__TPar' B() + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) - .get instance !'j__TPar' '<>f__AnonymousType1912756633`2'::get_B() + .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: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret } -} -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname - instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, - class [runtime]System.Type Type) cil managed + .method public strict virtual instance string ToString() 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret } - .method public hidebysig specialname instance class [runtime]System.Type get_Type() cil managed + .method public hidebysig specialname instance !'j__TPar' get_A() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0001: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ IL_0006: ret } - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() cil managed + .method public hidebysig specialname instance !'j__TPar' get_B() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0001: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ IL_0006: ret } - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() + .property instance !'j__TPar' A() { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1912756633`2'::get_A() } - .property instance class [runtime]System.Type - Type() + .property instance !'j__TPar' B() { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1912756633`2'::get_B() } } @@ -601,4 +501,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/AnonRecd.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/AnonRecd.fs.il.netcore.bsl index e4c22c5f2a8..e079ba3bb94 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/AnonRecd.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/AnonRecd.fs.il.netcore.bsl @@ -99,41 +99,6 @@ IL_0014: ret } - .method public hidebysig specialname instance !'j__TPar' get_A() 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 !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0006: ret - } - - .method public hidebysig specialname instance !'j__TPar' get_B() 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 !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0006: 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`5f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) - IL_0015: ret - } - .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -274,68 +239,6 @@ IL_0055: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_003d - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: ldarg.0 - IL_000c: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldarg.1 - IL_0026: ldarg.0 - IL_0027: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0031: ldloc.0 - IL_0032: ldc.i4.6 - IL_0033: shl - IL_0034: ldloc.0 - IL_0035: ldc.i4.2 - IL_0036: shr - IL_0037: add - IL_0038: add - IL_0039: add - IL_003a: stloc.0 - IL_003b: ldloc.0 - IL_003c: ret - - IL_003d: ldc.i4.0 - IL_003e: 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: tail. - IL_0008: callvirt instance int32 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000d: ret - } - .method public hidebysig instance bool Equals(class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -473,6 +376,103 @@ IL_0015: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: 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: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: 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`5f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() 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 !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() 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 !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + .property instance !'j__TPar' A() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 7789d03c3b3..d4f945d2d60 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -89,6 +89,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class M/get_F@41 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void M/get_F@41::.ctor() + IL_0005: stsfld class M/get_F@41 M/get_F@41::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -110,15 +119,6 @@ IL_0008: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void M/get_F@41::.ctor() - IL_0005: stsfld class M/get_F@41 M/get_F@41::@_instance - IL_000a: ret - } - } .method public static int32 I(class M/C i_want_to_see_this_identifier) cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 490a9e2fe81..9465402fcef 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -83,6 +83,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class M/get_F@41 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void M/get_F@41::.ctor() + IL_0005: stsfld class M/get_F@41 M/get_F@41::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -107,15 +116,6 @@ IL_000a: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void M/get_F@41::.ctor() - IL_0005: stsfld class M/get_F@41 M/get_F@41::@_instance - IL_000a: ret - } - } .method public static int32 I(class M/C i_want_to_see_this_identifier) cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index d7cfd3db423..b93a408380b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -60,6 +60,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class M/T/get_F@41 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void M/T/get_F@41::.ctor() + IL_0005: stsfld class M/T/get_F@41 M/T/get_F@41::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -81,15 +90,6 @@ IL_0008: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void M/T/get_F@41::.ctor() - IL_0005: stsfld class M/T/get_F@41 M/T/get_F@41::@_instance - IL_000a: ret - } - } .method public specialname rtspecialname instance void .ctor() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 69e2da4cc45..ab1f0440134 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ArgumentNamesInClosures01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -57,6 +57,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class M/T/get_F@41 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void M/T/get_F@41::.ctor() + IL_0005: stsfld class M/T/get_F@41 M/T/get_F@41::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -81,15 +90,6 @@ IL_000a: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void M/T/get_F@41::.ctor() - IL_0005: stsfld class M/T/get_F@41 M/T/get_F@41::@_instance - IL_000a: ret - } - } .method public specialname rtspecialname instance void .ctor() cil managed 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..52ddea2a584 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 @@ -60,6 +60,16 @@ IL_0014: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 assembly/seq1@9::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1>& next) cil managed { @@ -120,13 +130,16 @@ IL_0062: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1> GetFreshEnumerator() 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: ldc.i4.3 - IL_0002: stfld int32 assembly/seq1@9::pc + IL_0000: ldc.i4.0 + IL_0001: ldnull + IL_0002: newobj instance void assembly/seq1@9::.ctor(int32, + class [runtime]System.Tuple`2) IL_0007: ret } @@ -179,74 +192,64 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1> GetFreshEnumerator() 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: ldc.i4.0 - IL_0001: ldnull - IL_0002: newobj instance void assembly/seq1@9::.ctor(int32, - class [runtime]System.Tuple`2) - IL_0007: ret - } - } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_alist() 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::alist@5 - 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 public specialname static int32[] get_array() cil managed + .method public specialname static int32[] get_a1() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::array@6 + IL_0000: ldsfld int32[] ''.$assembly::a1@25 IL_0005: ret } - .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1 get_aseq() cil managed + .method public specialname static int32[] get_a2() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1 ''.$assembly::aseq@7 + IL_0000: ldsfld int32[] ''.$assembly::a2@26 IL_0005: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> get_list1() cil managed + .method public specialname static int32[0...,0...] get_a3() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$assembly::list1@8 + IL_0000: ldsfld int32[0...,0...] ''.$assembly::a3@11 IL_0005: ret } - .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1> get_seq1() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_alist() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1> ''.$assembly::seq1@9 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::alist@5 IL_0005: ret } - .method public specialname static class [runtime]System.Tuple`2[] get_array1() cil managed + .method public specialname static int32[] get_array() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2[] ''.$assembly::array1@10 + IL_0000: ldsfld int32[] ''.$assembly::array@6 IL_0005: ret } - .method public specialname static int32[0...,0...] get_a3() cil managed + .method public specialname static class [runtime]System.Tuple`2[] get_array1() cil managed { .maxstack 8 - IL_0000: ldsfld int32[0...,0...] ''.$assembly::a3@11 + IL_0000: ldsfld class [runtime]System.Tuple`2[] ''.$assembly::array1@10 IL_0005: ret } @@ -266,19 +269,27 @@ IL_0005: ret } - .method public specialname static int32[] get_a1() cil managed + .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1 get_aseq() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::a1@25 + IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1 ''.$assembly::aseq@7 IL_0005: ret } - .method public specialname static int32[] get_a2() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> get_list1() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::a2@26 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$assembly::list1@8 + IL_0005: ret + } + + .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1> get_seq1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1> ''.$assembly::seq1@9 IL_0005: ret } 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..aad28880eda 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 @@ -65,6 +65,16 @@ IL_0014: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 assembly/seq1@9::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1>& next) cil managed { @@ -125,13 +135,16 @@ IL_0062: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1> GetFreshEnumerator() 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: ldc.i4.3 - IL_0002: stfld int32 assembly/seq1@9::pc + IL_0000: ldc.i4.0 + IL_0001: ldnull + IL_0002: newobj instance void assembly/seq1@9::.ctor(int32, + class [runtime]System.Tuple`2) IL_0007: ret } @@ -184,74 +197,64 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1> GetFreshEnumerator() 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: ldc.i4.0 - IL_0001: ldnull - IL_0002: newobj instance void assembly/seq1@9::.ctor(int32, - class [runtime]System.Tuple`2) - IL_0007: ret - } - } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_alist() 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::alist@5 - 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 public specialname static int32[] get_array() cil managed + .method public specialname static int32[] get_a1() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::array@6 + IL_0000: ldsfld int32[] ''.$assembly::a1@25 IL_0005: ret } - .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1 get_aseq() cil managed + .method public specialname static int32[] get_a2() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1 ''.$assembly::aseq@7 + IL_0000: ldsfld int32[] ''.$assembly::a2@26 IL_0005: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> get_list1() cil managed + .method public specialname static int32[0...,0...] get_a3() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$assembly::list1@8 + IL_0000: ldsfld int32[0...,0...] ''.$assembly::a3@11 IL_0005: ret } - .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1> get_seq1() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_alist() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1> ''.$assembly::seq1@9 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::alist@5 IL_0005: ret } - .method public specialname static class [runtime]System.Tuple`2[] get_array1() cil managed + .method public specialname static int32[] get_array() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2[] ''.$assembly::array1@10 + IL_0000: ldsfld int32[] ''.$assembly::array@6 IL_0005: ret } - .method public specialname static int32[0...,0...] get_a3() cil managed + .method public specialname static class [runtime]System.Tuple`2[] get_array1() cil managed { .maxstack 8 - IL_0000: ldsfld int32[0...,0...] ''.$assembly::a3@11 + IL_0000: ldsfld class [runtime]System.Tuple`2[] ''.$assembly::array1@10 IL_0005: ret } @@ -271,59 +274,59 @@ IL_0005: ret } - .method public specialname static int32[] get_a1() cil managed + .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1 get_aseq() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::a1@25 + IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1 ''.$assembly::aseq@7 IL_0005: ret } - .method public specialname static int32[] get_a2() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> get_list1() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::a2@26 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$assembly::list1@8 IL_0005: ret } - .method assembly specialname static int32 get_arg_0@30() cil managed + .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1> get_seq1() cil managed { .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::arg_0@30 + IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1> ''.$assembly::seq1@9 IL_0005: 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.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 773fc662974..989cf6532f7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -60,6 +60,16 @@ IL_0014: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 assembly/seq1@9::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1>& next) cil managed { @@ -120,13 +130,16 @@ IL_0062: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1> GetFreshEnumerator() 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: ldc.i4.3 - IL_0002: stfld int32 assembly/seq1@9::pc + IL_0000: ldc.i4.0 + IL_0001: ldnull + IL_0002: newobj instance void assembly/seq1@9::.ctor(int32, + class [runtime]System.Tuple`2) IL_0007: ret } @@ -179,19 +192,6 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1> GetFreshEnumerator() 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: ldc.i4.0 - IL_0001: ldnull - IL_0002: newobj instance void assembly/seq1@9::.ctor(int32, - class [runtime]System.Tuple`2) - IL_0007: ret - } - } .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 alist@5 @@ -216,59 +216,62 @@ .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[] a2@26 .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_alist() 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::alist@5 - 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 public specialname static int32[] get_array() cil managed + .method public specialname static int32[] get_a1() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::array@6 + IL_0000: ldsfld int32[] assembly::a1@25 IL_0005: ret } - .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1 get_aseq() cil managed + .method public specialname static int32[] get_a2() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1 assembly::aseq@7 + IL_0000: ldsfld int32[] assembly::a2@26 IL_0005: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> get_list1() cil managed + .method public specialname static int32[0...,0...] get_a3() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> assembly::list1@8 + IL_0000: ldsfld int32[0...,0...] assembly::a3@11 IL_0005: ret } - .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1> get_seq1() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_alist() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1> assembly::seq1@9 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::alist@5 IL_0005: ret } - .method public specialname static class [runtime]System.Tuple`2[] get_array1() cil managed + .method public specialname static int32[] get_array() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2[] assembly::array1@10 + IL_0000: ldsfld int32[] assembly::array@6 IL_0005: ret } - .method public specialname static int32[0...,0...] get_a3() cil managed + .method public specialname static class [runtime]System.Tuple`2[] get_array1() cil managed { .maxstack 8 - IL_0000: ldsfld int32[0...,0...] assembly::a3@11 + IL_0000: ldsfld class [runtime]System.Tuple`2[] assembly::array1@10 IL_0005: ret } @@ -288,31 +291,28 @@ IL_0005: ret } - .method public specialname static int32[] get_a1() cil managed + .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1 get_aseq() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::a1@25 + IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1 assembly::aseq@7 IL_0005: ret } - .method public specialname static int32[] get_a2() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> get_list1() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::a2@26 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> assembly::list1@8 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1> get_seq1() 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 [runtime]System.Collections.Generic.IEnumerable`1> assembly::seq1@9 + IL_0005: ret } .method assembly static void staticInitialization@() 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..2b1725d2119 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 @@ -65,6 +65,16 @@ IL_0014: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 assembly/seq1@9::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1>& next) cil managed { @@ -125,13 +135,16 @@ IL_0062: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1> GetFreshEnumerator() 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: ldc.i4.3 - IL_0002: stfld int32 assembly/seq1@9::pc + IL_0000: ldc.i4.0 + IL_0001: ldnull + IL_0002: newobj instance void assembly/seq1@9::.ctor(int32, + class [runtime]System.Tuple`2) IL_0007: ret } @@ -184,19 +197,6 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1> GetFreshEnumerator() 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: ldc.i4.0 - IL_0001: ldnull - IL_0002: newobj instance void assembly/seq1@9::.ctor(int32, - class [runtime]System.Tuple`2) - IL_0007: ret - } - } .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 alist@5 @@ -243,59 +243,62 @@ .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 'arg_3@38-1' .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_alist() 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::alist@5 - 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 public specialname static int32[] get_array() cil managed + .method public specialname static int32[] get_a1() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::array@6 + IL_0000: ldsfld int32[] assembly::a1@25 IL_0005: ret } - .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1 get_aseq() cil managed + .method public specialname static int32[] get_a2() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1 assembly::aseq@7 + IL_0000: ldsfld int32[] assembly::a2@26 IL_0005: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> get_list1() cil managed + .method public specialname static int32[0...,0...] get_a3() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> assembly::list1@8 + IL_0000: ldsfld int32[0...,0...] assembly::a3@11 IL_0005: ret } - .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1> get_seq1() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_alist() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1> assembly::seq1@9 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::alist@5 IL_0005: ret } - .method public specialname static class [runtime]System.Tuple`2[] get_array1() cil managed + .method public specialname static int32[] get_array() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2[] assembly::array1@10 + IL_0000: ldsfld int32[] assembly::array@6 IL_0005: ret } - .method public specialname static int32[0...,0...] get_a3() cil managed + .method public specialname static class [runtime]System.Tuple`2[] get_array1() cil managed { .maxstack 8 - IL_0000: ldsfld int32[0...,0...] assembly::a3@11 + IL_0000: ldsfld class [runtime]System.Tuple`2[] assembly::array1@10 IL_0005: ret } @@ -315,59 +318,59 @@ IL_0005: ret } - .method public specialname static int32[] get_a1() cil managed + .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1 get_aseq() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::a1@25 + IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1 assembly::aseq@7 IL_0005: ret } - .method public specialname static int32[] get_a2() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> get_list1() cil managed { .maxstack 8 - IL_0000: ldsfld int32[] assembly::a2@26 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> assembly::list1@8 IL_0005: ret } - .method assembly specialname static int32 get_arg_0@30() cil managed + .method public specialname static class [runtime]System.Collections.Generic.IEnumerable`1> get_seq1() cil managed { .maxstack 8 - IL_0000: ldsfld int32 assembly::arg_0@30 + IL_0000: ldsfld class [runtime]System.Collections.Generic.IEnumerable`1> assembly::seq1@9 IL_0005: 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..09b27451ac9 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 @@ -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 ''.$M::init@ + IL_0006: ldsfld int32 ''.$M::init@ + IL_000b: pop + IL_000c: ret + } + .method public static !!T f(!!T x) cil managed { .param type T @@ -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..8172f6b8d6d 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 @@ -33,16 +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 ) - .method public static !!T f(!!T x) cil managed - { - .param type T - .custom instance void [runtime]System.CLSCompliantAttribute::.ctor(bool) = ( 01 00 01 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -54,6 +44,16 @@ IL_000c: ret } + .method public static !!T f(!!T x) cil managed + { + .param type T + .custom instance void [runtime]System.CLSCompliantAttribute::.ctor(bool) = ( 01 00 01 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } + .method assembly static void staticInitialization@() cil managed { @@ -88,4 +88,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl index 3867512a775..3abb264ffad 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl @@ -48,6 +48,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 @@ -82,4 +93,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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl index 3867512a775..3abb264ffad 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl @@ -48,6 +48,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 @@ -82,4 +93,3 @@ - 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..1a4776f8681 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 @@ -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 + } + .method public specialname static int32 get_static_initializer() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EqualsOnUnions01.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EqualsOnUnions01.fs.il.net472.bsl index 1d9c44dfaa2..5694201415f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EqualsOnUnions01.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EqualsOnUnions01.fs.il.net472.bsl @@ -42,7 +42,7 @@ [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 ) + 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 @@ -55,15 +55,15 @@ extends assembly/U { .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 24 45 71 75 61 6C 73 4F 6E 55 6E 69 6F 6E - 73 30 31 2B 55 2B 5F 41 40 44 65 62 75 67 54 79 - 70 65 50 72 6F 78 79 00 00 ) + 73 30 31 2B 55 2B 5F 41 40 44 65 62 75 67 54 79 + 70 65 50 72 6F 78 79 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 ) + 61 79 28 29 2C 6E 71 7D 00 00 ) .method assembly specialname rtspecialname instance void .ctor() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 12 45 71 75 61 6C 73 4F 6E 55 - 6E 69 6F 6E 73 30 31 2B 55 00 00 ) + .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 12 45 71 75 61 6C 73 4F 6E 55 + 6E 69 6F 6E 73 30 31 2B 55 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 ) @@ -79,19 +79,19 @@ extends assembly/U { .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 23 45 71 75 61 6C 73 4F 6E 55 6E 69 6F 6E - 73 30 31 2B 55 2B 42 40 44 65 62 75 67 54 79 70 - 65 50 72 6F 78 79 00 00 ) + 73 30 31 2B 55 2B 42 40 44 65 62 75 67 54 79 70 + 65 50 72 6F 78 79 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 ) + 61 79 28 29 2C 6E 71 7D 00 00 ) .field assembly initonly int32 item .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 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 12 45 71 75 61 6C 73 4F 6E 55 - 6E 69 6F 6E 73 30 31 2B 55 00 00 ) + .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 12 45 71 75 61 6C 73 4F 6E 55 + 6E 69 6F 6E 73 30 31 2B 55 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 ) @@ -135,9 +135,9 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class assembly/U/_A obj) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 12 45 71 75 61 6C 73 4F 6E 55 - 6E 69 6F 6E 73 30 31 2B 55 00 00 ) + .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 12 45 71 75 61 6C 73 4F 6E 55 + 6E 69 6F 6E 73 30 31 2B 55 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 ) @@ -161,9 +161,9 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class assembly/U/B obj) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 12 45 71 75 61 6C 73 4F 6E 55 - 6E 69 6F 6E 73 30 31 2B 55 00 00 ) + .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 12 45 71 75 61 6C 73 4F 6E 55 + 6E 69 6F 6E 73 30 31 2B 55 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 ) @@ -214,9 +214,9 @@ .method assembly specialname rtspecialname instance void .ctor() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 12 45 71 75 61 6C 73 4F 6E 55 - 6E 69 6F 6E 73 30 31 2B 55 00 00 ) + .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 12 45 71 75 61 6C 73 4F 6E 55 + 6E 69 6F 6E 73 30 31 2B 55 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 ) @@ -226,101 +226,6 @@ IL_0006: ret } - .method public static class assembly/U get_A() 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 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/U assembly/U::_unique_A - IL_0005: ret - } - - .method public hidebysig instance bool get_IsA() 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: isinst assembly/U/_A - IL_0006: ldnull - IL_0007: cgt.un - IL_0009: ret - } - - .method public static class assembly/U NewB(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void assembly/U/B::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsB() 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: isinst assembly/U/B - IL_0006: ldnull - IL_0007: cgt.un - 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: isinst assembly/U/B - IL_0006: brfalse.s IL_000b - - IL_0008: ldc.i4.1 - IL_0009: br.s IL_000c - - IL_000b: ldc.i4.0 - IL_000c: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -524,71 +429,6 @@ IL_0084: 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 7 - .locals init (int32 V_0, - class assembly/U/B V_1, - class assembly/U V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_003c - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: isinst assembly/U/B - IL_000b: brfalse.s IL_002d - - IL_000d: ldarg.0 - IL_000e: castclass assembly/U/B - IL_0013: stloc.1 - IL_0014: ldc.i4.1 - IL_0015: stloc.0 - IL_0016: ldc.i4 0x9e3779b9 - IL_001b: ldloc.1 - IL_001c: ldfld int32 assembly/U/B::item - IL_0021: ldloc.0 - IL_0022: ldc.i4.6 - IL_0023: shl - IL_0024: ldloc.0 - IL_0025: ldc.i4.2 - IL_0026: shr - IL_0027: add - IL_0028: add - IL_0029: add - IL_002a: stloc.0 - IL_002b: ldloc.0 - IL_002c: ret - - IL_002d: ldarg.0 - IL_002e: stloc.2 - IL_002f: ldloc.2 - IL_0030: isinst assembly/U/B - IL_0035: brfalse.s IL_003a - - IL_0037: ldc.i4.1 - IL_0038: br.s IL_003b - - IL_003a: ldc.i4.0 - IL_003b: ret - - IL_003c: ldc.i4.0 - IL_003d: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -787,6 +627,166 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/U/B V_1, + class assembly/U V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003c + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: isinst assembly/U/B + IL_000b: brfalse.s IL_002d + + IL_000d: ldarg.0 + IL_000e: castclass assembly/U/B + IL_0013: stloc.1 + IL_0014: ldc.i4.1 + IL_0015: stloc.0 + IL_0016: ldc.i4 0x9e3779b9 + IL_001b: ldloc.1 + IL_001c: ldfld int32 assembly/U/B::item + IL_0021: ldloc.0 + IL_0022: ldc.i4.6 + IL_0023: shl + IL_0024: ldloc.0 + IL_0025: ldc.i4.2 + IL_0026: shr + IL_0027: add + IL_0028: add + IL_0029: add + IL_002a: stloc.0 + IL_002b: ldloc.0 + IL_002c: ret + + IL_002d: ldarg.0 + IL_002e: stloc.2 + IL_002f: ldloc.2 + IL_0030: isinst assembly/U/B + IL_0035: brfalse.s IL_003a + + IL_0037: ldc.i4.1 + IL_0038: br.s IL_003b + + IL_003a: ldc.i4.0 + IL_003b: ret + + IL_003c: ldc.i4.0 + IL_003d: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/U NewB(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void assembly/U/B::.ctor(int32) + IL_0006: 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/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/U get_A() 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 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/U assembly/U::_unique_A + IL_0005: ret + } + + .method public hidebysig instance bool get_IsA() 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: isinst assembly/U/_A + IL_0006: ldnull + IL_0007: cgt.un + IL_0009: ret + } + + .method public hidebysig instance bool get_IsB() 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: isinst assembly/U/B + IL_0006: ldnull + IL_0007: cgt.un + 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: isinst assembly/U/B + IL_0006: brfalse.s IL_000b + + IL_0008: ldc.i4.1 + IL_0009: br.s IL_000c + + IL_000b: ldc.i4.0 + IL_000c: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -832,97 +832,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EqualsOnUnions01.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EqualsOnUnions01.fs.il.netcore.bsl index ab4bd09ac3a..5694201415f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EqualsOnUnions01.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EqualsOnUnions01.fs.il.netcore.bsl @@ -226,101 +226,6 @@ IL_0006: ret } - .method public static class assembly/U get_A() 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 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/U assembly/U::_unique_A - IL_0005: ret - } - - .method public hidebysig instance bool get_IsA() 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: isinst assembly/U/_A - IL_0006: ldnull - IL_0007: cgt.un - IL_0009: ret - } - - .method public static class assembly/U NewB(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void assembly/U/B::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsB() 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: isinst assembly/U/B - IL_0006: ldnull - IL_0007: cgt.un - 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: isinst assembly/U/B - IL_0006: brfalse.s IL_000b - - IL_0008: ldc.i4.1 - IL_0009: br.s IL_000c - - IL_000b: ldc.i4.0 - IL_000c: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -524,71 +429,6 @@ IL_0084: 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 7 - .locals init (int32 V_0, - class assembly/U/B V_1, - class assembly/U V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_003c - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: isinst assembly/U/B - IL_000b: brfalse.s IL_002d - - IL_000d: ldarg.0 - IL_000e: castclass assembly/U/B - IL_0013: stloc.1 - IL_0014: ldc.i4.1 - IL_0015: stloc.0 - IL_0016: ldc.i4 0x9e3779b9 - IL_001b: ldloc.1 - IL_001c: ldfld int32 assembly/U/B::item - IL_0021: ldloc.0 - IL_0022: ldc.i4.6 - IL_0023: shl - IL_0024: ldloc.0 - IL_0025: ldc.i4.2 - IL_0026: shr - IL_0027: add - IL_0028: add - IL_0029: add - IL_002a: stloc.0 - IL_002b: ldloc.0 - IL_002c: ret - - IL_002d: ldarg.0 - IL_002e: stloc.2 - IL_002f: ldloc.2 - IL_0030: isinst assembly/U/B - IL_0035: brfalse.s IL_003a - - IL_0037: ldc.i4.1 - IL_0038: br.s IL_003b - - IL_003a: ldc.i4.0 - IL_003b: ret - - IL_003c: ldc.i4.0 - IL_003d: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -787,6 +627,166 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/U/B V_1, + class assembly/U V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003c + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: isinst assembly/U/B + IL_000b: brfalse.s IL_002d + + IL_000d: ldarg.0 + IL_000e: castclass assembly/U/B + IL_0013: stloc.1 + IL_0014: ldc.i4.1 + IL_0015: stloc.0 + IL_0016: ldc.i4 0x9e3779b9 + IL_001b: ldloc.1 + IL_001c: ldfld int32 assembly/U/B::item + IL_0021: ldloc.0 + IL_0022: ldc.i4.6 + IL_0023: shl + IL_0024: ldloc.0 + IL_0025: ldc.i4.2 + IL_0026: shr + IL_0027: add + IL_0028: add + IL_0029: add + IL_002a: stloc.0 + IL_002b: ldloc.0 + IL_002c: ret + + IL_002d: ldarg.0 + IL_002e: stloc.2 + IL_002f: ldloc.2 + IL_0030: isinst assembly/U/B + IL_0035: brfalse.s IL_003a + + IL_0037: ldc.i4.1 + IL_0038: br.s IL_003b + + IL_003a: ldc.i4.0 + IL_003b: ret + + IL_003c: ldc.i4.0 + IL_003d: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/U NewB(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void assembly/U/B::.ctor(int32) + IL_0006: 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/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/U get_A() 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 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/U assembly/U::_unique_A + IL_0005: ret + } + + .method public hidebysig instance bool get_IsA() 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: isinst assembly/U/_A + IL_0006: ldnull + IL_0007: cgt.un + IL_0009: ret + } + + .method public hidebysig instance bool get_IsB() 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: isinst assembly/U/B + IL_0006: ldnull + IL_0007: cgt.un + 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: isinst assembly/U/B + IL_0006: brfalse.s IL_000b + + IL_0008: ldc.i4.1 + IL_0009: br.s IL_000c + + IL_000b: ldc.i4.0 + IL_000c: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl index d55b4bf8a43..c610b4c9250 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl @@ -42,7 +42,7 @@ [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 ) + 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 ) .field static assembly initonly class assembly/Weirdo _unique_C .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -59,10 +59,10 @@ .method assembly specialname rtspecialname instance void .ctor() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 1F 47 65 6E 65 72 61 6C 69 7A - 61 74 69 6F 6E 4F 6E 55 6E 69 6F 6E 73 30 31 2B - 57 65 69 72 64 6F 00 00 ) + .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 1F 47 65 6E 65 72 61 6C 69 7A + 61 74 69 6F 6E 4F 6E 55 6E 69 6F 6E 73 30 31 2B + 57 65 69 72 64 6F 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 ) @@ -72,57 +72,6 @@ IL_0006: ret } - .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C - IL_0005: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -195,37 +144,6 @@ IL_0021: 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 - IL_0001: brfalse.s IL_0009 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldc.i4.0 - IL_0008: ret - - IL_0009: ldc.i4.0 - IL_000a: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Weirdo obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -319,6 +237,88 @@ IL_0013: 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 + IL_0001: brfalse.s IL_0009 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldc.i4.0 + IL_0008: ret + + IL_0009: ldc.i4.0 + IL_000a: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Weirdo>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C + IL_0005: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -368,6 +368,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 + } + .method public static int32 f(class assembly/Weirdo C) cil managed { @@ -415,97 +426,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..c610b4c9250 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 @@ -72,57 +72,6 @@ IL_0006: ret } - .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C - IL_0005: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -195,37 +144,6 @@ IL_0021: 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 - IL_0001: brfalse.s IL_0009 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldc.i4.0 - IL_0008: ret - - IL_0009: ldc.i4.0 - IL_000a: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Weirdo obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -319,6 +237,88 @@ IL_0013: 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 + IL_0001: brfalse.s IL_0009 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldc.i4.0 + IL_0008: ret + + IL_0009: ldc.i4.0 + IL_000a: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Weirdo>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C + IL_0005: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -368,6 +368,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 + } + .method public static int32 f(class assembly/Weirdo C) cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl index f73e2bb3e3e..b3ae117f367 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl @@ -42,7 +42,7 @@ [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 ) + 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 ) .field static assembly initonly class assembly/Weirdo _unique_C .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -59,10 +59,10 @@ .method assembly specialname rtspecialname instance void .ctor() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 1F 47 65 6E 65 72 61 6C 69 7A - 61 74 69 6F 6E 4F 6E 55 6E 69 6F 6E 73 30 31 2B - 57 65 69 72 64 6F 00 00 ) + .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 1F 47 65 6E 65 72 61 6C 69 7A + 61 74 69 6F 6E 4F 6E 55 6E 69 6F 6E 73 30 31 2B + 57 65 69 72 64 6F 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 ) @@ -72,57 +72,6 @@ IL_0006: ret } - .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C - IL_0005: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -195,34 +144,6 @@ IL_0021: 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 8 - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0007 - - IL_0003: ldarg.0 - IL_0004: pop - IL_0005: ldc.i4.0 - IL_0006: ret - - IL_0007: ldc.i4.0 - IL_0008: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Weirdo obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -309,6 +230,85 @@ IL_0013: 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 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0007 + + IL_0003: ldarg.0 + IL_0004: pop + IL_0005: ldc.i4.0 + IL_0006: ret + + IL_0007: ldc.i4.0 + IL_0008: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Weirdo>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C + IL_0005: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -326,6 +326,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 + } + .method public static int32 f(class assembly/Weirdo C) cil managed { @@ -364,97 +375,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..b3ae117f367 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 @@ -72,57 +72,6 @@ IL_0006: ret } - .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C - IL_0005: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -195,34 +144,6 @@ IL_0021: 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 8 - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0007 - - IL_0003: ldarg.0 - IL_0004: pop - IL_0005: ldc.i4.0 - IL_0006: ret - - IL_0007: ldc.i4.0 - IL_0008: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Weirdo obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -309,6 +230,85 @@ IL_0013: 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 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0007 + + IL_0003: ldarg.0 + IL_0004: pop + IL_0005: ldc.i4.0 + IL_0006: ret + + IL_0007: ldc.i4.0 + IL_0008: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Weirdo>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C + IL_0005: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -326,6 +326,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 + } + .method public static int32 f(class assembly/Weirdo C) cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl index 3e8fb494923..c5126a6b030 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl @@ -42,7 +42,7 @@ [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 ) + 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 ) .field static assembly initonly class assembly/Weirdo _unique_C .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -59,10 +59,10 @@ .method assembly specialname rtspecialname instance void .ctor() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 1F 47 65 6E 65 72 61 6C 69 7A - 61 74 69 6F 6E 4F 6E 55 6E 69 6F 6E 73 30 31 2B - 57 65 69 72 64 6F 00 00 ) + .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 1F 47 65 6E 65 72 61 6C 69 7A + 61 74 69 6F 6E 4F 6E 55 6E 69 6F 6E 73 30 31 2B + 57 65 69 72 64 6F 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 ) @@ -72,57 +72,6 @@ IL_0006: ret } - .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C - IL_0005: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -195,37 +144,6 @@ IL_0021: 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 - IL_0001: brfalse.s IL_0009 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldc.i4.0 - IL_0008: ret - - IL_0009: ldc.i4.0 - IL_000a: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Weirdo obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -319,6 +237,88 @@ IL_0013: 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 + IL_0001: brfalse.s IL_0009 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldc.i4.0 + IL_0008: ret + + IL_0009: ldc.i4.0 + IL_000a: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Weirdo>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C + IL_0005: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -368,6 +368,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 + } + .method public static int32 f(class assembly/Weirdo C) cil managed { @@ -393,17 +404,6 @@ 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 - } - .method assembly static void staticInitialization@() cil managed { @@ -434,97 +434,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl index 1853a9e9ddd..c5126a6b030 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl @@ -72,57 +72,6 @@ IL_0006: ret } - .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C - IL_0005: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -195,37 +144,6 @@ IL_0021: 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 - IL_0001: brfalse.s IL_0009 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldc.i4.0 - IL_0008: ret - - IL_0009: ldc.i4.0 - IL_000a: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Weirdo obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -319,6 +237,88 @@ IL_0013: 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 + IL_0001: brfalse.s IL_0009 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldc.i4.0 + IL_0008: ret + + IL_0009: ldc.i4.0 + IL_000a: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Weirdo>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C + IL_0005: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -368,6 +368,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 + } + .method public static int32 f(class assembly/Weirdo C) cil managed { @@ -393,17 +404,6 @@ 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 - } - .method assembly static void staticInitialization@() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl index 34d59b13ac0..19e9805ffbe 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl @@ -42,7 +42,7 @@ [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 ) + 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 ) .field static assembly initonly class assembly/Weirdo _unique_C .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -59,10 +59,10 @@ .method assembly specialname rtspecialname instance void .ctor() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 1F 47 65 6E 65 72 61 6C 69 7A - 61 74 69 6F 6E 4F 6E 55 6E 69 6F 6E 73 30 31 2B - 57 65 69 72 64 6F 00 00 ) + .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 1F 47 65 6E 65 72 61 6C 69 7A + 61 74 69 6F 6E 4F 6E 55 6E 69 6F 6E 73 30 31 2B + 57 65 69 72 64 6F 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 ) @@ -72,57 +72,6 @@ IL_0006: ret } - .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C - IL_0005: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -195,34 +144,6 @@ IL_0021: 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 8 - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0007 - - IL_0003: ldarg.0 - IL_0004: pop - IL_0005: ldc.i4.0 - IL_0006: ret - - IL_0007: ldc.i4.0 - IL_0008: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Weirdo obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -309,6 +230,85 @@ IL_0013: 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 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0007 + + IL_0003: ldarg.0 + IL_0004: pop + IL_0005: ldc.i4.0 + IL_0006: ret + + IL_0007: ldc.i4.0 + IL_0008: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Weirdo>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C + IL_0005: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -326,31 +326,31 @@ } } - .method public static int32 f(class assembly/Weirdo C) cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 IL_0000: ldc.i4.0 - IL_0001: ret + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method public static void g() cil managed + .method public static int32 f(class assembly/Weirdo C) cil managed { .maxstack 8 - IL_0000: nop + IL_0000: ldc.i4.0 IL_0001: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public static void g() 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: nop + IL_0001: ret } .method assembly static void staticInitialization@() cil managed @@ -383,97 +383,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl index 6d7c2d81ccb..19e9805ffbe 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl @@ -72,57 +72,6 @@ IL_0006: ret } - .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C - IL_0005: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Weirdo obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -195,34 +144,6 @@ IL_0021: 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 8 - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0007 - - IL_0003: ldarg.0 - IL_0004: pop - IL_0005: ldc.i4.0 - IL_0006: ret - - IL_0007: ldc.i4.0 - IL_0008: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Weirdo obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -309,6 +230,85 @@ IL_0013: 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 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0007 + + IL_0003: ldarg.0 + IL_0004: pop + IL_0005: ldc.i4.0 + IL_0006: ret + + IL_0007: ldc.i4.0 + IL_0008: 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/Weirdo::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Weirdo>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/Weirdo get_C() 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 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/Weirdo assembly/Weirdo::_unique_C + IL_0005: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -326,31 +326,31 @@ } } - .method public static int32 f(class assembly/Weirdo C) cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 IL_0000: ldc.i4.0 - IL_0001: ret + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method public static void g() cil managed + .method public static int32 f(class assembly/Weirdo C) cil managed { .maxstack 8 - IL_0000: nop + IL_0000: ldc.i4.0 IL_0001: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public static void g() 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: nop + IL_0001: ret } .method assembly static void staticInitialization@() cil managed 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..478b2b7fd7c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GenericTypeStaticField.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GenericTypeStaticField.fs.il.bsl @@ -39,17 +39,6 @@ .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 class assembly/Foo`1 theInstance .field static assembly int32 init@2 - .method public specialname rtspecialname instance void .ctor() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: callvirt instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: pop - IL_0008: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -62,6 +51,17 @@ IL_0012: ret } + .method public specialname rtspecialname instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } + .method public specialname static class assembly/Foo`1 get_Instance() cil managed { @@ -95,17 +95,6 @@ .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 class assembly/Bar`2 theInstance .field static assembly int32 'init@6-1' - .method public specialname rtspecialname instance void .ctor() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: callvirt instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: pop - IL_0008: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -118,6 +107,17 @@ IL_0012: ret } + .method public specialname rtspecialname instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } + .method public specialname static class assembly/Bar`2 get_Instance() cil managed { @@ -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..15ecc541fdd 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 @@ -41,6 +41,17 @@ extends [FSharp.Core]Microsoft.FSharp.Core.FSharpTypeFunc { .field static assembly initonly class assembly/M/f5@5 @_instance + .method private specialname rtspecialname static void .cctor() 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 10 + IL_0000: newobj instance void assembly/M/f5@5::.ctor() + IL_0005: stsfld class assembly/M/f5@5 assembly/M/f5@5::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -66,17 +77,6 @@ IL_000b: ret } - .method private specialname rtspecialname static void .cctor() 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 10 - IL_0000: newobj instance void assembly/M/f5@5::.ctor() - IL_0005: stsfld class assembly/M/f5@5 assembly/M/f5@5::@_instance - IL_000a: ret - } - } .class auto ansi serializable sealed nested assembly beforefieldinit f5@5T @@ -126,6 +126,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 + } + .method public static char m() cil managed { @@ -163,6 +174,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/IfThenElse01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index fd1a1e646a2..2776566e4c7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -41,6 +41,17 @@ extends [FSharp.Core]Microsoft.FSharp.Core.FSharpTypeFunc { .field static assembly initonly class assembly/M/f5@5 @_instance + .method private specialname rtspecialname static void .cctor() 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 10 + IL_0000: newobj instance void assembly/M/f5@5::.ctor() + IL_0005: stsfld class assembly/M/f5@5 assembly/M/f5@5::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -66,17 +77,6 @@ IL_000b: ret } - .method private specialname rtspecialname static void .cctor() 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 10 - IL_0000: newobj instance void assembly/M/f5@5::.ctor() - IL_0005: stsfld class assembly/M/f5@5 assembly/M/f5@5::@_instance - IL_000a: ret - } - } .class auto ansi serializable sealed nested assembly beforefieldinit f5@5T @@ -126,6 +126,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 + } + .method public static char m() cil managed { @@ -161,17 +172,6 @@ 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 assembly static void staticInitialization@() cil managed { 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..883e8e5eada 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 @@ -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 + } + .method public static class [runtime]System.Tuple`4 F(!!a y) cil managed { 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..7e7f8485495 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 @@ -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 + } + .method public static class [runtime]System.Tuple`4 F(!!a y) cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index f27f4f4801f..d2cdac1ba60 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOn.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 + } + .method public static class [runtime]System.Tuple`4 F(!!a y) cil managed { @@ -116,17 +127,6 @@ 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 - } - .method assembly static void staticInitialization@() 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..bc90556c20c 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 @@ -35,6 +35,17 @@ .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 [runtime]System.Tuple`4 arg@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::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class [runtime]System.Tuple`4 F(!!a y) cil managed { @@ -166,17 +177,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::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/Lock01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 1e2b6f38e6e..0fcd14d5ec4 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 @@ -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 + } + .method public specialname static object get_o() cil managed { @@ -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..c23e411ba20 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 @@ -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 + } + .method public specialname static object get_o() 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..944a062b92a 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 @@ -40,14 +40,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 object o@19 .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 object get_o() cil managed - { - - .maxstack 8 - IL_0000: ldsfld object assembly::o@19 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -59,6 +51,14 @@ IL_000c: ret } + .method public specialname static object get_o() cil managed + { + + .maxstack 8 + IL_0000: ldsfld object assembly::o@19 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { @@ -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..9397b63089d 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 @@ -42,6 +42,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 bool lockTaken@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::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method public specialname static object get_o() 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..0db937e76da 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Marshal.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Marshal.fs.il.bsl @@ -41,10 +41,6 @@ { } - .method public hidebysig strict virtual instance int32 Invoke([out] uint8[] marshal([ + 1]) data, [out] int32 length) runtime managed - { - } - .method public hidebysig strict virtual instance class [runtime]System.IAsyncResult BeginInvoke([out] uint8[] marshal([ + 1]) data, @@ -58,6 +54,10 @@ { } + .method public hidebysig strict virtual instance int32 Invoke([out] uint8[] marshal([ + 1]) data, [out] int32 length) runtime managed + { + } + } } @@ -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..3e1828898b2 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 @@ -33,15 +33,15 @@ 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 public static void g() cil managed noinlining + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldstr "Hey!" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: pop - IL_0010: 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 public static void f() cil managed @@ -53,6 +53,17 @@ IL_0007: ret } + .method public static void g() cil managed noinlining + { + + .maxstack 8 + IL_0000: ldstr "Hey!" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + IL_0010: 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..f79a18919f0 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 @@ -38,6 +38,26 @@ 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 + } + + .method public static void f() cil managed + { + + .maxstack 8 + IL_0000: tail. + IL_0002: call void assembly::g() + IL_0007: ret + } + .method public static void g() cil managed noinlining { @@ -54,15 +74,6 @@ IL_0017: ret } - .method public static void f() cil managed - { - - .maxstack 8 - IL_0000: tail. - IL_0002: call void assembly::g() - IL_0007: ret - } - } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 170b3c6df09..cfb5d49598a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -33,15 +33,15 @@ 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 public static void g() cil managed noinlining + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldstr "Hey!" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: pop - IL_0010: 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 public static void f() cil managed @@ -53,15 +53,15 @@ IL_0007: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public static void g() cil managed noinlining { .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: ldstr "Hey!" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: pop + IL_0010: ret } .method assembly static void staticInitialization@() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index f519eb68b52..3e1f43da8f5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -38,20 +38,15 @@ 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 public static void g() cil managed noinlining + .method private specialname rtspecialname static void .cctor() cil managed { - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) - IL_0000: ldstr "Hey!" - 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: ret + .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 public static void f() cil managed @@ -63,15 +58,20 @@ IL_0007: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public static void g() cil managed noinlining { - .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 + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + IL_0000: ldstr "Hey!" + 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: ret } .method assembly static void staticInitialization@() cil managed 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..c231c7d18b6 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 @@ -37,6 +37,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 + } + .method public specialname static int32 get_x() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -53,6 +64,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.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index e091389ab0a..2141ebc75af 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,12 +42,15 @@ 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 + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 ''.$assembly::format@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 public specialname static int32 get_x() cil managed @@ -60,6 +63,14 @@ IL_0001: 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.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 3a8b6a3593f..9bc56fb56da 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -37,16 +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 ) - .method public specialname static int32 get_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: ldc.i4.1 - IL_0001: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -58,6 +48,16 @@ IL_000c: ret } + .method public specialname static int32 get_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: ldc.i4.1 + IL_0001: ret + } + .method assembly static void staticInitialization@() cil managed { 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..e80fe963209 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,12 +44,15 @@ .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 + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 assembly/M::format@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 public specialname static int32 get_x() cil managed @@ -62,15 +65,12 @@ IL_0001: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 get_format@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 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/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..f03db1ded95 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 @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/q@4 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/q@4::.ctor() + IL_0005: stsfld class assembly/q@4 assembly/q@4::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -68,15 +77,17 @@ IL_000e: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/q@4::.ctor() - IL_0005: stsfld class assembly/q@4 assembly/q@4::@_instance - IL_000a: 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 public specialname static bool get_q() cil managed 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..96e8bcd624d 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 @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/q@4 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/q@4::.ctor() + IL_0005: stsfld class assembly/q@4 assembly/q@4::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -56,15 +65,17 @@ IL_0001: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/q@4::.ctor() - IL_0005: stsfld class assembly/q@4 assembly/q@4::@_instance - IL_000a: 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 public specialname static bool get_q() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 37a0b0d53f2..ae12f3ec1e5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/q@4 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/q@4::.ctor() + IL_0005: stsfld class assembly/q@4 assembly/q@4::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -68,27 +77,10 @@ IL_000e: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/q@4::.ctor() - IL_0005: stsfld class assembly/q@4 assembly/q@4::@_instance - IL_000a: ret - } - } .field static assembly bool q@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 bool get_q() cil managed - { - - .maxstack 8 - IL_0000: ldsfld bool assembly::q@4 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -100,6 +92,14 @@ IL_000c: ret } + .method public specialname static bool get_q() cil managed + { + + .maxstack 8 + IL_0000: ldsfld bool assembly::q@4 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index d8e2b4d4bb6..6d432d6e52c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/q@4 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/q@4::.ctor() + IL_0005: stsfld class assembly/q@4 assembly/q@4::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -56,27 +65,10 @@ IL_0001: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/q@4::.ctor() - IL_0005: stsfld class assembly/q@4 assembly/q@4::@_instance - IL_000a: ret - } - } .field static assembly bool q@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 bool get_q() cil managed - { - - .maxstack 8 - IL_0000: ldsfld bool assembly::q@4 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -88,6 +80,14 @@ IL_000c: ret } + .method public specialname static bool get_q() cil managed + { + + .maxstack 8 + IL_0000: ldsfld bool assembly::q@4 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructCtorDebugPoints.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructCtorDebugPoints.fs.il.bsl index 38da1c0bb74..713062fffee 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructCtorDebugPoints.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructCtorDebugPoints.fs.il.bsl @@ -44,165 +44,6 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.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 ) .field assembly int64 bits@ - .method public hidebysig specialname instance int64 get_bits() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld int64 assembly/Flags::bits@ - IL_0006: ret - } - - .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/Flags obj) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 5 - .locals init (class [runtime]System.Collections.IComparer V_0, - int64 V_1, - int64 V_2) - IL_0000: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0005: stloc.0 - IL_0006: ldarg.0 - IL_0007: ldfld int64 assembly/Flags::bits@ - IL_000c: stloc.1 - IL_000d: ldarga.s obj - IL_000f: ldfld int64 assembly/Flags::bits@ - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldloc.2 - IL_0017: cgt - IL_0019: ldloc.1 - IL_001a: ldloc.2 - IL_001b: clt - IL_001d: sub - IL_001e: 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/Flags - IL_0007: call instance int32 assembly/Flags::CompareTo(valuetype assembly/Flags) - 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 5 - .locals init (valuetype assembly/Flags V_0, - int64 V_1, - int64 V_2) - IL_0000: ldarg.1 - IL_0001: unbox.any assembly/Flags - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldfld int64 assembly/Flags::bits@ - IL_000d: stloc.1 - IL_000e: ldloca.s V_0 - IL_0010: ldfld int64 assembly/Flags::bits@ - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldloc.2 - IL_0018: cgt - IL_001a: ldloc.1 - IL_001b: ldloc.2 - IL_001c: clt - IL_001e: sub - IL_001f: 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 7 - .locals init (int32 V_0, - int64 V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int64 assembly/Flags::bits@ - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: conv.i4 - IL_0010: ldloc.1 - IL_0011: ldc.i4.s 32 - IL_0013: shr - IL_0014: conv.i4 - IL_0015: xor - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldloc.0 - IL_0021: 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: call instance int32 assembly/Flags::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool Equals(valuetype assembly/Flags obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int64 assembly/Flags::bits@ - IL_0006: ldarga.s obj - IL_0008: ldfld int64 assembly/Flags::bits@ - IL_000d: ceq - IL_000f: 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 4 - .locals init (valuetype assembly/Flags V_0) - IL_0000: ldarg.1 - IL_0001: isinst assembly/Flags - IL_0006: brfalse.s IL_001f - - IL_0008: ldarg.1 - IL_0009: unbox.any assembly/Flags - IL_000e: stloc.0 - IL_000f: ldarg.0 - IL_0010: ldfld int64 assembly/Flags::bits@ - IL_0015: ldloca.s V_0 - IL_0017: ldfld int64 assembly/Flags::bits@ - IL_001c: ceq - IL_001e: ret - - IL_001f: ldc.i4.0 - IL_0020: ret - } - .method public specialname rtspecialname instance void .ctor(int64 bits) cil managed { @@ -305,13 +146,106 @@ IL_005d: ret } - .method public hidebysig specialname instance int64 get_Bits() cil managed + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/Flags obj) cil managed { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class [runtime]System.Collections.IComparer V_0, + int64 V_1, + int64 V_2) + IL_0000: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0005: stloc.0 + IL_0006: ldarg.0 + IL_0007: ldfld int64 assembly/Flags::bits@ + IL_000c: stloc.1 + IL_000d: ldarga.s obj + IL_000f: ldfld int64 assembly/Flags::bits@ + IL_0014: stloc.2 + IL_0015: ldloc.1 + IL_0016: ldloc.2 + IL_0017: cgt + IL_0019: ldloc.1 + IL_001a: ldloc.2 + IL_001b: clt + IL_001d: sub + IL_001e: 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/Flags + IL_0007: call instance int32 assembly/Flags::CompareTo(valuetype assembly/Flags) + 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 5 + .locals init (valuetype assembly/Flags V_0, + int64 V_1, + int64 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Flags + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: ldfld int64 assembly/Flags::bits@ + IL_000d: stloc.1 + IL_000e: ldloca.s V_0 + IL_0010: ldfld int64 assembly/Flags::bits@ + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldloc.2 + IL_0018: cgt + IL_001a: ldloc.1 + IL_001b: ldloc.2 + IL_001c: clt + IL_001e: sub + IL_001f: ret + } + + .method public hidebysig instance bool Equals(valuetype assembly/Flags obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld int64 assembly/Flags::bits@ - IL_0006: ret + IL_0006: ldarga.s obj + IL_0008: ldfld int64 assembly/Flags::bits@ + IL_000d: ceq + IL_000f: 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 4 + .locals init (valuetype assembly/Flags V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Flags + IL_0006: brfalse.s IL_001f + + IL_0008: ldarg.1 + IL_0009: unbox.any assembly/Flags + IL_000e: stloc.0 + IL_000f: ldarg.0 + IL_0010: ldfld int64 assembly/Flags::bits@ + IL_0015: ldloca.s V_0 + IL_0017: ldfld int64 assembly/Flags::bits@ + IL_001c: ceq + IL_001e: ret + + IL_001f: ldc.i4.0 + IL_0020: ret } .method public hidebysig virtual final instance bool Equals(valuetype assembly/Flags obj) cil managed @@ -354,6 +288,72 @@ IL_0022: 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 7 + .locals init (int32 V_0, + int64 V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int64 assembly/Flags::bits@ + IL_000d: stloc.1 + IL_000e: ldloc.1 + IL_000f: conv.i4 + IL_0010: ldloc.1 + IL_0011: ldc.i4.s 32 + IL_0013: shr + IL_0014: conv.i4 + IL_0015: xor + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldloc.0 + IL_0021: 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: call instance int32 assembly/Flags::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int64 get_Bits() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int64 assembly/Flags::bits@ + IL_0006: ret + } + + .method public hidebysig specialname instance int64 get_bits() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int64 assembly/Flags::bits@ + IL_0006: ret + } + .property instance int64 bits() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs01.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs01.fs.il.bsl index 2cf766c0973..d3bd0c8e4e5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs01.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs01.fs.il.bsl @@ -43,6 +43,16 @@ { .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 public int32 Field + .method public specialname rtspecialname instance void .ctor(int32 i) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 Experiment.Test/Test::Field + IL_0007: ret + } + .method public hidebysig virtual final instance int32 CompareTo(valuetype Experiment.Test/Test obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -108,42 +118,6 @@ IL_001f: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 Experiment.Test/Test::Field - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldloc.0 - IL_0018: 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: call instance int32 Experiment.Test/Test::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype Experiment.Test/Test obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -181,16 +155,6 @@ IL_0020: ret } - .method public specialname rtspecialname instance void .ctor(int32 i) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 Experiment.Test/Test::Field - IL_0007: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype Experiment.Test/Test obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -231,6 +195,42 @@ IL_0022: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 Experiment.Test/Test::Field + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldloc.0 + IL_0018: 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: call instance int32 Experiment.Test/Test::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + } .method public static int32 test() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.bsl index 5b45827f8a3..85f2764a48e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.bsl @@ -44,16 +44,51 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.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 ) .field assembly int32 hash@ - .method public hidebysig specialname instance int32 get_hash() cil managed + .method public specialname rtspecialname instance void .ctor(int32 length) cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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 + .maxstack 5 + .locals init (int32 V_0, + valuetype Experiment.Test/Repro& V_1, + int32 V_2, + int32 V_3, + valuetype Experiment.Test/Repro& V_4) IL_0000: ldarg.0 - IL_0001: ldfld int32 Experiment.Test/Repro::hash@ - IL_0006: ret + IL_0001: stloc.1 + IL_0002: ldloc.1 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: stloc.1 + IL_0006: ldc.i4.0 + IL_0007: stloc.3 + IL_0008: ldarg.1 + IL_0009: ldc.i4.1 + IL_000a: sub + IL_000b: stloc.2 + IL_000c: ldloc.2 + IL_000d: ldloc.3 + IL_000e: blt.s IL_001f + + IL_0010: ldc.i4.s 26 + IL_0012: ldloc.0 + IL_0013: mul + IL_0014: stloc.0 + IL_0015: ldloc.3 + IL_0016: ldc.i4.1 + IL_0017: add + IL_0018: stloc.3 + IL_0019: ldloc.3 + IL_001a: ldloc.2 + IL_001b: ldc.i4.1 + IL_001c: add + IL_001d: bne.un.s IL_0010 + + IL_001f: ldloc.1 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.0 + IL_0025: stfld int32 Experiment.Test/Repro::hash@ + IL_002a: ret } .method public hidebysig virtual final instance int32 CompareTo(valuetype Experiment.Test/Repro obj) cil managed @@ -121,42 +156,6 @@ IL_001f: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 Experiment.Test/Repro::hash@ - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldloc.0 - IL_0018: 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: call instance int32 Experiment.Test/Repro::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype Experiment.Test/Repro obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -194,53 +193,6 @@ IL_0020: ret } - .method public specialname rtspecialname instance void .ctor(int32 length) cil managed - { - - .maxstack 5 - .locals init (int32 V_0, - valuetype Experiment.Test/Repro& V_1, - int32 V_2, - int32 V_3, - valuetype Experiment.Test/Repro& V_4) - IL_0000: ldarg.0 - IL_0001: stloc.1 - IL_0002: ldloc.1 - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: stloc.1 - IL_0006: ldc.i4.0 - IL_0007: stloc.3 - IL_0008: ldarg.1 - IL_0009: ldc.i4.1 - IL_000a: sub - IL_000b: stloc.2 - IL_000c: ldloc.2 - IL_000d: ldloc.3 - IL_000e: blt.s IL_001f - - IL_0010: ldc.i4.s 26 - IL_0012: ldloc.0 - IL_0013: mul - IL_0014: stloc.0 - IL_0015: ldloc.3 - IL_0016: ldc.i4.1 - IL_0017: add - IL_0018: stloc.3 - IL_0019: ldloc.3 - IL_001a: ldloc.2 - IL_001b: ldc.i4.1 - IL_001c: add - IL_001d: bne.un.s IL_0010 - - IL_001f: ldloc.1 - IL_0020: stloc.s V_4 - IL_0022: ldloc.s V_4 - IL_0024: ldloc.0 - IL_0025: stfld int32 Experiment.Test/Repro::hash@ - IL_002a: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype Experiment.Test/Repro obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -281,6 +233,54 @@ IL_0022: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 Experiment.Test/Repro::hash@ + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldloc.0 + IL_0018: 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: call instance int32 Experiment.Test/Repro::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_hash() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld int32 Experiment.Test/Repro::hash@ + IL_0006: ret + } + .property instance int32 hash() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02_asNetStandard20.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02_asNetStandard20.fs.il.bsl index cff67da6c44..9a6247bd89e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02_asNetStandard20.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02_asNetStandard20.fs.il.bsl @@ -49,16 +49,51 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.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 ) .field assembly int32 hash@ - .method public hidebysig specialname instance int32 get_hash() cil managed + .method public specialname rtspecialname instance void .ctor(int32 length) cil managed { - .custom instance void System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [netstandard]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [netstandard]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 8 + .maxstack 5 + .locals init (int32 V_0, + valuetype Experiment.Test/Repro& V_1, + int32 V_2, + int32 V_3, + valuetype Experiment.Test/Repro& V_4) IL_0000: ldarg.0 - IL_0001: ldfld int32 Experiment.Test/Repro::hash@ - IL_0006: ret + IL_0001: stloc.1 + IL_0002: ldloc.1 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: stloc.1 + IL_0006: ldc.i4.0 + IL_0007: stloc.3 + IL_0008: ldarg.1 + IL_0009: ldc.i4.1 + IL_000a: sub + IL_000b: stloc.2 + IL_000c: ldloc.2 + IL_000d: ldloc.3 + IL_000e: blt.s IL_001f + + IL_0010: ldc.i4.s 26 + IL_0012: ldloc.0 + IL_0013: mul + IL_0014: stloc.0 + IL_0015: ldloc.3 + IL_0016: ldc.i4.1 + IL_0017: add + IL_0018: stloc.3 + IL_0019: ldloc.3 + IL_001a: ldloc.2 + IL_001b: ldc.i4.1 + IL_001c: add + IL_001d: bne.un.s IL_0010 + + IL_001f: ldloc.1 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.0 + IL_0025: stfld int32 Experiment.Test/Repro::hash@ + IL_002a: ret } .method public hidebysig virtual final instance int32 CompareTo(valuetype Experiment.Test/Repro obj) cil managed @@ -126,42 +161,6 @@ IL_001f: ret } - .method public hidebysig virtual final instance int32 GetHashCode(class [netstandard]System.Collections.IEqualityComparer comp) cil managed - { - .custom instance void [netstandard]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 Experiment.Test/Repro::hash@ - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldloc.0 - IL_0018: ret - } - - .method public hidebysig virtual final instance int32 GetHashCode() cil managed - { - .custom instance void [netstandard]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call class [netstandard]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() - IL_0006: call instance int32 Experiment.Test/Repro::GetHashCode(class [netstandard]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype Experiment.Test/Repro obj, class [netstandard]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [netstandard]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -199,53 +198,6 @@ IL_0020: ret } - .method public specialname rtspecialname instance void .ctor(int32 length) cil managed - { - - .maxstack 5 - .locals init (int32 V_0, - valuetype Experiment.Test/Repro& V_1, - int32 V_2, - int32 V_3, - valuetype Experiment.Test/Repro& V_4) - IL_0000: ldarg.0 - IL_0001: stloc.1 - IL_0002: ldloc.1 - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: stloc.1 - IL_0006: ldc.i4.0 - IL_0007: stloc.3 - IL_0008: ldarg.1 - IL_0009: ldc.i4.1 - IL_000a: sub - IL_000b: stloc.2 - IL_000c: ldloc.2 - IL_000d: ldloc.3 - IL_000e: blt.s IL_001f - - IL_0010: ldc.i4.s 26 - IL_0012: ldloc.0 - IL_0013: mul - IL_0014: stloc.0 - IL_0015: ldloc.3 - IL_0016: ldc.i4.1 - IL_0017: add - IL_0018: stloc.3 - IL_0019: ldloc.3 - IL_001a: ldloc.2 - IL_001b: ldc.i4.1 - IL_001c: add - IL_001d: bne.un.s IL_0010 - - IL_001f: ldloc.1 - IL_0020: stloc.s V_4 - IL_0022: ldloc.s V_4 - IL_0024: ldloc.0 - IL_0025: stfld int32 Experiment.Test/Repro::hash@ - IL_002a: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype Experiment.Test/Repro obj) cil managed { .custom instance void [netstandard]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -286,6 +238,54 @@ IL_0022: ret } + .method public hidebysig virtual final instance int32 GetHashCode(class [netstandard]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [netstandard]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 Experiment.Test/Repro::hash@ + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldloc.0 + IL_0018: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [netstandard]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [netstandard]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: call instance int32 Experiment.Test/Repro::GetHashCode(class [netstandard]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_hash() cil managed + { + .custom instance void System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [netstandard]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [netstandard]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Experiment.Test/Repro::hash@ + IL_0006: ret + } + .property instance int32 hash() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, 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..dcb1e459c1e 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 @@ -118,45 +118,6 @@ IL_0026: 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.1 - IL_0008: stloc.1 - IL_0009: ldarg.0 - IL_000a: ldfld int32 assembly/T::i - IL_000f: ldloc.0 - IL_0010: ldc.i4.6 - IL_0011: shl - IL_0012: ldloc.0 - IL_0013: ldc.i4.2 - IL_0014: shr - IL_0015: add - IL_0016: add - IL_0017: add - IL_0018: stloc.0 - IL_0019: ldloc.0 - IL_001a: 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: call instance int32 assembly/T::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/T obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -205,16 +166,6 @@ IL_001e: ret } - .method public hidebysig instance void Set(int32 i) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 assembly/T::i - IL_0007: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/T obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -258,6 +209,66 @@ IL_001d: 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.1 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: ldfld int32 assembly/T::i + IL_000f: ldloc.0 + IL_0010: ldc.i4.6 + IL_0011: shl + IL_0012: ldloc.0 + IL_0013: ldc.i4.2 + IL_0014: shr + IL_0015: add + IL_0016: add + IL_0017: add + IL_0018: stloc.0 + IL_0019: ldloc.0 + IL_001a: 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: call instance int32 assembly/T::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance void Set(int32 i) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 assembly/T::i + 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 } .method public specialname static valuetype assembly/T[] get_a() cil managed 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..0ee8e45026d 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 @@ -109,42 +109,6 @@ IL_001f: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/T::i - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldloc.0 - IL_0018: 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: call instance int32 assembly/T::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/T obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -182,16 +146,6 @@ IL_0020: ret } - .method public hidebysig instance void Set(int32 i) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 assembly/T::i - IL_0007: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/T obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -232,6 +186,63 @@ IL_0022: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/T::i + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldloc.0 + IL_0018: 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: call instance int32 assembly/T::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance void Set(int32 i) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 assembly/T::i + 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 } .method public specialname static valuetype assembly/T[] get_a() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 759a84a9432..e5b5ee0a547 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -118,45 +118,6 @@ IL_0026: 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.1 - IL_0008: stloc.1 - IL_0009: ldarg.0 - IL_000a: ldfld int32 assembly/T::i - IL_000f: ldloc.0 - IL_0010: ldc.i4.6 - IL_0011: shl - IL_0012: ldloc.0 - IL_0013: ldc.i4.2 - IL_0014: shr - IL_0015: add - IL_0016: add - IL_0017: add - IL_0018: stloc.0 - IL_0019: ldloc.0 - IL_001a: 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: call instance int32 assembly/T::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/T obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -205,16 +166,6 @@ IL_001e: ret } - .method public hidebysig instance void Set(int32 i) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 assembly/T::i - IL_0007: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/T obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -258,18 +209,59 @@ IL_001d: 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.1 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: ldfld int32 assembly/T::i + IL_000f: ldloc.0 + IL_0010: ldc.i4.6 + IL_0011: shl + IL_0012: ldloc.0 + IL_0013: ldc.i4.2 + IL_0014: shr + IL_0015: add + IL_0016: add + IL_0017: add + IL_0018: stloc.0 + IL_0019: ldloc.0 + IL_001a: 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: call instance int32 assembly/T::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance void Set(int32 i) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 assembly/T::i + IL_0007: ret + } + } .field static assembly valuetype assembly/T[] a@11 .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 valuetype assembly/T[] get_a() cil managed - { - - .maxstack 8 - IL_0000: ldsfld valuetype assembly/T[] assembly::a@11 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -281,6 +273,14 @@ IL_000c: ret } + .method public specialname static valuetype assembly/T[] get_a() cil managed + { + + .maxstack 8 + IL_0000: ldsfld valuetype assembly/T[] assembly::a@11 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 2505486d50a..4cf27471c1d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -109,42 +109,6 @@ IL_001f: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.0 - IL_0008: ldfld int32 assembly/T::i - IL_000d: ldloc.0 - IL_000e: ldc.i4.6 - IL_000f: shl - IL_0010: ldloc.0 - IL_0011: ldc.i4.2 - IL_0012: shr - IL_0013: add - IL_0014: add - IL_0015: add - IL_0016: stloc.0 - IL_0017: ldloc.0 - IL_0018: 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: call instance int32 assembly/T::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/T obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -182,16 +146,6 @@ IL_0020: ret } - .method public hidebysig instance void Set(int32 i) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 assembly/T::i - IL_0007: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/T obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -232,18 +186,56 @@ IL_0022: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int32 assembly/T::i + IL_000d: ldloc.0 + IL_000e: ldc.i4.6 + IL_000f: shl + IL_0010: ldloc.0 + IL_0011: ldc.i4.2 + IL_0012: shr + IL_0013: add + IL_0014: add + IL_0015: add + IL_0016: stloc.0 + IL_0017: ldloc.0 + IL_0018: 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: call instance int32 assembly/T::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance void Set(int32 i) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int32 assembly/T::i + IL_0007: ret + } + } .field static assembly valuetype assembly/T[] a@11 .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 valuetype assembly/T[] get_a() cil managed - { - - .maxstack 8 - IL_0000: ldsfld valuetype assembly/T[] assembly::a@11 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -255,6 +247,14 @@ IL_000c: ret } + .method public specialname static valuetype assembly/T[] get_a() cil managed + { + + .maxstack 8 + IL_0000: ldsfld valuetype assembly/T[] assembly::a@11 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { 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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/AnonRecords.fs.il.net472.bsl index 23409788a03..eb37ee9a318 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/AnonRecords.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/AnonRecords.fs.il.net472.bsl @@ -26,28 +26,29 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 maybeListOfMaybeString@5 - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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 int32 get_justInt() cil managed + .method private specialname rtspecialname static void .cctor() 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: ldc.i4.s 42 - IL_0002: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$MyTestModule::init@ + IL_0006: ldsfld int32 ''.$MyTestModule::init@ + IL_000b: pop + IL_000c: ret } - .method public specialname static string get_maybeString() cil managed + .method public specialname static int32 get_justInt() 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: ldnull - IL_0001: ret + IL_0000: ldc.i4.s 42 + IL_0002: ret } .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_maybeListOfMaybeString() cil managed @@ -58,10 +59,20 @@ IL_0005: ret } + .method public specialname static string get_maybeString() 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: ldnull + IL_0001: ret + } + .method public static class '<>f__AnonymousType2430756162`3',int32> giveMeA() cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 04 00 00 00 01 02 02 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 04 00 00 00 01 02 02 02 00 00 ) .maxstack 8 IL_0000: call string MyTestModule::get_maybeString() @@ -89,7 +100,7 @@ .method public static class '<>f__AnonymousType2430756162`3' giveMeC() cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 04 00 00 00 01 02 02 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 04 00 00 00 01 02 02 02 00 00 ) .maxstack 8 IL_0000: call string MyTestModule::get_maybeString() @@ -125,17 +136,6 @@ IL_0039: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$MyTestModule::init@ - IL_0006: ldsfld int32 ''.$MyTestModule::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { @@ -154,13 +154,13 @@ } .property string maybeString() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .get string MyTestModule::get_maybeString() } .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 maybeListOfMaybeString() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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 ) .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 MyTestModule::get_maybeListOfMaybeString() } @@ -169,7 +169,7 @@ .class private abstract auto ansi sealed ''.$MyTestModule extends [runtime]System.Object { - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field static assembly int32 init@ .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 ) @@ -194,7 +194,7 @@ { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field private !'j__TPar' A@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) @@ -209,10 +209,10 @@ !'j__TPar' B, !'j__TPar' C) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E - 79 6D 6F 75 73 54 79 70 65 32 34 33 30 37 35 36 - 31 36 32 60 33 00 00 ) + .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 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 32 34 33 30 37 35 36 + 31 36 32 60 33 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -229,52 +229,6 @@ IL_001b: ret } - .method public hidebysig specialname instance !'j__TPar' get_A() 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 !0 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ - IL_0006: ret - } - - .method public hidebysig specialname instance !'j__TPar' get_B() 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 !1 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ - IL_0006: ret - } - - .method public hidebysig specialname instance !'j__TPar' get_C() 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 !2 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ - IL_0006: 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`5f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>,string>::Invoke(!0) - IL_0015: ret - } - .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'> obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -362,7 +316,7 @@ { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -373,13 +327,11 @@ IL_000e: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 5 .locals init (class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'> V_0, @@ -469,87 +421,7 @@ IL_0074: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0058 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: ldarg.0 - IL_000c: ldfld !2 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ - IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldarg.1 - IL_0026: ldarg.0 - IL_0027: ldfld !1 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ - IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0031: ldloc.0 - IL_0032: ldc.i4.6 - IL_0033: shl - IL_0034: ldloc.0 - IL_0035: ldc.i4.2 - IL_0036: shr - IL_0037: add - IL_0038: add - IL_0039: add - IL_003a: stloc.0 - IL_003b: ldc.i4 0x9e3779b9 - IL_0040: ldarg.1 - IL_0041: ldarg.0 - IL_0042: ldfld !0 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ - IL_0047: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_004c: ldloc.0 - IL_004d: ldc.i4.6 - IL_004e: shl - IL_004f: ldloc.0 - IL_0050: ldc.i4.2 - IL_0051: shr - IL_0052: add - IL_0053: add - IL_0054: add - IL_0055: stloc.0 - IL_0056: ldloc.0 - IL_0057: ret - - IL_0058: ldc.i4.0 - IL_0059: 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: tail. - IL_0008: callvirt instance int32 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000d: ret - } - - .method public hidebysig instance bool - Equals(class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'> obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -611,13 +483,11 @@ IL_0052: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 5 .locals init (class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'> V_0) @@ -696,7 +566,7 @@ { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 4 .locals init (class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'> V_0) @@ -716,185 +586,151 @@ IL_0015: ret } - .property instance !'j__TPar' A() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) - .get instance !'j__TPar' '<>f__AnonymousType2430756162`3'::get_A() - } - .property instance !'j__TPar' B() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) - .get instance !'j__TPar' '<>f__AnonymousType2430756162`3'::get_B() - } - .property instance !'j__TPar' C() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) - .get instance !'j__TPar' '<>f__AnonymousType2430756162`3'::get_C() - } -} - -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname - instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, - class [runtime]System.Type Type) cil managed + .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 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 8 + .maxstack 7 + .locals init (int32 V_0) IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret + IL_0001: brfalse.s IL_0058 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !2 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !1 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldc.i4 0x9e3779b9 + IL_0040: ldarg.1 + IL_0041: ldarg.0 + IL_0042: ldfld !0 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0047: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_004c: ldloc.0 + IL_004d: ldc.i4.6 + IL_004e: shl + IL_004f: ldloc.0 + IL_0050: ldc.i4.2 + IL_0051: shr + IL_0052: add + IL_0053: add + IL_0054: add + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: ret + + IL_0058: ldc.i4.0 + IL_0059: ret } - .method public hidebysig specialname instance class [runtime]System.Type get_Type() cil managed + .method public hidebysig virtual final instance int32 GetHashCode() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret } - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() cil managed + .method public strict virtual instance string ToString() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret } -} -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) cil managed + .method public hidebysig specialname instance !'j__TPar' get_A() 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret + IL_0001: ldfld !0 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0006: ret } - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) cil managed + .method public hidebysig specialname instance !'j__TPar' get_B() 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret + IL_0001: ldfld !1 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0006: ret } -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) cil managed + .method public hidebysig specialname instance !'j__TPar' get_C() 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret + IL_0001: ldfld !2 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0006: ret } + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType2430756162`3'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType2430756162`3'::get_B() + } + .property instance !'j__TPar' C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType2430756162`3'::get_C() + } } - 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..eb37ee9a318 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 @@ -30,24 +30,25 @@ .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 maybeListOfMaybeString@5 .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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 int32 get_justInt() cil managed + .method private specialname rtspecialname static void .cctor() 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: ldc.i4.s 42 - IL_0002: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$MyTestModule::init@ + IL_0006: ldsfld int32 ''.$MyTestModule::init@ + IL_000b: pop + IL_000c: ret } - .method public specialname static string get_maybeString() cil managed + .method public specialname static int32 get_justInt() 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: ldnull - IL_0001: ret + IL_0000: ldc.i4.s 42 + IL_0002: ret } .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_maybeListOfMaybeString() cil managed @@ -58,6 +59,16 @@ IL_0005: ret } + .method public specialname static string get_maybeString() 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: ldnull + IL_0001: ret + } + .method public static class '<>f__AnonymousType2430756162`3',int32> giveMeA() cil managed { .param [0] @@ -125,17 +136,6 @@ IL_0039: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$MyTestModule::init@ - IL_0006: ldsfld int32 ''.$MyTestModule::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { @@ -229,52 +229,6 @@ IL_001b: ret } - .method public hidebysig specialname instance !'j__TPar' get_A() 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 !0 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ - IL_0006: ret - } - - .method public hidebysig specialname instance !'j__TPar' get_B() 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 !1 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ - IL_0006: ret - } - - .method public hidebysig specialname instance !'j__TPar' get_C() 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 !2 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ - IL_0006: 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`5f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>,string>::Invoke(!0) - IL_0015: ret - } - .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'> obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -467,84 +421,6 @@ IL_0074: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0058 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: ldarg.0 - IL_000c: ldfld !2 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ - IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldarg.1 - IL_0026: ldarg.0 - IL_0027: ldfld !1 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ - IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0031: ldloc.0 - IL_0032: ldc.i4.6 - IL_0033: shl - IL_0034: ldloc.0 - IL_0035: ldc.i4.2 - IL_0036: shr - IL_0037: add - IL_0038: add - IL_0039: add - IL_003a: stloc.0 - IL_003b: ldc.i4 0x9e3779b9 - IL_0040: ldarg.1 - IL_0041: ldarg.0 - IL_0042: ldfld !0 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ - IL_0047: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_004c: ldloc.0 - IL_004d: ldc.i4.6 - IL_004e: shl - IL_004f: ldloc.0 - IL_0050: ldc.i4.2 - IL_0051: shr - IL_0052: add - IL_0053: add - IL_0054: add - IL_0055: stloc.0 - IL_0056: ldloc.0 - IL_0057: ret - - IL_0058: ldc.i4.0 - IL_0059: 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: tail. - IL_0008: callvirt instance int32 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000d: ret - } - .method public hidebysig instance bool Equals(class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -710,6 +586,130 @@ IL_0015: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0058 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !2 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !1 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldc.i4 0x9e3779b9 + IL_0040: ldarg.1 + IL_0041: ldarg.0 + IL_0042: ldfld !0 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0047: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_004c: ldloc.0 + IL_004d: ldc.i4.6 + IL_004e: shl + IL_004f: ldloc.0 + IL_0050: ldc.i4.2 + IL_0051: shr + IL_0052: add + IL_0053: add + IL_0054: add + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: ret + + IL_0058: ldc.i4.0 + IL_0059: 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: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: 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`5f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() 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 !0 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() 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 !1 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_C() 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 !2 class '<>f__AnonymousType2430756162`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0006: ret + } + .property instance !'j__TPar' A() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -734,4 +734,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CurriedFunctions.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CurriedFunctions.fs.il.net472.bsl index a3f867ad5a4..314fda43681 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CurriedFunctions.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CurriedFunctions.fs.il.net472.bsl @@ -26,11 +26,11 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .class auto ansi serializable sealed nested assembly beforefieldinit partiallyApplied@8 extends class [FSharp.Core]Microsoft.FSharp.Core.OptimizedClosures/FSharpFunc`3> { - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field public string propperString .method assembly specialname rtspecialname instance void .ctor(string propperString) cil managed { @@ -46,9 +46,7 @@ IL_000d: ret } - .method public strict virtual instance class [runtime]System.Tuple`3 - Invoke(string b, - int32 c) cil managed + .method public strict virtual instance class [runtime]System.Tuple`3 Invoke(string b, int32 c) cil managed { .maxstack 8 @@ -57,8 +55,8 @@ IL_0006: ldarg.1 IL_0007: ldarg.2 IL_0008: newobj instance void class [runtime]System.Tuple`3::.ctor(!0, - !1, - !2) + !1, + !2) IL_000d: ret } @@ -72,24 +70,24 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 02 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 02 01 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: ldarg.2 IL_0003: newobj instance void class [runtime]System.Tuple`3::.ctor(!0, - !1, - !2) + !1, + !2) IL_0008: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> partiallyApplied(string propperString) cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 06 00 00 00 01 01 01 01 02 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 06 00 00 00 01 01 01 01 02 01 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -106,19 +104,19 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 03 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param type b - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param type c - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param type d - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param type e - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [2] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.1 @@ -132,72 +130,6 @@ { } -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret - } - - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret - } - -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - -} - - 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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CustomType.fs.il.net472.bsl index 348df58ec77..775220d44b1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CustomType.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CustomType.fs.il.net472.bsl @@ -26,29 +26,38 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .class auto ansi serializable nested public Myassembly extends [runtime]System.Object { .custom instance void [runtime]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field static assembly string uglyGlobalMutableString .field static assembly string uglyGlobalMutableNullableString - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpMap`2 dict - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 02 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 02 02 00 00 ) .field assembly string Nullable@ - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .field assembly string NonNullable@ .field assembly int32 JustSomeInt@ .field static assembly int32 init@6 - .method public specialname rtspecialname - instance void .ctor(string x, - string y) cil managed + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$MyTestModule::init@ + IL_0006: ldsfld int32 ''.$MyTestModule::init@ + IL_000b: pop + IL_000c: ret + } + + .method public specialname rtspecialname instance void .ctor(string x, string y) cil managed { .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -67,45 +76,28 @@ IL_001e: ret } - .method public hidebysig specialname instance string get_Nullable() 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 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld string MyTestModule/Myassembly::Nullable@ - IL_0006: ret - } - - .method public hidebysig specialname instance string get_NonNullable() cil managed + .method public hidebysig instance class MyTestModule/Myassembly GetThis() 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 string MyTestModule/Myassembly::NonNullable@ - IL_0006: ret + IL_0001: ret } - .method public hidebysig specialname instance int32 get_JustSomeInt() cil managed + .method public hidebysig instance class MyTestModule/Myassembly GetThisOrNull() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 MyTestModule/Myassembly::JustSomeInt@ - IL_0006: ret + IL_0000: ldnull + IL_0001: ret } .method public static string GiveMeNull() cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldnull @@ -127,30 +119,12 @@ IL_0000: ret } - .method public hidebysig instance class MyTestModule/Myassembly GetThis() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public hidebysig instance class MyTestModule/Myassembly GetThisOrNull() cil managed - { - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldnull - IL_0001: ret - } - .method public hidebysig specialname instance string get_Item(string index) cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: volatile. @@ -168,14 +142,47 @@ IL_001e: ret } - .method public hidebysig specialname - instance void set_Item(string index, - string 'value') cil managed + .method public hidebysig specialname instance int32 get_JustSomeInt() 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 MyTestModule/Myassembly::JustSomeInt@ + IL_0006: ret + } + + .method public hidebysig specialname instance string get_NonNullable() 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 string MyTestModule/Myassembly::NonNullable@ + IL_0006: ret + } + + .method public hidebysig specialname instance string get_Nullable() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string MyTestModule/Myassembly::Nullable@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_Item(string index, string 'value') cil managed { .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [2] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: volatile. @@ -203,17 +210,6 @@ IL_0033: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$MyTestModule::init@ - IL_0006: ldsfld int32 ''.$MyTestModule::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { @@ -238,7 +234,7 @@ .property instance string Nullable() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .get instance string MyTestModule/Myassembly::get_Nullable() } .property instance string NonNullable() @@ -251,7 +247,7 @@ } .property instance string Item(string) { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .set instance void MyTestModule/Myassembly::set_Item(string, string) .get instance string MyTestModule/Myassembly::get_Item(string) @@ -282,7 +278,7 @@ .class private abstract auto ansi sealed ''.$MyTestModule extends [runtime]System.Object { - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field static assembly int32 init@ .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 ) @@ -297,72 +293,6 @@ } -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret - } - - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret - } - -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - -} - - 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..775220d44b1 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 @@ -43,6 +43,17 @@ .field assembly string NonNullable@ .field assembly int32 JustSomeInt@ .field static assembly int32 init@6 + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$MyTestModule::init@ + IL_0006: ldsfld int32 ''.$MyTestModule::init@ + IL_000b: pop + IL_000c: ret + } + .method public specialname rtspecialname instance void .ctor(string x, string y) cil managed { .param [1] @@ -65,39 +76,22 @@ IL_001e: ret } - .method public hidebysig specialname instance string get_Nullable() 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 ) - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld string MyTestModule/Myassembly::Nullable@ - IL_0006: ret - } - - .method public hidebysig specialname instance string get_NonNullable() cil managed + .method public hidebysig instance class MyTestModule/Myassembly GetThis() 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 string MyTestModule/Myassembly::NonNullable@ - IL_0006: ret + IL_0001: ret } - .method public hidebysig specialname instance int32 get_JustSomeInt() cil managed + .method public hidebysig instance class MyTestModule/Myassembly GetThisOrNull() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 MyTestModule/Myassembly::JustSomeInt@ - IL_0006: ret + IL_0000: ldnull + IL_0001: ret } .method public static string GiveMeNull() cil managed @@ -125,24 +119,6 @@ IL_0000: ret } - .method public hidebysig instance class MyTestModule/Myassembly GetThis() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public hidebysig instance class MyTestModule/Myassembly GetThisOrNull() cil managed - { - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldnull - IL_0001: ret - } - .method public hidebysig specialname instance string get_Item(string index) cil managed { .param [0] @@ -166,6 +142,41 @@ IL_001e: ret } + .method public hidebysig specialname instance int32 get_JustSomeInt() 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 MyTestModule/Myassembly::JustSomeInt@ + IL_0006: ret + } + + .method public hidebysig specialname instance string get_NonNullable() 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 string MyTestModule/Myassembly::NonNullable@ + IL_0006: ret + } + + .method public hidebysig specialname instance string get_Nullable() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string MyTestModule/Myassembly::Nullable@ + IL_0006: ret + } + .method public hidebysig specialname instance void set_Item(string index, string 'value') cil managed { .param [1] @@ -199,17 +210,6 @@ IL_0033: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$MyTestModule::init@ - IL_0006: ldsfld int32 ''.$MyTestModule::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { @@ -297,4 +297,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericCode.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericCode.fs.il.net472.bsl index 0e958b024af..9f6fa75f976 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericCode.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericCode.fs.il.net472.bsl @@ -26,20 +26,13 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public static void strictlyNotNull(object x) cil managed - { - - .maxstack 8 - IL_0000: ret - } - + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .method public static void myGenericFunction1(!!a p) cil managed { .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 3 .locals init (!!a V_0, @@ -65,9 +58,9 @@ .method public static void myGenericFunction2(!!a p) cil managed { .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 3 .locals init (!!a V_0, @@ -112,9 +105,9 @@ .method public static void myGenericFunction3(!!a p) cil managed { .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 3 .locals init (!!a V_0, @@ -143,80 +136,21 @@ IL_001e: ret } -} - -.class private abstract auto ansi sealed ''.$MyLibrary - extends [runtime]System.Object -{ -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret - } - - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) cil managed + .method public static void strictlyNotNull(object 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret + IL_0000: ret } } -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute +.class private abstract auto ansi sealed ''.$MyLibrary + extends [runtime]System.Object { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - } - 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..9f6fa75f976 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 @@ -27,13 +27,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 ) .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public static void strictlyNotNull(object x) cil managed - { - - .maxstack 8 - IL_0000: ret - } - .method public static void myGenericFunction1(!!a p) cil managed { .param type a @@ -143,6 +136,13 @@ IL_001e: ret } + .method public static void strictlyNotNull(object x) cil managed + { + + .maxstack 8 + IL_0000: ret + } + } .class private abstract auto ansi sealed ''.$MyLibrary @@ -154,4 +154,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericStructDu.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericStructDu.fs.il.net472.bsl index bbf453a534c..1117d110f5a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericStructDu.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericStructDu.fs.il.net472.bsl @@ -26,7 +26,7 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .class sequential autochar serializable sealed nested public beforefieldinit MyStructOption`1 extends [runtime]System.ValueType { @@ -34,37 +34,37 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 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 ) + 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param type T - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .class abstract auto ansi sealed nested public Tags extends [runtime]System.Object { .param type T - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field public static literal int32 MyStructNone = int32(0x00000000) .field public static literal int32 MyStructSome = int32(0x00000001) } .field assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> _nestedGenericField - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 02 01 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 02 01 02 00 00 ) .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 assembly string _notNullField2 - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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 assembly string _canBeNullField - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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 assembly !T _notNullField1 - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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 ) @@ -72,30 +72,20 @@ .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 public static valuetype TestModule/MyStructOption`1 get_MyStructNone() 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 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: ldc.i4.0 - IL_0001: newobj instance void valuetype TestModule/MyStructOption`1::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsMyStructNone() cil managed + .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 60 06 00 00 1B 54 65 73 74 4D 6F 64 75 6C + 65 2B 4D 79 53 74 72 75 63 74 4F 70 74 69 6F 6E + 60 31 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 int32 valuetype TestModule/MyStructOption`1::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret + IL_0001: ldarg.1 + IL_0002: stfld int32 valuetype TestModule/MyStructOption`1::_tag + IL_0007: ret } .method public static valuetype TestModule/MyStructOption`1 @@ -109,9 +99,9 @@ .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 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 01 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 01 02 00 00 ) .param [3] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 5 .locals init (valuetype TestModule/MyStructOption`1 V_0) @@ -136,64 +126,88 @@ IL_0031: ret } - .method public hidebysig instance bool get_IsMyStructSome() cil managed + .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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype TestModule/MyStructOption`1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj valuetype TestModule/MyStructOption`1 + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_001a: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj valuetype TestModule/MyStructOption`1 + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig instance bool get_IsMyStructNone() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::.ctor(bool, - string[]) = ( 01 00 01 04 00 00 00 0D 6E 6F 74 4E 75 6C 6C 46 - 69 65 6C 64 32 0D 6E 6F 74 4E 75 6C 6C 46 69 65 - 6C 64 31 0E 5F 6E 6F 74 4E 75 6C 6C 46 69 65 6C - 64 32 0E 5F 6E 6F 74 4E 75 6C 6C 46 69 65 6C 64 - 31 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 int32 valuetype TestModule/MyStructOption`1::get_Tag() - IL_0006: ldc.i4.1 + IL_0006: ldc.i4.0 IL_0007: ceq IL_0009: ret } - .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed + .method public hidebysig instance bool get_IsMyStructSome() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 1B 54 65 73 74 4D 6F 64 75 6C - 65 2B 4D 79 53 74 72 75 63 74 4F 70 74 69 6F 6E - 60 31 00 00 ) + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::.ctor(bool, + string[]) = ( 01 00 01 04 00 00 00 0D 6E 6F 74 4E 75 6C 6C 46 + 69 65 6C 64 32 0D 6E 6F 74 4E 75 6C 6C 46 69 65 + 6C 64 31 0E 5F 6E 6F 74 4E 75 6C 6C 46 69 65 6C + 64 32 0E 5F 6E 6F 74 4E 75 6C 6C 46 69 65 6C 64 + 31 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: ldarg.1 - IL_0002: stfld int32 valuetype TestModule/MyStructOption`1::_tag - IL_0007: ret + IL_0001: call instance int32 valuetype TestModule/MyStructOption`1::get_Tag() + IL_0006: ldc.i4.1 + IL_0007: ceq + IL_0009: ret } - .method public hidebysig instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> get_nestedGenericField() cil managed + .method public static valuetype TestModule/MyStructOption`1 get_MyStructNone() 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 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 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 02 01 02 00 00 ) .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> valuetype TestModule/MyStructOption`1::_nestedGenericField + IL_0000: ldc.i4.0 + IL_0001: newobj instance void valuetype TestModule/MyStructOption`1::.ctor(int32) IL_0006: ret } - .method public hidebysig instance string get_notNullField2() cil managed + .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 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld string valuetype TestModule/MyStructOption`1::_notNullField2 + IL_0001: ldfld int32 valuetype TestModule/MyStructOption`1::_tag IL_0006: ret } @@ -202,7 +216,7 @@ .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 ) .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -210,57 +224,43 @@ IL_0006: ret } - .method public hidebysig instance !T get_notNullField1() cil managed + .method public hidebysig instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> get_nestedGenericField() 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 ) .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 02 01 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld !0 valuetype TestModule/MyStructOption`1::_notNullField1 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> valuetype TestModule/MyStructOption`1::_nestedGenericField IL_0006: ret } - .method public hidebysig instance int32 get_Tag() cil managed + .method public hidebysig instance !T get_notNullField1() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 valuetype TestModule/MyStructOption`1::_tag + IL_0001: ldfld !0 valuetype TestModule/MyStructOption`1::_notNullField1 IL_0006: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .method public hidebysig instance string get_notNullField2() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 - IL_0000: ldstr "%+0.8A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj valuetype TestModule/MyStructOption`1 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_001a: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype TestModule/MyStructOption`1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj valuetype TestModule/MyStructOption`1 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_001a: ret + IL_0000: ldarg.0 + IL_0001: ldfld string valuetype TestModule/MyStructOption`1::_notNullField2 + IL_0006: ret } .property instance int32 Tag() @@ -287,12 +287,12 @@ } .property instance bool IsMyStructSome() { - .custom instance void System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::.ctor(bool, - string[]) = ( 01 00 01 04 00 00 00 0D 6E 6F 74 4E 75 6C 6C 46 - 69 65 6C 64 32 0D 6E 6F 74 4E 75 6C 6C 46 69 65 - 6C 64 31 0E 5F 6E 6F 74 4E 75 6C 6C 46 69 65 6C - 64 32 0E 5F 6E 6F 74 4E 75 6C 6C 46 69 65 6C 64 - 31 00 00 ) + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::.ctor(bool, + string[]) = ( 01 00 01 04 00 00 00 0D 6E 6F 74 4E 75 6C 6C 46 + 69 65 6C 64 32 0D 6E 6F 74 4E 75 6C 6C 46 69 65 + 6C 64 31 0E 5F 6E 6F 74 4E 75 6C 6C 46 69 65 6C + 64 32 0E 5F 6E 6F 74 4E 75 6C 6C 46 69 65 6C 64 + 31 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.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -304,14 +304,14 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32, int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 02 01 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 02 01 02 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 ) .get instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> TestModule/MyStructOption`1::get_nestedGenericField() } .property instance string notNullField2() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32, int32) = ( 01 00 04 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -324,14 +324,14 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32, int32) = ( 01 00 04 00 00 00 01 00 00 00 02 00 00 00 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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 ) .get instance string TestModule/MyStructOption`1::get_canBeNullField() } .property instance !T notNullField1() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32, int32) = ( 01 00 04 00 00 00 01 00 00 00 03 00 00 00 00 00 ) @@ -345,13 +345,13 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param type b - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 00 01 00 00 ) .param [2] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 00 01 00 00 ) .maxstack 7 .locals init (valuetype TestModule/MyStructOption`1 V_0, @@ -403,225 +403,6 @@ { } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private bool ReturnValue@ - .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 private string[] Members@ - .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 public specialname rtspecialname instance void .ctor(bool ReturnValue, string[] Members) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld bool System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::ReturnValue@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld string[] System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::Members@ - IL_0014: ret - } - - .method public hidebysig specialname instance string[] get_Members() 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 string[] System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::Members@ - IL_0006: ret - } - - .method public hidebysig specialname instance bool get_ReturnValue() 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 bool System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::ReturnValue@ - IL_0006: ret - } - - .property instance bool ReturnValue() - { - .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 ) - .get instance bool System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::get_ReturnValue() - } - .property instance string[] Members() - { - .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 ) - .get instance string[] System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::get_Members() - } -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret - } - - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret - } - -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - -} - - 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..1117d110f5a 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 @@ -72,30 +72,20 @@ .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 public static valuetype TestModule/MyStructOption`1 get_MyStructNone() 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 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: ldc.i4.0 - IL_0001: newobj instance void valuetype TestModule/MyStructOption`1::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsMyStructNone() cil managed + .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 60 06 00 00 1B 54 65 73 74 4D 6F 64 75 6C + 65 2B 4D 79 53 74 72 75 63 74 4F 70 74 69 6F 6E + 60 31 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 int32 valuetype TestModule/MyStructOption`1::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret + IL_0001: ldarg.1 + IL_0002: stfld int32 valuetype TestModule/MyStructOption`1::_tag + IL_0007: ret } .method public static valuetype TestModule/MyStructOption`1 @@ -136,6 +126,48 @@ IL_0031: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype TestModule/MyStructOption`1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj valuetype TestModule/MyStructOption`1 + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_001a: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj valuetype TestModule/MyStructOption`1 + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_001a: ret + } + + .method public hidebysig instance bool get_IsMyStructNone() 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 valuetype TestModule/MyStructOption`1::get_Tag() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret + } + .method public hidebysig instance bool get_IsMyStructSome() cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::.ctor(bool, @@ -155,36 +187,31 @@ IL_0009: ret } - .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed + .method public static valuetype TestModule/MyStructOption`1 get_MyStructNone() 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 1B 54 65 73 74 4D 6F 64 75 6C - 65 2B 4D 79 53 74 72 75 63 74 4F 70 74 69 6F 6E - 60 31 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld int32 valuetype TestModule/MyStructOption`1::_tag - IL_0007: ret + IL_0000: ldc.i4.0 + IL_0001: newobj instance void valuetype TestModule/MyStructOption`1::.ctor(int32) + IL_0006: ret } - .method public hidebysig instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> get_nestedGenericField() cil managed + .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 ) - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 02 01 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> valuetype TestModule/MyStructOption`1::_nestedGenericField + IL_0001: ldfld int32 valuetype TestModule/MyStructOption`1::_tag IL_0006: ret } - .method public hidebysig instance string get_notNullField2() cil managed + .method public hidebysig instance string get_canBeNullField() 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 ) @@ -193,20 +220,20 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld string valuetype TestModule/MyStructOption`1::_notNullField2 + IL_0001: ldfld string valuetype TestModule/MyStructOption`1::_canBeNullField IL_0006: ret } - .method public hidebysig instance string get_canBeNullField() cil managed + .method public hidebysig instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> get_nestedGenericField() 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 ) .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 02 01 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld string valuetype TestModule/MyStructOption`1::_canBeNullField + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> valuetype TestModule/MyStructOption`1::_nestedGenericField IL_0006: ret } @@ -223,46 +250,19 @@ IL_0006: ret } - .method public hidebysig instance int32 get_Tag() cil managed + .method public hidebysig instance string get_notNullField2() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 valuetype TestModule/MyStructOption`1::_tag + IL_0001: ldfld string valuetype TestModule/MyStructOption`1::_notNullField2 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj valuetype TestModule/MyStructOption`1 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_001a: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype TestModule/MyStructOption`1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj valuetype TestModule/MyStructOption`1 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_001a: ret - } - .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -407,4 +407,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelBindings.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelBindings.fs.il.net472.bsl index 60a24e1d2c9..50aef0c8e48 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelBindings.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelBindings.fs.il.net472.bsl @@ -26,14 +26,25 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field public static literal string nullableLiteral = "" - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.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 ) .field static assembly string nullableMutableStringField@6 - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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 ''.$MyTestModule::init@ + IL_0006: ldsfld int32 ''.$MyTestModule::init@ + IL_000b: pop + IL_000c: ret + } + .method public specialname static string get_notNullStringField() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -44,13 +55,14 @@ IL_0005: ret } - .method public specialname static string get_nullableStringField() cil managed + .method public specialname static valuetype [runtime]System.Nullable`1 get_nullableInt() 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: ldnull + .maxstack 3 + .locals init (valuetype [runtime]System.Nullable`1 V_0) + IL_0000: ldloc.0 IL_0001: ret } @@ -62,23 +74,13 @@ IL_0005: ret } - .method public specialname static void set_nullableMutableStringField(string 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld string MyTestModule::nullableMutableStringField@6 - IL_0006: ret - } - - .method public specialname static valuetype [runtime]System.Nullable`1 get_nullableInt() cil managed + .method public specialname static string get_nullableStringField() 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 3 - .locals init (valuetype [runtime]System.Nullable`1 V_0) - IL_0000: ldloc.0 + .maxstack 8 + IL_0000: ldnull IL_0001: ret } @@ -92,15 +94,13 @@ IL_0002: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static void set_nullableMutableStringField(string 'value') cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$MyTestModule::init@ - IL_0006: ldsfld int32 ''.$MyTestModule::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldarg.0 + IL_0001: stsfld string MyTestModule::nullableMutableStringField@6 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -118,12 +118,12 @@ } .property string nullableStringField() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .get string MyTestModule::get_nullableStringField() } .property string nullableMutableStringField() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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 ) .set void MyTestModule::set_nullableMutableStringField(string) .get string MyTestModule::get_nullableMutableStringField() @@ -142,7 +142,7 @@ .class private abstract auto ansi sealed ''.$MyTestModule extends [runtime]System.Object { - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field static assembly int32 init@ .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 ) @@ -157,72 +157,6 @@ } -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret - } - - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret - } - -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - -} - - 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..50aef0c8e48 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 @@ -34,6 +34,17 @@ .field static assembly string nullableMutableStringField@6 .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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 ''.$MyTestModule::init@ + IL_0006: ldsfld int32 ''.$MyTestModule::init@ + IL_000b: pop + IL_000c: ret + } + .method public specialname static string get_notNullStringField() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -44,13 +55,14 @@ IL_0005: ret } - .method public specialname static string get_nullableStringField() cil managed + .method public specialname static valuetype [runtime]System.Nullable`1 get_nullableInt() 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: ldnull + .maxstack 3 + .locals init (valuetype [runtime]System.Nullable`1 V_0) + IL_0000: ldloc.0 IL_0001: ret } @@ -62,23 +74,13 @@ IL_0005: ret } - .method public specialname static void set_nullableMutableStringField(string 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld string MyTestModule::nullableMutableStringField@6 - IL_0006: ret - } - - .method public specialname static valuetype [runtime]System.Nullable`1 get_nullableInt() cil managed + .method public specialname static string get_nullableStringField() 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 3 - .locals init (valuetype [runtime]System.Nullable`1 V_0) - IL_0000: ldloc.0 + .maxstack 8 + IL_0000: ldnull IL_0001: ret } @@ -92,15 +94,13 @@ IL_0002: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static void set_nullableMutableStringField(string 'value') cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$MyTestModule::init@ - IL_0006: ldsfld int32 ''.$MyTestModule::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldarg.0 + IL_0001: stsfld string MyTestModule::nullableMutableStringField@6 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -161,4 +161,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctions.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctions.fs.il.net472.bsl index 0461633d8bd..2d3f91c8191 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctions.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctions.fs.il.net472.bsl @@ -26,57 +26,7 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public static string nonNullableInputOutputFunc(string x) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public static string nullableStringInputOutputFunc(string x) cil managed - { - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public static int32 nonNullableIntFunc(int32 x) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public static valuetype [runtime]System.Nullable`1 - nullableIntFunc(valuetype [runtime]System.Nullable`1 x) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public static valuetype [runtime]System.ValueTuple`6 - genericValueTypeTest(valuetype [runtime]System.ValueTuple`6 x) cil managed - { - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .method public static class [runtime]System.Tuple`6 genericRefTypeTest(string x_0, string x_1, @@ -86,9 +36,9 @@ int32 x_5) cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 01 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 01 02 00 00 ) .param [2] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 .locals init (class [runtime]System.Tuple`6 V_0) @@ -99,23 +49,22 @@ IL_0004: ldarg.s x_4 IL_0006: ldarg.s x_5 IL_0008: newobj instance void class [runtime]System.Tuple`6::.ctor(!0, - !1, - !2, - !3, - !4, - !5) + !1, + !2, + !3, + !4, + !5) IL_000d: stloc.0 IL_000e: ldloc.0 IL_000f: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - nestedGenericsTest(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> x) cil managed + .method public static valuetype [runtime]System.ValueTuple`6 genericValueTypeTest(valuetype [runtime]System.ValueTuple`6 x) cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -127,88 +76,67 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .param [2] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldc.i4.s 42 IL_0002: ret } -} - -.class private abstract auto ansi sealed ''.$MyTestModule - extends [runtime]System.Object -{ -} + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> nestedGenericsTest(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> x) cil managed + { + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname - instance void .ctor(uint8 scalarByteValue) cil managed + .method public static string nonNullableInputOutputFunc(string 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret + IL_0001: ret } - .method public specialname rtspecialname - instance void .ctor(uint8[] NullableFlags) cil managed + .method public static int32 nonNullableIntFunc(int32 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret + IL_0001: ret } -} + .method public static valuetype [runtime]System.Nullable`1 nullableIntFunc(valuetype [runtime]System.Nullable`1 x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname - instance void .ctor(uint8 Flag) cil managed + .method public static string nullableStringInputOutputFunc(string 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret + IL_0001: ret } } +.class private abstract auto ansi sealed ''.$MyTestModule + extends [runtime]System.Object +{ +} 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..2d3f91c8191 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 @@ -27,54 +27,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 ) .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public static string nonNullableInputOutputFunc(string x) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public static string nullableStringInputOutputFunc(string x) cil managed - { - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .param [1] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public static int32 nonNullableIntFunc(int32 x) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public static valuetype [runtime]System.Nullable`1 nullableIntFunc(valuetype [runtime]System.Nullable`1 x) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public static valuetype [runtime]System.ValueTuple`6 genericValueTypeTest(valuetype [runtime]System.ValueTuple`6 x) cil managed - { - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) - .param [1] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - .method public static class [runtime]System.Tuple`6 genericRefTypeTest(string x_0, string x_1, @@ -107,12 +59,12 @@ IL_000f: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> nestedGenericsTest(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> x) cil managed + .method public static valuetype [runtime]System.ValueTuple`6 genericValueTypeTest(valuetype [runtime]System.ValueTuple`6 x) cil managed { .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) .param [1] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -131,6 +83,54 @@ IL_0002: ret } + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> nestedGenericsTest(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> x) cil managed + { + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } + + .method public static string nonNullableInputOutputFunc(string x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } + + .method public static int32 nonNullableIntFunc(int32 x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } + + .method public static valuetype [runtime]System.Nullable`1 nullableIntFunc(valuetype [runtime]System.Nullable`1 x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } + + .method public static string nullableStringInputOutputFunc(string x) cil managed + { + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } + } .class private abstract auto ansi sealed ''.$MyTestModule @@ -142,4 +142,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctionsOpt.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctionsOpt.fs.il.net472.bsl index f4d927102b4..f7af9ef5cad 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctionsOpt.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctionsOpt.fs.il.net472.bsl @@ -26,57 +26,7 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public static string nonNullableInputOutputFunc(string x) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public static string nullableStringInputOutputFunc(string x) cil managed - { - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public static int32 nonNullableIntFunc(int32 x) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public static valuetype [runtime]System.Nullable`1 - nullableIntFunc(valuetype [runtime]System.Nullable`1 x) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - - .method public static valuetype [runtime]System.ValueTuple`6 - genericValueTypeTest(valuetype [runtime]System.ValueTuple`6 x) cil managed - { - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } - + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .method public static class [runtime]System.Tuple`6 genericRefTypeTest(string x_0, string x_1, @@ -86,9 +36,9 @@ int32 x_5) cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 01 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 01 02 00 00 ) .param [2] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -98,21 +48,20 @@ IL_0004: ldarg.s x_4 IL_0006: ldarg.s x_5 IL_0008: newobj instance void class [runtime]System.Tuple`6::.ctor(!0, - !1, - !2, - !3, - !4, - !5) + !1, + !2, + !3, + !4, + !5) IL_000d: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> - nestedGenericsTest(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> x) cil managed + .method public static valuetype [runtime]System.ValueTuple`6 genericValueTypeTest(valuetype [runtime]System.ValueTuple`6 x) cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -124,88 +73,67 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .param [2] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldc.i4.s 42 IL_0002: ret } -} - -.class private abstract auto ansi sealed ''.$MyTestModule - extends [runtime]System.Object -{ -} + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> nestedGenericsTest(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> x) cil managed + { + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname - instance void .ctor(uint8 scalarByteValue) cil managed + .method public static string nonNullableInputOutputFunc(string 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret + IL_0001: ret } - .method public specialname rtspecialname - instance void .ctor(uint8[] NullableFlags) cil managed + .method public static int32 nonNullableIntFunc(int32 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret + IL_0001: ret } -} + .method public static valuetype [runtime]System.Nullable`1 nullableIntFunc(valuetype [runtime]System.Nullable`1 x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ret + } -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname - instance void .ctor(uint8 Flag) cil managed + .method public static string nullableStringInputOutputFunc(string 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret + IL_0001: ret } } +.class private abstract auto ansi sealed ''.$MyTestModule + extends [runtime]System.Object +{ +} 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..f7af9ef5cad 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 @@ -27,105 +27,105 @@ { .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 ) .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public static string nonNullableInputOutputFunc(string x) cil managed + .method public static class [runtime]System.Tuple`6 + genericRefTypeTest(string x_0, + string x_1, + int32 x_2, + int32 x_3, + int32 x_4, + int32 x_5) cil managed { + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 01 02 00 00 ) + .param [2] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ret + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: ldarg.3 + IL_0004: ldarg.s x_4 + IL_0006: ldarg.s x_5 + IL_0008: newobj instance void class [runtime]System.Tuple`6::.ctor(!0, + !1, + !2, + !3, + !4, + !5) + IL_000d: ret } - .method public static string nullableStringInputOutputFunc(string x) cil managed + .method public static valuetype [runtime]System.ValueTuple`6 genericValueTypeTest(valuetype [runtime]System.ValueTuple`6 x) cil managed { .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) .param [1] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: ret } - .method public static int32 nonNullableIntFunc(int32 x) cil managed + .method public static int32 multiArgumentTest(string x, + string y) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + .param [2] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret + IL_0000: ldc.i4.s 42 + IL_0002: ret } - .method public static valuetype [runtime]System.Nullable`1 nullableIntFunc(valuetype [runtime]System.Nullable`1 x) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> nestedGenericsTest(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> x) cil managed { + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: ret } - .method public static valuetype [runtime]System.ValueTuple`6 genericValueTypeTest(valuetype [runtime]System.ValueTuple`6 x) cil managed + .method public static string nonNullableInputOutputFunc(string x) cil managed { - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) - .param [1] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 00 01 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: ret } - .method public static class [runtime]System.Tuple`6 - genericRefTypeTest(string x_0, - string x_1, - int32 x_2, - int32 x_3, - int32 x_4, - int32 x_5) cil managed + .method public static int32 nonNullableIntFunc(int32 x) cil managed { - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 01 02 00 00 ) - .param [2] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: ldarg.3 - IL_0004: ldarg.s x_4 - IL_0006: ldarg.s x_5 - IL_0008: newobj instance void class [runtime]System.Tuple`6::.ctor(!0, - !1, - !2, - !3, - !4, - !5) - IL_000d: ret + IL_0001: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> nestedGenericsTest(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> x) cil managed + .method public static valuetype [runtime]System.Nullable`1 nullableIntFunc(valuetype [runtime]System.Nullable`1 x) cil managed { - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .param [1] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: ret } - .method public static int32 multiArgumentTest(string x, - string y) cil managed + .method public static string nullableStringInputOutputFunc(string x) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - .param [2] + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 - IL_0000: ldc.i4.s 42 - IL_0002: ret + IL_0000: ldarg.0 + IL_0001: ret } } @@ -139,4 +139,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullAsTrueValue.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullAsTrueValue.fs.il.net472.bsl index c81f65da2a6..91f7455391b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullAsTrueValue.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullAsTrueValue.fs.il.net472.bsl @@ -26,25 +26,25 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .class auto autochar serializable sealed nested public beforefieldinit MyNullableOption`1 extends [runtime]System.Object { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationRepresentationAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilationRepresentationFlags) = ( 01 00 08 00 00 00 00 00 ) .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 [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 ) + 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param type T - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .class abstract auto ansi sealed nested public Tags extends [runtime]System.Object { .param type T - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .field public static literal int32 MyNone = int32(0x00000000) .field public static literal int32 MySome = int32(0x00000001) } @@ -55,10 +55,10 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 1D 54 65 73 74 4D 6F 64 75 6C - 65 2B 4D 79 4E 75 6C 6C 61 62 6C 65 4F 70 74 69 - 6F 6E 60 31 00 00 ) + .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 1D 54 65 73 74 4D 6F 64 75 6C + 65 2B 4D 79 4E 75 6C 6C 61 62 6C 65 4F 70 74 69 + 6F 6E 60 31 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 ) @@ -68,39 +68,12 @@ IL_0006: ret } - .method public static class TestModule/MyNullableOption`1 get_MyNone() 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 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 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 00 00 00 ) - - .maxstack 8 - IL_0000: ldnull - IL_0001: ret - } - - .method public static class TestModule/MyNullableOption`1 NewMySome(!T _value) 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 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: ldarg.0 - IL_0001: newobj instance void class TestModule/MyNullableOption`1::.ctor(!0) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(!T _value) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 1D 54 65 73 74 4D 6F 64 75 6C - 65 2B 4D 79 4E 75 6C 6C 61 62 6C 65 4F 70 74 69 - 6F 6E 60 31 00 00 ) + .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 1D 54 65 73 74 4D 6F 64 75 6C + 65 2B 4D 79 4E 75 6C 6C 61 62 6C 65 4F 70 74 69 + 6F 6E 60 31 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 ) @@ -113,17 +86,6 @@ IL_000d: ret } - .method public hidebysig instance !T get_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: ldfld !0 class TestModule/MyNullableOption`1::_value - IL_0006: ret - } - .method public static int32 GetTag(class TestModule/MyNullableOption`1 A_0) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -140,27 +102,40 @@ IL_0007: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .method public static class TestModule/MyNullableOption`1 NewMySome(!T _value) 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 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: ldstr "%+0.8A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_0000: ldarg.0 + IL_0001: newobj instance void class TestModule/MyNullableOption`1::.ctor(!0) + IL_0006: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestModule/MyNullableOption`1>::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) IL_0015: ret } - .method public strict virtual instance string ToString() cil managed + .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 "%+A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestModule/MyNullableOption`1>::.ctor(string) + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) @@ -189,10 +164,35 @@ IL_0004: ret } + .method public static class TestModule/MyNullableOption`1 get_MyNone() 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 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 00 00 00 ) + + .maxstack 8 + IL_0000: ldnull + IL_0001: ret + } + + .method public hidebysig instance !T get_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: ldfld !0 class TestModule/MyNullableOption`1::_value + IL_0006: ret + } + .property class TestModule/MyNullableOption`1 MyNone() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 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.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -226,21 +226,21 @@ .class auto autochar serializable sealed nested public beforefieldinit MyOptionWhichCannotHaveNullInTheInside`1 extends [runtime]System.Object { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationRepresentationAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilationRepresentationFlags) = ( 01 00 08 00 00 00 00 00 ) .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 [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 ) + 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param type T - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .class abstract auto ansi sealed nested public Tags extends [runtime]System.Object { .param type T - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field public static literal int32 MyNotNullNone = int32(0x00000000) .field public static literal int32 MyNotNullSome = int32(0x00000001) } @@ -251,11 +251,11 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 33 54 65 73 74 4D 6F 64 75 6C - 65 2B 4D 79 4F 70 74 69 6F 6E 57 68 69 63 68 43 - 61 6E 6E 6F 74 48 61 76 65 4E 75 6C 6C 49 6E 54 - 68 65 49 6E 73 69 64 65 60 31 00 00 ) + .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 33 54 65 73 74 4D 6F 64 75 6C + 65 2B 4D 79 4F 70 74 69 6F 6E 57 68 69 63 68 43 + 61 6E 6E 6F 74 48 61 76 65 4E 75 6C 6C 49 6E 54 + 68 65 49 6E 73 69 64 65 60 31 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 ) @@ -265,40 +265,13 @@ IL_0006: ret } - .method public static class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 get_MyNotNullNone() 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 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 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 00 00 00 ) - - .maxstack 8 - IL_0000: ldnull - IL_0001: ret - } - - .method public static class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 NewMyNotNullSome(!T _value) 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 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: ldarg.0 - IL_0001: newobj instance void class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::.ctor(!0) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(!T _value) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 33 54 65 73 74 4D 6F 64 75 6C - 65 2B 4D 79 4F 70 74 69 6F 6E 57 68 69 63 68 43 - 61 6E 6E 6F 74 48 61 76 65 4E 75 6C 6C 49 6E 54 - 68 65 49 6E 73 69 64 65 60 31 00 00 ) + .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 33 54 65 73 74 4D 6F 64 75 6C + 65 2B 4D 79 4F 70 74 69 6F 6E 57 68 69 63 68 43 + 61 6E 6E 6F 74 48 61 76 65 4E 75 6C 6C 49 6E 54 + 68 65 49 6E 73 69 64 65 60 31 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 ) @@ -311,17 +284,6 @@ IL_000d: ret } - .method public hidebysig instance !T get_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: ldfld !0 class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::_value - IL_0006: ret - } - .method public static int32 GetTag(class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 A_0) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -338,27 +300,40 @@ IL_0007: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .method public static class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 NewMyNotNullSome(!T _value) 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 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: ldstr "%+0.8A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_0000: ldarg.0 + IL_0001: newobj instance void class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::.ctor(!0) + IL_0006: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestModule/MyOptionWhichCannotHaveNullInTheInside`1>::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) IL_0015: ret } - .method public strict virtual instance string ToString() cil managed + .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 "%+A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestModule/MyOptionWhichCannotHaveNullInTheInside`1>::.ctor(string) + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) @@ -387,10 +362,35 @@ IL_0004: ret } + .method public static class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 get_MyNotNullNone() 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 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 00 00 00 ) + + .maxstack 8 + IL_0000: ldnull + IL_0001: ret + } + + .method public hidebysig instance !T get_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: ldfld !0 class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::_value + IL_0006: ret + } + .property class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 MyNotNullNone() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 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.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -424,14 +424,14 @@ .class auto autochar serializable sealed nested public beforefieldinit NonGenericassembly extends [runtime]System.Object { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationRepresentationAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilationRepresentationFlags) = ( 01 00 08 00 00 00 00 00 ) .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 [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 ) + 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .class abstract auto ansi sealed nested public Tags extends [runtime]System.Object { @@ -440,16 +440,16 @@ } .field assembly initonly string _nullableString - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 24 54 65 73 74 4D 6F 64 75 6C - 65 2B 4E 6F 6E 47 65 6E 65 72 69 63 4E 75 6C 6C - 41 73 54 72 75 65 56 61 6C 75 65 00 00 ) + .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 24 54 65 73 74 4D 6F 64 75 6C + 65 2B 4E 6F 6E 47 65 6E 65 72 69 63 4E 75 6C 6C + 41 73 54 72 75 65 56 61 6C 75 65 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 ) @@ -459,45 +459,16 @@ IL_0006: ret } - .method public static class TestModule/NonGenericassembly get_MyNone() 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 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 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldnull - IL_0001: ret - } - - .method public static class TestModule/NonGenericassembly NewMySome(string _nullableString) 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 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 ) - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void TestModule/NonGenericassembly::.ctor(string) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(string _nullableString) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 24 54 65 73 74 4D 6F 64 75 6C - 65 2B 4E 6F 6E 47 65 6E 65 72 69 63 4E 75 6C 6C - 41 73 54 72 75 65 56 61 6C 75 65 00 00 ) + .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 24 54 65 73 74 4D 6F 64 75 6C + 65 2B 4E 6F 6E 47 65 6E 65 72 69 63 4E 75 6C 6C + 41 73 54 72 75 65 56 61 6C 75 65 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 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -508,19 +479,6 @@ IL_000d: ret } - .method public hidebysig instance string get_nullableString() 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 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld string TestModule/NonGenericassembly::_nullableString - IL_0006: ret - } - .method public static int32 GetTag(class TestModule/NonGenericassembly A_0) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -537,27 +495,42 @@ IL_0007: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .method public static class TestModule/NonGenericassembly NewMySome(string _nullableString) 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 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 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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) + IL_0000: ldarg.0 + IL_0001: newobj instance void TestModule/NonGenericassembly::.ctor(string) + IL_0006: 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 TestModule/NonGenericassembly>::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) 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 + .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 "%+A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestModule/NonGenericassembly>::.ctor(string) + 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) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -586,10 +559,37 @@ IL_0004: ret } + .method public static class TestModule/NonGenericassembly get_MyNone() 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 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldnull + IL_0001: ret + } + + .method public hidebysig instance string get_nullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string TestModule/NonGenericassembly::_nullableString + IL_0006: ret + } + .property class TestModule/NonGenericassembly MyNone() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -600,7 +600,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32, int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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 ) .get instance string TestModule/NonGenericassembly::get_nullableString() @@ -621,21 +621,21 @@ } } - .method public static class TestModule/MyNullableOption`1 mapPossiblyNullable(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class TestModule/MyNullableOption`1 myOpt) cil managed + .method public static class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 mapNotNullableContents(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 myOpt) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param type b - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) .param [2] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) .maxstack 4 - .locals init (class TestModule/MyNullableOption`1 V_0, - class TestModule/MyNullableOption`1 V_1, + .locals init (class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 V_0, + class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 V_1, !!a V_2) IL_0000: ldarg.1 IL_0001: stloc.0 @@ -650,30 +650,30 @@ IL_0009: ldloc.0 IL_000a: stloc.1 IL_000b: ldloc.1 - IL_000c: ldfld !0 class TestModule/MyNullableOption`1::_value + IL_000c: ldfld !0 class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::_value IL_0011: stloc.2 IL_0012: ldarg.0 IL_0013: ldloc.2 IL_0014: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0019: call class TestModule/MyNullableOption`1 class TestModule/MyNullableOption`1::NewMySome(!0) + IL_0019: call class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::NewMyNotNullSome(!0) IL_001e: ret } - .method public static class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 mapNotNullableContents(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 myOpt) cil managed + .method public static class TestModule/MyNullableOption`1 mapPossiblyNullable(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class TestModule/MyNullableOption`1 myOpt) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param type b - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) .param [2] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) .maxstack 4 - .locals init (class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 V_0, - class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 V_1, + .locals init (class TestModule/MyNullableOption`1 V_0, + class TestModule/MyNullableOption`1 V_1, !!a V_2) IL_0000: ldarg.1 IL_0001: stloc.0 @@ -688,12 +688,12 @@ IL_0009: ldloc.0 IL_000a: stloc.1 IL_000b: ldloc.1 - IL_000c: ldfld !0 class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::_value + IL_000c: ldfld !0 class TestModule/MyNullableOption`1::_value IL_0011: stloc.2 IL_0012: ldarg.0 IL_0013: ldloc.2 IL_0014: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0019: call class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::NewMyNotNullSome(!0) + IL_0019: call class TestModule/MyNullableOption`1 class TestModule/MyNullableOption`1::NewMySome(!0) IL_001e: ret } @@ -704,162 +704,6 @@ { } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret - } - - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret - } - -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - -} - - 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..91f7455391b 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 @@ -68,33 +68,6 @@ IL_0006: ret } - .method public static class TestModule/MyNullableOption`1 get_MyNone() 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 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 ) - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 00 00 00 ) - - .maxstack 8 - IL_0000: ldnull - IL_0001: ret - } - - .method public static class TestModule/MyNullableOption`1 NewMySome(!T _value) 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 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: ldarg.0 - IL_0001: newobj instance void class TestModule/MyNullableOption`1::.ctor(!0) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(!T _value) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -113,17 +86,6 @@ IL_000d: ret } - .method public hidebysig instance !T get_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: ldfld !0 class TestModule/MyNullableOption`1::_value - IL_0006: ret - } - .method public static int32 GetTag(class TestModule/MyNullableOption`1 A_0) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -140,27 +102,40 @@ IL_0007: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .method public static class TestModule/MyNullableOption`1 NewMySome(!T _value) 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 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: ldstr "%+0.8A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_0000: ldarg.0 + IL_0001: newobj instance void class TestModule/MyNullableOption`1::.ctor(!0) + IL_0006: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestModule/MyNullableOption`1>::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) IL_0015: ret } - .method public strict virtual instance string ToString() cil managed + .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 "%+A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestModule/MyNullableOption`1>::.ctor(string) + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) @@ -189,6 +164,31 @@ IL_0004: ret } + .method public static class TestModule/MyNullableOption`1 get_MyNone() 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 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 00 00 00 ) + + .maxstack 8 + IL_0000: ldnull + IL_0001: ret + } + + .method public hidebysig instance !T get_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: ldfld !0 class TestModule/MyNullableOption`1::_value + IL_0006: ret + } + .property class TestModule/MyNullableOption`1 MyNone() { @@ -265,33 +265,6 @@ IL_0006: ret } - .method public static class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 get_MyNotNullNone() 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 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 ) - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 00 00 00 ) - - .maxstack 8 - IL_0000: ldnull - IL_0001: ret - } - - .method public static class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 NewMyNotNullSome(!T _value) 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 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: ldarg.0 - IL_0001: newobj instance void class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::.ctor(!0) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(!T _value) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -311,17 +284,6 @@ IL_000d: ret } - .method public hidebysig instance !T get_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: ldfld !0 class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::_value - IL_0006: ret - } - .method public static int32 GetTag(class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 A_0) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -338,27 +300,40 @@ IL_0007: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .method public static class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 NewMyNotNullSome(!T _value) 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 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: ldstr "%+0.8A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) + IL_0000: ldarg.0 + IL_0001: newobj instance void class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::.ctor(!0) + IL_0006: 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,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestModule/MyOptionWhichCannotHaveNullInTheInside`1>::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) IL_0015: ret } - .method public strict virtual instance string ToString() cil managed + .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 "%+A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestModule/MyOptionWhichCannotHaveNullInTheInside`1>::.ctor(string) + IL_0000: ldstr "%+0.8A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) @@ -387,6 +362,31 @@ IL_0004: ret } + .method public static class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 get_MyNotNullNone() 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 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 00 00 00 ) + + .maxstack 8 + IL_0000: ldnull + IL_0001: ret + } + + .method public hidebysig instance !T get_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: ldfld !0 class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::_value + IL_0006: ret + } + .property class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 MyNotNullNone() { @@ -459,35 +459,6 @@ IL_0006: ret } - .method public static class TestModule/NonGenericassembly get_MyNone() 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 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 ) - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldnull - IL_0001: ret - } - - .method public static class TestModule/NonGenericassembly NewMySome(string _nullableString) 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 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 ) - .param [1] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void TestModule/NonGenericassembly::.ctor(string) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(string _nullableString) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -508,19 +479,6 @@ IL_000d: ret } - .method public hidebysig instance string get_nullableString() 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 ) - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld string TestModule/NonGenericassembly::_nullableString - IL_0006: ret - } - .method public static int32 GetTag(class TestModule/NonGenericassembly A_0) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -537,27 +495,42 @@ IL_0007: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .method public static class TestModule/NonGenericassembly NewMySome(string _nullableString) 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 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 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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) + IL_0000: ldarg.0 + IL_0001: newobj instance void TestModule/NonGenericassembly::.ctor(string) + IL_0006: 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 TestModule/NonGenericassembly>::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) 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 + .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 "%+A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class TestModule/NonGenericassembly>::.ctor(string) + 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) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -586,6 +559,33 @@ IL_0004: ret } + .method public static class TestModule/NonGenericassembly get_MyNone() 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 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldnull + IL_0001: ret + } + + .method public hidebysig instance string get_nullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string TestModule/NonGenericassembly::_nullableString + IL_0006: ret + } + .property class TestModule/NonGenericassembly MyNone() { @@ -621,21 +621,21 @@ } } - .method public static class TestModule/MyNullableOption`1 mapPossiblyNullable(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class TestModule/MyNullableOption`1 myOpt) cil managed + .method public static class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 mapNotNullableContents(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 myOpt) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .param type a - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param type b - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) .param [2] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) .maxstack 4 - .locals init (class TestModule/MyNullableOption`1 V_0, - class TestModule/MyNullableOption`1 V_1, + .locals init (class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 V_0, + class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 V_1, !!a V_2) IL_0000: ldarg.1 IL_0001: stloc.0 @@ -650,30 +650,30 @@ IL_0009: ldloc.0 IL_000a: stloc.1 IL_000b: ldloc.1 - IL_000c: ldfld !0 class TestModule/MyNullableOption`1::_value + IL_000c: ldfld !0 class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::_value IL_0011: stloc.2 IL_0012: ldarg.0 IL_0013: ldloc.2 IL_0014: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0019: call class TestModule/MyNullableOption`1 class TestModule/MyNullableOption`1::NewMySome(!0) + IL_0019: call class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::NewMyNotNullSome(!0) IL_001e: ret } - .method public static class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 mapNotNullableContents(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 myOpt) cil managed + .method public static class TestModule/MyNullableOption`1 mapPossiblyNullable(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class TestModule/MyNullableOption`1 myOpt) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .param type a - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param type b - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [0] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) .param [2] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) .maxstack 4 - .locals init (class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 V_0, - class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 V_1, + .locals init (class TestModule/MyNullableOption`1 V_0, + class TestModule/MyNullableOption`1 V_1, !!a V_2) IL_0000: ldarg.1 IL_0001: stloc.0 @@ -688,12 +688,12 @@ IL_0009: ldloc.0 IL_000a: stloc.1 IL_000b: ldloc.1 - IL_000c: ldfld !0 class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::_value + IL_000c: ldfld !0 class TestModule/MyNullableOption`1::_value IL_0011: stloc.2 IL_0012: ldarg.0 IL_0013: ldloc.2 IL_0014: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0019: call class TestModule/MyOptionWhichCannotHaveNullInTheInside`1 class TestModule/MyOptionWhichCannotHaveNullInTheInside`1::NewMyNotNullSome(!0) + IL_0019: call class TestModule/MyNullableOption`1 class TestModule/MyNullableOption`1::NewMySome(!0) IL_001e: ret } @@ -708,4 +708,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.il.net472.bsl index 68f2e777fe6..5999bd21919 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.il.net472.bsl @@ -26,72 +26,67 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public static string objToString(object o) cil managed + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .method public static !!a castToA(object o) cil managed { + .param type a + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: tail. - IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) IL_0008: ret } - .method public static string objnullToNullableString(object o) cil managed + .method public static !!b castToNullableB(object a) cil managed { + .param type b + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any [runtime]System.String + IL_0001: unbox.any !!b IL_0006: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 objnullToOption(object o) cil managed + .method public static !!a downcastIplicitGeneric(object o) cil managed { + .param type a + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 - IL_0006: ret - } - - .method public static int32 objNullTOInt(object o) cil managed - { - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: unbox.any [runtime]System.Int32 + IL_0001: unbox.any !!a IL_0006: ret } - .method public static !!a castToA(object o) cil managed + .method public static bool isObjNullOption(object o) cil managed { - .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: tail. - IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) + IL_0003: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric>(object) IL_0008: ret } .method public static bool isObjnullAString(object o) cil managed { .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 3 .locals init (object V_0) @@ -104,24 +99,12 @@ IL_000b: ret } - .method public static bool isObjNullOption(object o) cil managed - { - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: tail. - IL_0003: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric>(object) - IL_0008: ret - } - .method public static bool isOfType(object o) cil managed { .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -130,110 +113,61 @@ IL_0008: ret } - .method public static !!b castToNullableB(object a) cil managed + .method public static int32 objNullTOInt(object o) cil managed { - .param type b - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any !!b + IL_0001: unbox.any [runtime]System.Int32 IL_0006: ret } - .method public static !!a downcastIplicitGeneric(object o) cil managed + .method public static string objToString(object o) cil managed { - .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any !!a - IL_0006: ret + IL_0001: tail. + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) + IL_0008: ret } -} - -.class private abstract auto ansi sealed ''.$TestModule - extends [runtime]System.Object -{ -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) cil managed + .method public static string objnullToNullableString(object o) 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret + IL_0001: unbox.any [runtime]System.String + IL_0006: ret } - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 objnullToOption(object o) 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret + IL_0001: unbox.any class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 + IL_0006: ret } } -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute +.class private abstract auto ansi sealed ''.$TestModule + extends [runtime]System.Object { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - } - 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..5999bd21919 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 @@ -27,18 +27,24 @@ { .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 ) .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public static string objToString(object o) cil managed + .method public static !!a castToA(object o) cil managed { + .param type a + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: tail. - IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) IL_0008: ret } - .method public static string objnullToNullableString(object o) cil managed + .method public static !!b castToNullableB(object a) cil managed { + .param type b + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [1] @@ -46,45 +52,34 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any [runtime]System.String + IL_0001: unbox.any !!b IL_0006: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 objnullToOption(object o) cil managed + .method public static !!a downcastIplicitGeneric(object o) cil managed { + .param type a + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) - .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: unbox.any class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 - IL_0006: ret - } - - .method public static int32 objNullTOInt(object o) cil managed - { .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any [runtime]System.Int32 + IL_0001: unbox.any !!a IL_0006: ret } - .method public static !!a castToA(object o) cil managed + .method public static bool isObjNullOption(object o) cil managed { - .param type a - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: tail. - IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) + IL_0003: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric>(object) IL_0008: ret } @@ -104,36 +99,43 @@ IL_000b: ret } - .method public static bool isObjNullOption(object o) cil managed + .method public static bool isOfType(object o) cil managed { + .param type a + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: tail. - IL_0003: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric>(object) + IL_0003: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) IL_0008: ret } - .method public static bool isOfType(object o) cil managed + .method public static int32 objNullTOInt(object o) cil managed { - .param type a - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: unbox.any [runtime]System.Int32 + IL_0006: ret + } + + .method public static string objToString(object o) cil managed + { + .maxstack 8 IL_0000: ldarg.0 IL_0001: tail. - IL_0003: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) IL_0008: ret } - .method public static !!b castToNullableB(object a) cil managed + .method public static string objnullToNullableString(object o) cil managed { - .param type b - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [1] @@ -141,22 +143,20 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any !!b + IL_0001: unbox.any [runtime]System.String IL_0006: ret } - .method public static !!a downcastIplicitGeneric(object o) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 objnullToOption(object o) cil managed { - .param type a - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any !!a + IL_0001: unbox.any class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 IL_0006: ret } @@ -171,4 +171,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.opt.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.opt.il.net472.bsl index aea1ebdf966..3c37cfc85b5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.opt.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.opt.il.net472.bsl @@ -26,72 +26,67 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public static string objToString(object o) cil managed + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .method public static !!a castToA(object o) cil managed { + .param type a + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: tail. - IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) IL_0008: ret } - .method public static string objnullToNullableString(object o) cil managed + .method public static !!b castToNullableB(object a) cil managed { + .param type b + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any [runtime]System.String + IL_0001: unbox.any !!b IL_0006: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 objnullToOption(object o) cil managed + .method public static !!a downcastIplicitGeneric(object o) cil managed { + .param type a + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 - IL_0006: ret - } - - .method public static int32 objNullTOInt(object o) cil managed - { - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: unbox.any [runtime]System.Int32 + IL_0001: unbox.any !!a IL_0006: ret } - .method public static !!a castToA(object o) cil managed + .method public static bool isObjNullOption(object o) cil managed { - .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: tail. - IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) + IL_0003: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric>(object) IL_0008: ret } .method public static bool isObjnullAString(object o) cil managed { .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -101,24 +96,12 @@ IL_0009: ret } - .method public static bool isObjNullOption(object o) cil managed - { - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: tail. - IL_0003: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric>(object) - IL_0008: ret - } - .method public static bool isOfType(object o) cil managed { .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -127,110 +110,61 @@ IL_0008: ret } - .method public static !!b castToNullableB(object a) cil managed + .method public static int32 objNullTOInt(object o) cil managed { - .param type b - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any !!b + IL_0001: unbox.any [runtime]System.Int32 IL_0006: ret } - .method public static !!a downcastIplicitGeneric(object o) cil managed + .method public static string objToString(object o) cil managed { - .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any !!a - IL_0006: ret + IL_0001: tail. + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) + IL_0008: ret } -} - -.class private abstract auto ansi sealed ''.$TestModule - extends [runtime]System.Object -{ -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) cil managed + .method public static string objnullToNullableString(object o) 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret + IL_0001: unbox.any [runtime]System.String + IL_0006: ret } - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 objnullToOption(object o) 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret + IL_0001: unbox.any class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 + IL_0006: ret } } -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute +.class private abstract auto ansi sealed ''.$TestModule + extends [runtime]System.Object { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - } - 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..3c37cfc85b5 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 @@ -27,18 +27,24 @@ { .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 ) .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public static string objToString(object o) cil managed + .method public static !!a castToA(object o) cil managed { + .param type a + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: tail. - IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) IL_0008: ret } - .method public static string objnullToNullableString(object o) cil managed + .method public static !!b castToNullableB(object a) cil managed { + .param type b + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [1] @@ -46,45 +52,34 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any [runtime]System.String + IL_0001: unbox.any !!b IL_0006: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 objnullToOption(object o) cil managed + .method public static !!a downcastIplicitGeneric(object o) cil managed { + .param type a + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) - .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: unbox.any class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 - IL_0006: ret - } - - .method public static int32 objNullTOInt(object o) cil managed - { .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any [runtime]System.Int32 + IL_0001: unbox.any !!a IL_0006: ret } - .method public static !!a castToA(object o) cil managed + .method public static bool isObjNullOption(object o) cil managed { - .param type a - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: tail. - IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) + IL_0003: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric>(object) IL_0008: ret } @@ -101,36 +96,43 @@ IL_0009: ret } - .method public static bool isObjNullOption(object o) cil managed + .method public static bool isOfType(object o) cil managed { + .param type a + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: tail. - IL_0003: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric>(object) + IL_0003: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) IL_0008: ret } - .method public static bool isOfType(object o) cil managed + .method public static int32 objNullTOInt(object o) cil managed { - .param type a - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: unbox.any [runtime]System.Int32 + IL_0006: ret + } + + .method public static string objToString(object o) cil managed + { + .maxstack 8 IL_0000: ldarg.0 IL_0001: tail. - IL_0003: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::UnboxGeneric(object) IL_0008: ret } - .method public static !!b castToNullableB(object a) cil managed + .method public static string objnullToNullableString(object o) cil managed { - .param type b - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [1] @@ -138,22 +140,20 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any !!b + IL_0001: unbox.any [runtime]System.String IL_0006: ret } - .method public static !!a downcastIplicitGeneric(object o) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 objnullToOption(object o) cil managed { - .param type a - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 02 01 00 00 ) .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: unbox.any !!a + IL_0001: unbox.any class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 IL_0006: ret } @@ -168,4 +168,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableInheritance.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableInheritance.fs.il.net472.bsl index fbb63d7ff9e..a94a6643bd2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableInheritance.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableInheritance.fs.il.net472.bsl @@ -30,10 +30,9 @@ extends class [runtime]System.Collections.Generic.List`1 { .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 ) - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 01 02 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public specialname rtspecialname - instance void .ctor() cil managed + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 01 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed { .maxstack 8 @@ -44,11 +43,10 @@ IL_0008: ret } - .method public hidebysig specialname - instance string get_FirstItem() cil managed + .method public hidebysig specialname instance string get_FirstItem() cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 4 .locals init (class MyTestModule/DerivedWhichAllowsNull V_0) @@ -63,7 +61,7 @@ .property instance string FirstItem() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .get instance string MyTestModule/DerivedWhichAllowsNull::get_FirstItem() } } @@ -72,9 +70,8 @@ extends class [runtime]System.Collections.Generic.List`1 { .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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public specialname rtspecialname - instance void .ctor() cil managed + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed { .maxstack 8 @@ -85,11 +82,8 @@ IL_0008: ret } - .method public hidebysig specialname - instance string get_FirstItem() cil managed + .method public hidebysig specialname instance string get_FirstItem() cil managed { - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .maxstack 4 .locals init (class MyTestModule/DerivedWithoutNull V_0) @@ -104,7 +98,6 @@ .property instance string FirstItem() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .get instance string MyTestModule/DerivedWithoutNull::get_FirstItem() } } @@ -112,11 +105,10 @@ .class interface abstract auto ansi serializable nested public beforefieldinit ICanGetAnything`1 { .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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param type T - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) - .method public hidebysig abstract virtual - instance !T Get() cil managed + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .method public hidebysig abstract virtual instance !T Get() cil managed { } @@ -129,13 +121,12 @@ class MyTestModule/ICanGetAnything`1 { .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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .interfaceimpl type class MyTestModule/ICanGetAnything`1> - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 02 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 02 02 00 00 ) .interfaceimpl type class MyTestModule/ICanGetAnything`1 - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 01 02 00 00 ) - .method public specialname rtspecialname - instance void .ctor() cil managed + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 02 00 00 00 01 02 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed { .maxstack 8 @@ -146,42 +137,37 @@ IL_0008: ret } - .method private hidebysig newslot virtual - instance string 'MyTestModule.ICanGetAnything.Get'() cil managed + .method private hidebysig newslot virtual instance class [runtime]System.Collections.Generic.List`1> 'MyTestModule.ICanGetAnything>>.Get'() cil managed { - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .override method instance !0 class MyTestModule/ICanGetAnything`1::Get() + .override method instance !0 class MyTestModule/ICanGetAnything`1>>::Get() .maxstack 3 .locals init (class MyTestModule/MyClassImplementingTheSameInterface V_0) IL_0000: ldarg.0 IL_0001: stloc.0 - IL_0002: ldnull - IL_0003: ret + IL_0002: newobj instance void class [runtime]System.Collections.Generic.List`1>::.ctor() + IL_0007: ret } - .method private hidebysig newslot virtual - instance class [runtime]System.Collections.Generic.List`1> - 'MyTestModule.ICanGetAnything>>.Get'() cil managed + .method private hidebysig newslot virtual instance class [runtime]System.Collections.Generic.List`1 'MyTestModule.ICanGetAnything>.Get'() cil managed { - .override method instance !0 class MyTestModule/ICanGetAnything`1>>::Get() + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .override method instance !0 class MyTestModule/ICanGetAnything`1>::Get() .maxstack 3 .locals init (class MyTestModule/MyClassImplementingTheSameInterface V_0) IL_0000: ldarg.0 IL_0001: stloc.0 - IL_0002: newobj instance void class [runtime]System.Collections.Generic.List`1>::.ctor() - IL_0007: ret + IL_0002: ldnull + IL_0003: ret } - .method private hidebysig newslot virtual - instance class [runtime]System.Collections.Generic.List`1 - 'MyTestModule.ICanGetAnything>.Get'() cil managed + .method private hidebysig newslot virtual instance string 'MyTestModule.ICanGetAnything.Get'() cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .override method instance !0 class MyTestModule/ICanGetAnything`1>::Get() + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .override method instance !0 class MyTestModule/ICanGetAnything`1::Get() .maxstack 3 .locals init (class MyTestModule/MyClassImplementingTheSameInterface V_0) @@ -200,75 +186,6 @@ { } -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname - instance void .ctor(uint8 scalarByteValue) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret - } - - .method public specialname rtspecialname - instance void .ctor(uint8[] NullableFlags) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret - } - -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname - instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - -} - - 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..a94a6643bd2 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 @@ -137,37 +137,37 @@ IL_0008: ret } - .method private hidebysig newslot virtual instance string 'MyTestModule.ICanGetAnything.Get'() cil managed + .method private hidebysig newslot virtual instance class [runtime]System.Collections.Generic.List`1> 'MyTestModule.ICanGetAnything>>.Get'() cil managed { - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .override method instance !0 class MyTestModule/ICanGetAnything`1::Get() + .override method instance !0 class MyTestModule/ICanGetAnything`1>>::Get() .maxstack 3 .locals init (class MyTestModule/MyClassImplementingTheSameInterface V_0) IL_0000: ldarg.0 IL_0001: stloc.0 - IL_0002: ldnull - IL_0003: ret + IL_0002: newobj instance void class [runtime]System.Collections.Generic.List`1>::.ctor() + IL_0007: ret } - .method private hidebysig newslot virtual instance class [runtime]System.Collections.Generic.List`1> 'MyTestModule.ICanGetAnything>>.Get'() cil managed + .method private hidebysig newslot virtual instance class [runtime]System.Collections.Generic.List`1 'MyTestModule.ICanGetAnything>.Get'() cil managed { - .override method instance !0 class MyTestModule/ICanGetAnything`1>>::Get() + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .override method instance !0 class MyTestModule/ICanGetAnything`1>::Get() .maxstack 3 .locals init (class MyTestModule/MyClassImplementingTheSameInterface V_0) IL_0000: ldarg.0 IL_0001: stloc.0 - IL_0002: newobj instance void class [runtime]System.Collections.Generic.List`1>::.ctor() - IL_0007: ret + IL_0002: ldnull + IL_0003: ret } - .method private hidebysig newslot virtual instance class [runtime]System.Collections.Generic.List`1 'MyTestModule.ICanGetAnything>.Get'() cil managed + .method private hidebysig newslot virtual instance string 'MyTestModule.ICanGetAnything.Get'() cil managed { .param [0] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .override method instance !0 class MyTestModule/ICanGetAnything`1>::Get() + .override method instance !0 class MyTestModule/ICanGetAnything`1::Get() .maxstack 3 .locals init (class MyTestModule/MyClassImplementingTheSameInterface V_0) @@ -190,4 +190,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/PlainRecord.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/PlainRecord.fs.il.net472.bsl index c3786f820ba..9f30c72107b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/PlainRecord.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/PlainRecord.fs.il.net472.bsl @@ -32,45 +32,21 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field assembly string NonNullableString@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) .field assembly string NullableString@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .method public hidebysig specialname instance string get_NonNullableString() 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 string MyTestModule/MyRecord::NonNullableString@ - IL_0006: ret - } - - .method public hidebysig specialname instance string get_NullableString() 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 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld string MyTestModule/MyRecord::NullableString@ - IL_0006: ret - } - + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .method public specialname rtspecialname instance void .ctor(string nonNullableString, string nullableString) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 15 4D 79 54 65 73 74 4D 6F 64 - 75 6C 65 2B 4D 79 52 65 63 6F 72 64 00 00 ) + .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 15 4D 79 54 65 73 74 4D 6F 64 + 75 6C 65 2B 4D 79 52 65 63 6F 72 64 00 00 ) .param [2] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -97,6 +73,30 @@ IL_0015: ret } + .method public hidebysig specialname instance string get_NonNullableString() 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 string MyTestModule/MyRecord::NonNullableString@ + IL_0006: ret + } + + .method public hidebysig specialname instance string get_NullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string MyTestModule/MyRecord::NullableString@ + IL_0006: ret + } + .property instance string NonNullableString() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -107,7 +107,7 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .get instance string MyTestModule/MyRecord::get_NullableString() } } @@ -119,162 +119,6 @@ { } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret - } - - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret - } - -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - -} - - 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..9f30c72107b 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 @@ -40,30 +40,6 @@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .method public hidebysig specialname instance string get_NonNullableString() 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 string MyTestModule/MyRecord::NonNullableString@ - IL_0006: ret - } - - .method public hidebysig specialname instance string get_NullableString() 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 ) - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld string MyTestModule/MyRecord::NullableString@ - IL_0006: ret - } - .method public specialname rtspecialname instance void .ctor(string nonNullableString, string nullableString) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -97,6 +73,30 @@ IL_0015: ret } + .method public hidebysig specialname instance string get_NonNullableString() 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 string MyTestModule/MyRecord::NonNullableString@ + IL_0006: ret + } + + .method public hidebysig specialname instance string get_NullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string MyTestModule/MyRecord::NullableString@ + IL_0006: ret + } + .property instance string NonNullableString() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -123,4 +123,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/Records.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/Records.fs.il.net472.bsl index ead7d3c340c..2eb5453fa03 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/Records.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/Records.fs.il.net472.bsl @@ -26,20 +26,20 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .class auto ansi serializable sealed nested public beforefieldinit MyRecord`3 extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param type X - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .param type Y - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param type Z - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field assembly int32 JustInt@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) @@ -52,7 +52,7 @@ .field assembly string NullableString@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .field assembly !X GenericNormalField@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) @@ -62,138 +62,138 @@ .field assembly !Z GenericNotNullField@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_JustInt() cil managed + .method public specialname rtspecialname + instance void .ctor(int32 justInt, + valuetype [runtime]System.Nullable`1 nullInt, + string justString, + string nullableString, + !X genericNormalField, + !Y genericNullableField, + !Z genericNotNullField) 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 ) + .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 17 4D 79 54 65 73 74 4D 6F 64 + 75 6C 65 2B 4D 79 52 65 63 6F 72 64 60 33 00 00 ) + .param [4] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 class MyTestModule/MyRecord`3::JustInt@ - IL_0006: ret + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 class MyTestModule/MyRecord`3::JustInt@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld valuetype [runtime]System.Nullable`1 class MyTestModule/MyRecord`3::NullInt@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld string class MyTestModule/MyRecord`3::JustString@ + IL_001b: ldarg.0 + IL_001c: ldarg.s nullableString + IL_001e: stfld string class MyTestModule/MyRecord`3::NullableString@ + IL_0023: ldarg.0 + IL_0024: ldarg.s genericNormalField + IL_0026: stfld !0 class MyTestModule/MyRecord`3::GenericNormalField@ + IL_002b: ldarg.0 + IL_002c: ldarg.s genericNullableField + IL_002e: stfld !1 class MyTestModule/MyRecord`3::GenericNullableField@ + IL_0033: ldarg.0 + IL_0034: ldarg.s genericNotNullField + IL_0036: stfld !2 class MyTestModule/MyRecord`3::GenericNotNullField@ + IL_003b: ret } - .method public hidebysig specialname instance valuetype [runtime]System.Nullable`1 get_NullInt() cil managed + .method public strict virtual instance string ToString() 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 valuetype [runtime]System.Nullable`1 class MyTestModule/MyRecord`3::NullInt@ - IL_0006: ret + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class MyTestModule/MyRecord`3>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: ret } - .method public hidebysig specialname instance string get_JustString() cil managed + .method public hidebysig specialname instance !X get_GenericNormalField() 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 string class MyTestModule/MyRecord`3::JustString@ + IL_0001: ldfld !0 class MyTestModule/MyRecord`3::GenericNormalField@ IL_0006: ret } - .method public hidebysig specialname instance string get_NullableString() cil managed + .method public hidebysig specialname instance !Z get_GenericNotNullField() 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 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld string class MyTestModule/MyRecord`3::NullableString@ + IL_0001: ldfld !2 class MyTestModule/MyRecord`3::GenericNotNullField@ IL_0006: ret } - .method public hidebysig specialname instance !X get_GenericNormalField() cil managed + .method public hidebysig specialname instance !Y get_GenericNullableField() 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 !0 class MyTestModule/MyRecord`3::GenericNormalField@ + IL_0001: ldfld !1 class MyTestModule/MyRecord`3::GenericNullableField@ IL_0006: ret } - .method public hidebysig specialname instance !Y get_GenericNullableField() cil managed + .method public hidebysig specialname instance int32 get_JustInt() 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 !1 class MyTestModule/MyRecord`3::GenericNullableField@ + IL_0001: ldfld int32 class MyTestModule/MyRecord`3::JustInt@ IL_0006: ret } - .method public hidebysig specialname instance !Z get_GenericNotNullField() cil managed + .method public hidebysig specialname instance string get_JustString() 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 !2 class MyTestModule/MyRecord`3::GenericNotNullField@ + IL_0001: ldfld string class MyTestModule/MyRecord`3::JustString@ IL_0006: ret } - .method public specialname rtspecialname - instance void .ctor(int32 justInt, - valuetype [runtime]System.Nullable`1 nullInt, - string justString, - string nullableString, - !X genericNormalField, - !Y genericNullableField, - !Z genericNotNullField) cil managed + .method public hidebysig specialname instance valuetype [runtime]System.Nullable`1 get_NullInt() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 17 4D 79 54 65 73 74 4D 6F 64 - 75 6C 65 2B 4D 79 52 65 63 6F 72 64 60 33 00 00 ) - .param [4] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 class MyTestModule/MyRecord`3::JustInt@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld valuetype [runtime]System.Nullable`1 class MyTestModule/MyRecord`3::NullInt@ - IL_0014: ldarg.0 - IL_0015: ldarg.3 - IL_0016: stfld string class MyTestModule/MyRecord`3::JustString@ - IL_001b: ldarg.0 - IL_001c: ldarg.s nullableString - IL_001e: stfld string class MyTestModule/MyRecord`3::NullableString@ - IL_0023: ldarg.0 - IL_0024: ldarg.s genericNormalField - IL_0026: stfld !0 class MyTestModule/MyRecord`3::GenericNormalField@ - IL_002b: ldarg.0 - IL_002c: ldarg.s genericNullableField - IL_002e: stfld !1 class MyTestModule/MyRecord`3::GenericNullableField@ - IL_0033: ldarg.0 - IL_0034: ldarg.s genericNotNullField - IL_0036: stfld !2 class MyTestModule/MyRecord`3::GenericNotNullField@ - IL_003b: ret + IL_0001: ldfld valuetype [runtime]System.Nullable`1 class MyTestModule/MyRecord`3::NullInt@ + IL_0006: ret } - .method public strict virtual instance string ToString() cil managed + .method public hidebysig specialname instance string get_NullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 - IL_0000: ldstr "%+A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class MyTestModule/MyRecord`3>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: ldfld string class MyTestModule/MyRecord`3::NullableString@ + IL_0006: ret } .property instance int32 JustInt() @@ -219,7 +219,7 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32) = ( 01 00 04 00 00 00 03 00 00 00 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .get instance string MyTestModule/MyRecord`3::get_NullableString() } .property instance !X GenericNormalField() @@ -242,20 +242,10 @@ } } - .method public specialname static string get_maybeString() 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: ldnull - IL_0001: ret - } - .method public static class MyTestModule/MyRecord`3 createAnInstance() cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 02 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8[]) = ( 01 00 03 00 00 00 01 02 01 00 00 ) .maxstack 9 IL_0000: ldc.i4.s 42 @@ -276,6 +266,16 @@ IL_0020: ret } + .method public specialname static string get_maybeString() 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: ldnull + IL_0001: ret + } + .method public static string stringOfInst() cil managed { @@ -288,7 +288,7 @@ .property string maybeString() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .get string MyTestModule::get_maybeString() } } @@ -298,162 +298,6 @@ { } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret - } - - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret - } - -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - -} - - 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..2eb5453fa03 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 @@ -62,138 +62,138 @@ .field assembly !Z GenericNotNullField@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_JustInt() cil managed + .method public specialname rtspecialname + instance void .ctor(int32 justInt, + valuetype [runtime]System.Nullable`1 nullInt, + string justString, + string nullableString, + !X genericNormalField, + !Y genericNullableField, + !Z genericNotNullField) 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 ) + .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 17 4D 79 54 65 73 74 4D 6F 64 + 75 6C 65 2B 4D 79 52 65 63 6F 72 64 60 33 00 00 ) + .param [4] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 class MyTestModule/MyRecord`3::JustInt@ - IL_0006: ret + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 class MyTestModule/MyRecord`3::JustInt@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld valuetype [runtime]System.Nullable`1 class MyTestModule/MyRecord`3::NullInt@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld string class MyTestModule/MyRecord`3::JustString@ + IL_001b: ldarg.0 + IL_001c: ldarg.s nullableString + IL_001e: stfld string class MyTestModule/MyRecord`3::NullableString@ + IL_0023: ldarg.0 + IL_0024: ldarg.s genericNormalField + IL_0026: stfld !0 class MyTestModule/MyRecord`3::GenericNormalField@ + IL_002b: ldarg.0 + IL_002c: ldarg.s genericNullableField + IL_002e: stfld !1 class MyTestModule/MyRecord`3::GenericNullableField@ + IL_0033: ldarg.0 + IL_0034: ldarg.s genericNotNullField + IL_0036: stfld !2 class MyTestModule/MyRecord`3::GenericNotNullField@ + IL_003b: ret } - .method public hidebysig specialname instance valuetype [runtime]System.Nullable`1 get_NullInt() cil managed + .method public strict virtual instance string ToString() 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 valuetype [runtime]System.Nullable`1 class MyTestModule/MyRecord`3::NullInt@ - IL_0006: ret + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class MyTestModule/MyRecord`3>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) + IL_0015: ret } - .method public hidebysig specialname instance string get_JustString() cil managed + .method public hidebysig specialname instance !X get_GenericNormalField() 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 string class MyTestModule/MyRecord`3::JustString@ + IL_0001: ldfld !0 class MyTestModule/MyRecord`3::GenericNormalField@ IL_0006: ret } - .method public hidebysig specialname instance string get_NullableString() cil managed + .method public hidebysig specialname instance !Z get_GenericNotNullField() 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 ) - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld string class MyTestModule/MyRecord`3::NullableString@ + IL_0001: ldfld !2 class MyTestModule/MyRecord`3::GenericNotNullField@ IL_0006: ret } - .method public hidebysig specialname instance !X get_GenericNormalField() cil managed + .method public hidebysig specialname instance !Y get_GenericNullableField() 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 !0 class MyTestModule/MyRecord`3::GenericNormalField@ + IL_0001: ldfld !1 class MyTestModule/MyRecord`3::GenericNullableField@ IL_0006: ret } - .method public hidebysig specialname instance !Y get_GenericNullableField() cil managed + .method public hidebysig specialname instance int32 get_JustInt() 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 !1 class MyTestModule/MyRecord`3::GenericNullableField@ + IL_0001: ldfld int32 class MyTestModule/MyRecord`3::JustInt@ IL_0006: ret } - .method public hidebysig specialname instance !Z get_GenericNotNullField() cil managed + .method public hidebysig specialname instance string get_JustString() 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 !2 class MyTestModule/MyRecord`3::GenericNotNullField@ + IL_0001: ldfld string class MyTestModule/MyRecord`3::JustString@ IL_0006: ret } - .method public specialname rtspecialname - instance void .ctor(int32 justInt, - valuetype [runtime]System.Nullable`1 nullInt, - string justString, - string nullableString, - !X genericNormalField, - !Y genericNullableField, - !Z genericNotNullField) cil managed + .method public hidebysig specialname instance valuetype [runtime]System.Nullable`1 get_NullInt() 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 17 4D 79 54 65 73 74 4D 6F 64 - 75 6C 65 2B 4D 79 52 65 63 6F 72 64 60 33 00 00 ) - .param [4] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 class MyTestModule/MyRecord`3::JustInt@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld valuetype [runtime]System.Nullable`1 class MyTestModule/MyRecord`3::NullInt@ - IL_0014: ldarg.0 - IL_0015: ldarg.3 - IL_0016: stfld string class MyTestModule/MyRecord`3::JustString@ - IL_001b: ldarg.0 - IL_001c: ldarg.s nullableString - IL_001e: stfld string class MyTestModule/MyRecord`3::NullableString@ - IL_0023: ldarg.0 - IL_0024: ldarg.s genericNormalField - IL_0026: stfld !0 class MyTestModule/MyRecord`3::GenericNormalField@ - IL_002b: ldarg.0 - IL_002c: ldarg.s genericNullableField - IL_002e: stfld !1 class MyTestModule/MyRecord`3::GenericNullableField@ - IL_0033: ldarg.0 - IL_0034: ldarg.s genericNotNullField - IL_0036: stfld !2 class MyTestModule/MyRecord`3::GenericNotNullField@ - IL_003b: ret + IL_0001: ldfld valuetype [runtime]System.Nullable`1 class MyTestModule/MyRecord`3::NullInt@ + IL_0006: ret } - .method public strict virtual instance string ToString() cil managed + .method public hidebysig specialname instance string get_NullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 - IL_0000: ldstr "%+A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class MyTestModule/MyRecord`3>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,string>::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: ldfld string class MyTestModule/MyRecord`3::NullableString@ + IL_0006: ret } .property instance int32 JustInt() @@ -242,16 +242,6 @@ } } - .method public specialname static string get_maybeString() 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: ldnull - IL_0001: ret - } - .method public static class MyTestModule/MyRecord`3 createAnInstance() cil managed { .param [0] @@ -276,6 +266,16 @@ IL_0020: ret } + .method public specialname static string get_maybeString() 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: ldnull + IL_0001: ret + } + .method public static string stringOfInst() cil managed { @@ -302,4 +302,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ReferenceDU.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ReferenceDU.fs.il.net472.bsl index 63458b70509..979483924db 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ReferenceDU.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ReferenceDU.fs.il.net472.bsl @@ -8,7 +8,7 @@ .assembly extern netstandard { .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) - .ver 2:1:0:0 + .ver 2:0:0:0 } .assembly assembly { @@ -31,16 +31,16 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .class abstract auto autochar serializable nested public beforefieldinit MyDu extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 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 ) + 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .class abstract auto ansi sealed nested public Tags extends [runtime]System.Object { @@ -52,17 +52,17 @@ .class auto ansi serializable nested assembly beforefieldinit specialname _JustLabel extends MyTestModule/MyDu { - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 2B 4D 79 54 65 73 74 4D 6F 64 75 6C 65 2B - 4D 79 44 75 2B 5F 4A 75 73 74 4C 61 62 65 6C 40 - 44 65 62 75 67 54 79 70 65 50 72 6F 78 79 00 00 ) + 4D 79 44 75 2B 5F 4A 75 73 74 4C 61 62 65 6C 40 + 44 65 62 75 67 54 79 70 65 50 72 6F 78 79 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 ) + 61 79 28 29 2C 6E 71 7D 00 00 ) .method assembly specialname rtspecialname instance void .ctor() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 11 4D 79 54 65 73 74 4D 6F 64 - 75 6C 65 2B 4D 79 44 75 00 00 ) + .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 11 4D 79 54 65 73 74 4D 6F 64 + 75 6C 65 2B 4D 79 44 75 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 ) @@ -77,21 +77,21 @@ .class auto ansi serializable nested public beforefieldinit specialname JustInt extends MyTestModule/MyDu { - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 28 4D 79 54 65 73 74 4D 6F 64 75 6C 65 2B - 4D 79 44 75 2B 4A 75 73 74 49 6E 74 40 44 65 62 - 75 67 54 79 70 65 50 72 6F 78 79 00 00 ) + 4D 79 44 75 2B 4A 75 73 74 49 6E 74 40 44 65 62 + 75 67 54 79 70 65 50 72 6F 78 79 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 ) + 61 79 28 29 2C 6E 71 7D 00 00 ) .field assembly initonly int32 item .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 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 11 4D 79 54 65 73 74 4D 6F 64 - 75 6C 65 2B 4D 79 44 75 00 00 ) + .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 11 4D 79 54 65 73 74 4D 6F 64 + 75 6C 65 2B 4D 79 44 75 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 ) @@ -129,27 +129,27 @@ .class auto ansi serializable nested public beforefieldinit specialname MaybeString extends MyTestModule/MyDu { - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 2C 4D 79 54 65 73 74 4D 6F 64 75 6C 65 2B - 4D 79 44 75 2B 4D 61 79 62 65 53 74 72 69 6E 67 - 40 44 65 62 75 67 54 79 70 65 50 72 6F 78 79 00 - 00 ) + 4D 79 44 75 2B 4D 61 79 62 65 53 74 72 69 6E 67 + 40 44 65 62 75 67 54 79 70 65 50 72 6F 78 79 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 ) + 61 79 28 29 2C 6E 71 7D 00 00 ) .field assembly initonly string _nullableString - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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(string _nullableString) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 11 4D 79 54 65 73 74 4D 6F 64 - 75 6C 65 2B 4D 79 44 75 00 00 ) + .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 11 4D 79 54 65 73 74 4D 6F 64 + 75 6C 65 2B 4D 79 44 75 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 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -165,7 +165,7 @@ .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 ) .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -178,7 +178,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32, int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 00 00 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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 ) .get instance string MyTestModule/MyDu/MaybeString::get_nullableString() @@ -194,9 +194,9 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class MyTestModule/MyDu/_JustLabel obj) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 11 4D 79 54 65 73 74 4D 6F 64 - 75 6C 65 2B 4D 79 44 75 00 00 ) + .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 11 4D 79 54 65 73 74 4D 6F 64 + 75 6C 65 2B 4D 79 44 75 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 ) @@ -220,9 +220,9 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class MyTestModule/MyDu/JustInt obj) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 11 4D 79 54 65 73 74 4D 6F 64 - 75 6C 65 2B 4D 79 44 75 00 00 ) + .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 11 4D 79 54 65 73 74 4D 6F 64 + 75 6C 65 2B 4D 79 44 75 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 ) @@ -267,9 +267,9 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class MyTestModule/MyDu/MaybeString obj) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 11 4D 79 54 65 73 74 4D 6F 64 - 75 6C 65 2B 4D 79 44 75 00 00 ) + .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 11 4D 79 54 65 73 74 4D 6F 64 + 75 6C 65 2B 4D 79 44 75 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 ) @@ -299,7 +299,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32, int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 00 00 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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 ) .get instance string MyTestModule/MyDu/MaybeString@DebugTypeProxy::get_nullableString() @@ -321,9 +321,9 @@ .method assembly specialname rtspecialname instance void .ctor() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 11 4D 79 54 65 73 74 4D 6F 64 - 75 6C 65 2B 4D 79 44 75 00 00 ) + .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 11 4D 79 54 65 73 74 4D 6F 64 + 75 6C 65 2B 4D 79 44 75 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 ) @@ -333,42 +333,59 @@ IL_0006: ret } - .method public static class MyTestModule/MyDu get_JustLabel() cil managed + .method public static class MyTestModule/MyDu NewJustInt(int32 item) 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 00 00 00 00 00 00 ) + 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 MyTestModule/MyDu MyTestModule/MyDu::_unique_JustLabel - IL_0005: ret + IL_0000: ldarg.0 + IL_0001: newobj instance void MyTestModule/MyDu/JustInt::.ctor(int32) + IL_0006: ret } - .method public hidebysig instance bool get_IsJustLabel() cil managed + .method public static class MyTestModule/MyDu NewMaybeString(string _nullableString) 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 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: isinst MyTestModule/MyDu/_JustLabel - IL_0006: ldnull - IL_0007: cgt.un - IL_0009: ret + IL_0001: newobj instance void MyTestModule/MyDu/MaybeString::.ctor(string) + IL_0006: ret } - .method public static class MyTestModule/MyDu NewJustInt(int32 item) cil managed + .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 MyTestModule/MyDu>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method assembly hidebysig specialname instance object __DebugDisplay() 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 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: ldarg.0 - IL_0001: newobj instance void MyTestModule/MyDu/JustInt::.ctor(int32) - IL_0006: ret + 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance bool get_IsJustInt() cil managed @@ -384,19 +401,17 @@ IL_0009: ret } - .method public static class MyTestModule/MyDu NewMaybeString(string _nullableString) cil managed + .method public hidebysig instance bool get_IsJustLabel() 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 ) - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: newobj instance void MyTestModule/MyDu/MaybeString::.ctor(string) - IL_0006: ret + IL_0001: isinst MyTestModule/MyDu/_JustLabel + IL_0006: ldnull + IL_0007: cgt.un + IL_0009: ret } .method public hidebysig instance bool get_IsMaybeString() cil managed @@ -412,6 +427,18 @@ IL_0009: ret } + .method public static class MyTestModule/MyDu get_JustLabel() 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 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 MyTestModule/MyDu MyTestModule/MyDu::_unique_JustLabel + IL_0005: ret + } + .method public hidebysig instance int32 get_Tag() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -436,33 +463,6 @@ IL_0017: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 MyTestModule/MyDu>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret - } - .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -506,39 +506,24 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 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 ) + 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field assembly initonly string _nullableString - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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 public static class MyTestModule/SingleCaseDu NewSingleCaseItIs(string _nullableString) 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 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 ) - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void MyTestModule/SingleCaseDu::.ctor(string) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(string _nullableString) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 19 4D 79 54 65 73 74 4D 6F 64 - 75 6C 65 2B 53 69 6E 67 6C 65 43 61 73 65 44 75 - 00 00 ) + .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 19 4D 79 54 65 73 74 4D 6F 64 + 75 6C 65 2B 53 69 6E 67 6C 65 43 61 73 65 44 75 + 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 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -549,29 +534,32 @@ IL_000d: ret } - .method public hidebysig instance string get_nullableString() cil managed + .method public static class MyTestModule/SingleCaseDu NewSingleCaseItIs(string _nullableString) 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 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 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld string MyTestModule/SingleCaseDu::_nullableString + IL_0001: newobj instance void MyTestModule/SingleCaseDu::.ctor(string) IL_0006: ret } - .method public hidebysig instance int32 get_Tag() cil managed + .method public strict virtual instance string ToString() 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: pop - IL_0002: ldc.i4.0 - IL_0003: ret + 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 MyTestModule/SingleCaseDu>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret } .method assembly hidebysig specialname instance object __DebugDisplay() cil managed @@ -588,17 +576,29 @@ IL_0015: ret } - .method public strict virtual instance string ToString() cil managed + .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: 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 MyTestModule/SingleCaseDu>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + + .method public hidebysig instance string get_nullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string MyTestModule/SingleCaseDu::_nullableString + IL_0006: ret } .property instance int32 Tag() @@ -613,13 +613,24 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32, int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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 ) .get instance string MyTestModule/SingleCaseDu::get_nullableString() } } + .method public static class MyTestModule/MyDu createMaybeString(string innerValue) cil managed + { + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class MyTestModule/MyDu MyTestModule/MyDu::NewMaybeString(string) + IL_0006: ret + } + .method public static class MyTestModule/MyDu giveMeLabel() cil managed { @@ -638,23 +649,12 @@ IL_000c: ret } - .method public static class MyTestModule/MyDu createMaybeString(string innerValue) cil managed - { - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call class MyTestModule/MyDu MyTestModule/MyDu::NewMaybeString(string) - IL_0006: ret - } - .method public static string processNullableDu(class MyTestModule/MyDu x) cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 5 .locals init (class MyTestModule/MyDu V_0, @@ -722,162 +722,6 @@ { } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret - } - - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret - } - -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - -} - - 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..b97bd73648a 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 @@ -333,42 +333,59 @@ IL_0006: ret } - .method public static class MyTestModule/MyDu get_JustLabel() cil managed + .method public static class MyTestModule/MyDu NewJustInt(int32 item) 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 00 00 00 00 00 00 ) + 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 MyTestModule/MyDu MyTestModule/MyDu::_unique_JustLabel - IL_0005: ret + IL_0000: ldarg.0 + IL_0001: newobj instance void MyTestModule/MyDu/JustInt::.ctor(int32) + IL_0006: ret } - .method public hidebysig instance bool get_IsJustLabel() cil managed + .method public static class MyTestModule/MyDu NewMaybeString(string _nullableString) 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 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: isinst MyTestModule/MyDu/_JustLabel - IL_0006: ldnull - IL_0007: cgt.un - IL_0009: ret + IL_0001: newobj instance void MyTestModule/MyDu/MaybeString::.ctor(string) + IL_0006: ret } - .method public static class MyTestModule/MyDu NewJustInt(int32 item) cil managed + .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 MyTestModule/MyDu>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method assembly hidebysig specialname instance object __DebugDisplay() 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 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: ldarg.0 - IL_0001: newobj instance void MyTestModule/MyDu/JustInt::.ctor(int32) - IL_0006: ret + 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance bool get_IsJustInt() cil managed @@ -384,19 +401,17 @@ IL_0009: ret } - .method public static class MyTestModule/MyDu NewMaybeString(string _nullableString) cil managed + .method public hidebysig instance bool get_IsJustLabel() 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 ) - .param [1] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: newobj instance void MyTestModule/MyDu/MaybeString::.ctor(string) - IL_0006: ret + IL_0001: isinst MyTestModule/MyDu/_JustLabel + IL_0006: ldnull + IL_0007: cgt.un + IL_0009: ret } .method public hidebysig instance bool get_IsMaybeString() cil managed @@ -412,6 +427,18 @@ IL_0009: ret } + .method public static class MyTestModule/MyDu get_JustLabel() 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 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 MyTestModule/MyDu MyTestModule/MyDu::_unique_JustLabel + IL_0005: ret + } + .method public hidebysig instance int32 get_Tag() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -436,33 +463,6 @@ IL_0017: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 MyTestModule/MyDu>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret - } - .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -514,21 +514,6 @@ .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 public static class MyTestModule/SingleCaseDu NewSingleCaseItIs(string _nullableString) 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 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 ) - .param [1] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void MyTestModule/SingleCaseDu::.ctor(string) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(string _nullableString) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -549,29 +534,32 @@ IL_000d: ret } - .method public hidebysig instance string get_nullableString() cil managed + .method public static class MyTestModule/SingleCaseDu NewSingleCaseItIs(string _nullableString) 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 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 ) - .param [0] + .param [1] .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld string MyTestModule/SingleCaseDu::_nullableString + IL_0001: newobj instance void MyTestModule/SingleCaseDu::.ctor(string) IL_0006: ret } - .method public hidebysig instance int32 get_Tag() cil managed + .method public strict virtual instance string ToString() 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: pop - IL_0002: ldc.i4.0 - IL_0003: ret + 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 MyTestModule/SingleCaseDu>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret } .method assembly hidebysig specialname instance object __DebugDisplay() cil managed @@ -588,17 +576,29 @@ IL_0015: ret } - .method public strict virtual instance string ToString() cil managed + .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: 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 MyTestModule/SingleCaseDu>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + + .method public hidebysig instance string get_nullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string MyTestModule/SingleCaseDu::_nullableString + IL_0006: ret } .property instance int32 Tag() @@ -620,6 +620,17 @@ } } + .method public static class MyTestModule/MyDu createMaybeString(string innerValue) cil managed + { + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class MyTestModule/MyDu MyTestModule/MyDu::NewMaybeString(string) + IL_0006: ret + } + .method public static class MyTestModule/MyDu giveMeLabel() cil managed { @@ -638,17 +649,6 @@ IL_000c: ret } - .method public static class MyTestModule/MyDu createMaybeString(string innerValue) cil managed - { - .param [1] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call class MyTestModule/MyDu MyTestModule/MyDu::NewMaybeString(string) - IL_0006: ret - } - .method public static string processNullableDu(class MyTestModule/MyDu x) cil managed { .param [0] @@ -726,4 +726,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/StructDU.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/StructDU.fs.il.net472.bsl index 9ee35c80b50..943efe29dcc 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/StructDU.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/StructDU.fs.il.net472.bsl @@ -26,7 +26,7 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .class sequential autochar serializable sealed nested public beforefieldinit Myassembly extends [runtime]System.ValueType { @@ -34,9 +34,9 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 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 ) + 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .class abstract auto ansi sealed nested public Tags extends [runtime]System.Object { @@ -46,12 +46,12 @@ } .field assembly string _nonNullableString - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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 assembly string _nullableString - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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 ) @@ -59,30 +59,19 @@ .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 public static valuetype MyTestModule/Myassembly get_A() 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 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: ldc.i4.0 - IL_0001: newobj instance void MyTestModule/Myassembly::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsA() cil managed + .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 60 06 00 00 17 4D 79 54 65 73 74 4D 6F 64 + 75 6C 65 2B 4D 79 53 74 72 75 63 74 44 55 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 int32 MyTestModule/Myassembly::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret + IL_0001: ldarg.1 + IL_0002: stfld int32 MyTestModule/Myassembly::_tag + IL_0007: ret } .method public static valuetype MyTestModule/Myassembly NewB(string _nonNullableString) cil managed @@ -106,23 +95,6 @@ IL_0019: ret } - .method public hidebysig instance bool get_IsB() cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::.ctor(bool, - string[]) = ( 01 00 01 02 00 00 00 11 6E 6F 6E 4E 75 6C 6C 61 - 62 6C 65 53 74 72 69 6E 67 12 5F 6E 6F 6E 4E 75 - 6C 6C 61 62 6C 65 53 74 72 69 6E 67 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 int32 MyTestModule/Myassembly::get_Tag() - IL_0006: ldc.i4.1 - IL_0007: ceq - IL_0009: ret - } - .method public static valuetype MyTestModule/Myassembly NewC(string _nullableString) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -130,7 +102,7 @@ .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 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 2 .locals init (valuetype MyTestModule/Myassembly V_0) @@ -146,58 +118,99 @@ IL_0019: ret } - .method public hidebysig instance bool get_IsC() cil managed + .method public hidebysig virtual instance string ToString() cil managed + { + + .maxstack 3 + .locals init (valuetype MyTestModule/Myassembly V_0) + IL_0000: ldarg.0 + IL_0001: ldobj MyTestModule/Myassembly + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: call instance int32 MyTestModule/Myassembly::get_Tag() + IL_000d: switch ( + IL_001e, + IL_0024, + IL_002a) + IL_001e: ldstr "A" + IL_0023: ret + + IL_0024: ldstr "B" + IL_0029: ret + + IL_002a: ldstr "C" + IL_002f: 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: ldarg.0 - IL_0001: call instance int32 MyTestModule/Myassembly::get_Tag() - IL_0006: ldc.i4.2 - IL_0007: ceq - IL_0009: ret + 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj MyTestModule/Myassembly + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret } - .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed + .method public static valuetype MyTestModule/Myassembly get_A() 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 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: ldc.i4.0 + IL_0001: newobj instance void MyTestModule/Myassembly::.ctor(int32) + IL_0006: ret + } + + .method public hidebysig instance bool get_IsA() cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 17 4D 79 54 65 73 74 4D 6F 64 - 75 6C 65 2B 4D 79 53 74 72 75 63 74 44 55 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: ldarg.1 - IL_0002: stfld int32 MyTestModule/Myassembly::_tag - IL_0007: ret + IL_0001: call instance int32 MyTestModule/Myassembly::get_Tag() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret } - .method public hidebysig instance string get_nonNullableString() cil managed + .method public hidebysig instance bool get_IsB() cil managed { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::.ctor(bool, + string[]) = ( 01 00 01 02 00 00 00 11 6E 6F 6E 4E 75 6C 6C 61 + 62 6C 65 53 74 72 69 6E 67 12 5F 6E 6F 6E 4E 75 + 6C 6C 61 62 6C 65 53 74 72 69 6E 67 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 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld string MyTestModule/Myassembly::_nonNullableString - IL_0006: ret + IL_0001: call instance int32 MyTestModule/Myassembly::get_Tag() + IL_0006: ldc.i4.1 + IL_0007: ceq + IL_0009: ret } - .method public hidebysig instance string get_nullableString() cil managed + .method public hidebysig instance bool get_IsC() 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 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld string MyTestModule/Myassembly::_nullableString - IL_0006: ret + IL_0001: call instance int32 MyTestModule/Myassembly::get_Tag() + IL_0006: ldc.i4.2 + IL_0007: ceq + IL_0009: ret } .method public hidebysig instance int32 get_Tag() cil managed @@ -211,43 +224,30 @@ IL_0006: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .method public hidebysig instance string get_nonNullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj MyTestModule/Myassembly - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret + IL_0000: ldarg.0 + IL_0001: ldfld string MyTestModule/Myassembly::_nonNullableString + IL_0006: ret } - .method public hidebysig virtual instance string ToString() cil managed + .method public hidebysig instance string get_nullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .maxstack 3 - .locals init (valuetype MyTestModule/Myassembly V_0) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldobj MyTestModule/Myassembly - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: call instance int32 MyTestModule/Myassembly::get_Tag() - IL_000d: switch ( - IL_001e, - IL_0024, - IL_002a) - IL_001e: ldstr "A" - IL_0023: ret - - IL_0024: ldstr "B" - IL_0029: ret - - IL_002a: ldstr "C" - IL_002f: ret + IL_0001: ldfld string MyTestModule/Myassembly::_nullableString + IL_0006: ret } .property instance int32 Tag() @@ -274,10 +274,10 @@ } .property instance bool IsB() { - .custom instance void System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::.ctor(bool, - string[]) = ( 01 00 01 02 00 00 00 11 6E 6F 6E 4E 75 6C 6C 61 - 62 6C 65 53 74 72 69 6E 67 12 5F 6E 6F 6E 4E 75 - 6C 6C 61 62 6C 65 53 74 72 69 6E 67 00 00 ) + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::.ctor(bool, + string[]) = ( 01 00 01 02 00 00 00 11 6E 6F 6E 4E 75 6C 6C 61 + 62 6C 65 53 74 72 69 6E 67 12 5F 6E 6F 6E 4E 75 + 6C 6C 61 62 6C 65 53 74 72 69 6E 67 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.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -292,7 +292,7 @@ } .property instance string nonNullableString() { - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32, int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 ) @@ -305,7 +305,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32, int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 00 00 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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 ) .get instance string MyTestModule/Myassembly::get_nullableString() @@ -319,11 +319,11 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 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 ) + 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .field assembly string _nullableString - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .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 ) @@ -334,7 +334,7 @@ .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 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 2 .locals init (valuetype MyTestModule/SingleCaseStructDu V_0) @@ -347,29 +347,18 @@ IL_0011: ret } - .method public hidebysig instance string get_nullableString() 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 ) - .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld string MyTestModule/SingleCaseStructDu::_nullableString - IL_0006: ret - } - - .method public hidebysig instance int32 get_Tag() cil managed + .method public strict virtual instance string ToString() 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: pop - IL_0002: ldc.i4.0 - IL_0003: ret + 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,valuetype MyTestModule/SingleCaseStructDu>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj MyTestModule/SingleCaseStructDu + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret } .method assembly hidebysig specialname instance object __DebugDisplay() cil managed @@ -387,18 +376,29 @@ IL_001a: ret } - .method public strict virtual instance string ToString() cil managed + .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: ldstr "%+A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype MyTestModule/SingleCaseStructDu>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj MyTestModule/SingleCaseStructDu - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + + .method public hidebysig instance string get_nullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string MyTestModule/SingleCaseStructDu::_nullableString + IL_0006: ret } .property instance int32 Tag() @@ -413,26 +413,17 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32, int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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 ) .get instance string MyTestModule/SingleCaseStructDu::get_nullableString() } } - .method public static string printMyDu(valuetype MyTestModule/Myassembly x) cil managed - { - - .maxstack 8 - IL_0000: ldarga.s x - IL_0002: call instance string MyTestModule/Myassembly::ToString() - IL_0007: ret - } - .method public static string getVal(valuetype MyTestModule/Myassembly x) cil managed { .param [0] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 3 .locals init (valuetype MyTestModule/Myassembly V_0, @@ -458,233 +449,23 @@ IL_0022: throw } -} - -.class private abstract auto ansi sealed ''.$MyTestModule - extends [runtime]System.Object -{ -} - -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private bool ReturnValue@ - .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 private string[] Members@ - .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 public specialname rtspecialname instance void .ctor(bool ReturnValue, string[] Members) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld bool System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::ReturnValue@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld string[] System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::Members@ - IL_0014: ret - } - - .method public hidebysig specialname instance string[] get_Members() 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 string[] System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::Members@ - IL_0006: ret - } - - .method public hidebysig specialname instance bool get_ReturnValue() 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 bool System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::ReturnValue@ - IL_0006: ret - } - - .property instance bool ReturnValue() - { - .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 ) - .get instance bool System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::get_ReturnValue() - } - .property instance string[] Members() - { - .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 ) - .get instance string[] System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::get_Members() - } -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret - } - - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) cil managed + .method public static string printMyDu(valuetype MyTestModule/Myassembly 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret + IL_0000: ldarga.s x + IL_0002: call instance string MyTestModule/Myassembly::ToString() + IL_0007: ret } } -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute +.class private abstract auto ansi sealed ''.$MyTestModule + extends [runtime]System.Object { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - } - 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..943efe29dcc 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 @@ -59,30 +59,19 @@ .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 public static valuetype MyTestModule/Myassembly get_A() 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 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: ldc.i4.0 - IL_0001: newobj instance void MyTestModule/Myassembly::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsA() cil managed + .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 60 06 00 00 17 4D 79 54 65 73 74 4D 6F 64 + 75 6C 65 2B 4D 79 53 74 72 75 63 74 44 55 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 int32 MyTestModule/Myassembly::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret + IL_0001: ldarg.1 + IL_0002: stfld int32 MyTestModule/Myassembly::_tag + IL_0007: ret } .method public static valuetype MyTestModule/Myassembly NewB(string _nonNullableString) cil managed @@ -106,23 +95,6 @@ IL_0019: ret } - .method public hidebysig instance bool get_IsB() cil managed - { - .custom instance void [runtime]System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::.ctor(bool, - string[]) = ( 01 00 01 02 00 00 00 11 6E 6F 6E 4E 75 6C 6C 61 - 62 6C 65 53 74 72 69 6E 67 12 5F 6E 6F 6E 4E 75 - 6C 6C 61 62 6C 65 53 74 72 69 6E 67 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 int32 MyTestModule/Myassembly::get_Tag() - IL_0006: ldc.i4.1 - IL_0007: ceq - IL_0009: ret - } - .method public static valuetype MyTestModule/Myassembly NewC(string _nullableString) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -146,58 +118,99 @@ IL_0019: ret } - .method public hidebysig instance bool get_IsC() cil managed + .method public hidebysig virtual instance string ToString() cil managed + { + + .maxstack 3 + .locals init (valuetype MyTestModule/Myassembly V_0) + IL_0000: ldarg.0 + IL_0001: ldobj MyTestModule/Myassembly + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: call instance int32 MyTestModule/Myassembly::get_Tag() + IL_000d: switch ( + IL_001e, + IL_0024, + IL_002a) + IL_001e: ldstr "A" + IL_0023: ret + + IL_0024: ldstr "B" + IL_0029: ret + + IL_002a: ldstr "C" + IL_002f: 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: ldarg.0 - IL_0001: call instance int32 MyTestModule/Myassembly::get_Tag() - IL_0006: ldc.i4.2 - IL_0007: ceq - IL_0009: ret + 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj MyTestModule/Myassembly + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret } - .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed + .method public static valuetype MyTestModule/Myassembly get_A() 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 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: ldc.i4.0 + IL_0001: newobj instance void MyTestModule/Myassembly::.ctor(int32) + IL_0006: ret + } + + .method public hidebysig instance bool get_IsA() 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 17 4D 79 54 65 73 74 4D 6F 64 - 75 6C 65 2B 4D 79 53 74 72 75 63 74 44 55 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: ldarg.1 - IL_0002: stfld int32 MyTestModule/Myassembly::_tag - IL_0007: ret + IL_0001: call instance int32 MyTestModule/Myassembly::get_Tag() + IL_0006: ldc.i4.0 + IL_0007: ceq + IL_0009: ret } - .method public hidebysig instance string get_nonNullableString() cil managed + .method public hidebysig instance bool get_IsB() cil managed { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute::.ctor(bool, + string[]) = ( 01 00 01 02 00 00 00 11 6E 6F 6E 4E 75 6C 6C 61 + 62 6C 65 53 74 72 69 6E 67 12 5F 6E 6F 6E 4E 75 + 6C 6C 61 62 6C 65 53 74 72 69 6E 67 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 ) - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld string MyTestModule/Myassembly::_nonNullableString - IL_0006: ret + IL_0001: call instance int32 MyTestModule/Myassembly::get_Tag() + IL_0006: ldc.i4.1 + IL_0007: ceq + IL_0009: ret } - .method public hidebysig instance string get_nullableString() cil managed + .method public hidebysig instance bool get_IsC() 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 ) - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld string MyTestModule/Myassembly::_nullableString - IL_0006: ret + IL_0001: call instance int32 MyTestModule/Myassembly::get_Tag() + IL_0006: ldc.i4.2 + IL_0007: ceq + IL_0009: ret } .method public hidebysig instance int32 get_Tag() cil managed @@ -211,43 +224,30 @@ IL_0006: ret } - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed + .method public hidebysig instance string get_nonNullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj MyTestModule/Myassembly - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret + IL_0000: ldarg.0 + IL_0001: ldfld string MyTestModule/Myassembly::_nonNullableString + IL_0006: ret } - .method public hidebysig virtual instance string ToString() cil managed + .method public hidebysig instance string get_nullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .maxstack 3 - .locals init (valuetype MyTestModule/Myassembly V_0) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldobj MyTestModule/Myassembly - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: call instance int32 MyTestModule/Myassembly::get_Tag() - IL_000d: switch ( - IL_001e, - IL_0024, - IL_002a) - IL_001e: ldstr "A" - IL_0023: ret - - IL_0024: ldstr "B" - IL_0029: ret - - IL_002a: ldstr "C" - IL_002f: ret + IL_0001: ldfld string MyTestModule/Myassembly::_nullableString + IL_0006: ret } .property instance int32 Tag() @@ -347,29 +347,18 @@ IL_0011: ret } - .method public hidebysig instance string get_nullableString() 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 ) - .param [0] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld string MyTestModule/SingleCaseStructDu::_nullableString - IL_0006: ret - } - - .method public hidebysig instance int32 get_Tag() cil managed + .method public strict virtual instance string ToString() 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: pop - IL_0002: ldc.i4.0 - IL_0003: ret + 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,valuetype MyTestModule/SingleCaseStructDu>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: ldobj MyTestModule/SingleCaseStructDu + IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001a: ret } .method assembly hidebysig specialname instance object __DebugDisplay() cil managed @@ -387,18 +376,29 @@ IL_001a: ret } - .method public strict virtual instance string ToString() cil managed + .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: ldstr "%+A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,valuetype MyTestModule/SingleCaseStructDu>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: ldobj MyTestModule/SingleCaseStructDu - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: ret + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + + .method public hidebysig instance string get_nullableString() 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 ) + .param [0] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string MyTestModule/SingleCaseStructDu::_nullableString + IL_0006: ret } .property instance int32 Tag() @@ -420,15 +420,6 @@ } } - .method public static string printMyDu(valuetype MyTestModule/Myassembly x) cil managed - { - - .maxstack 8 - IL_0000: ldarga.s x - IL_0002: call instance string MyTestModule/Myassembly::ToString() - IL_0007: ret - } - .method public static string getVal(valuetype MyTestModule/Myassembly x) cil managed { .param [0] @@ -458,6 +449,15 @@ IL_0022: throw } + .method public static string printMyDu(valuetype MyTestModule/Myassembly x) cil managed + { + + .maxstack 8 + IL_0000: ldarga.s x + IL_0002: call instance string MyTestModule/Myassembly::ToString() + IL_0007: ret + } + } .class private abstract auto ansi sealed ''.$MyTestModule @@ -469,4 +469,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/SupportsNull.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/SupportsNull.fs.il.net472.bsl index e3f57f3276f..c52ea0f7562 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/SupportsNull.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/SupportsNull.fs.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .hash algorithm 0x00008004 @@ -26,79 +27,74 @@ 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 ) - .custom instance void System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public static !!a iCanProduceNullSometimes(!!a arg) cil managed + .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .method public static !!b fullyInferredTestCase(!!a arg1, + !!b arg2) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .param type b + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .maxstack 4 - .locals init (!!a V_0, - valuetype [runtime]System.DateTime V_1, - valuetype [runtime]System.DateTime V_2, - !!a V_3) - IL_0000: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() - IL_0005: stloc.1 - IL_0006: ldloca.s V_1 - IL_0008: call instance int32 [runtime]System.DateTime::get_Hour() - IL_000d: ldc.i4.7 - IL_000e: bne.un.s IL_0014 - - IL_0010: ldarg.0 + .maxstack 3 + .locals init (!!b V_0) + IL_0000: ldarg.0 + IL_0001: call int32 MyTestModule::iAcceptNullPartiallyInferredFromUnderscore(!!0) + IL_0006: call void [runtime]System.Console::Write(int32) + IL_000b: ldarg.1 + IL_000c: call !!0 MyTestModule::iCanProduceNullSometimes(!!0) IL_0011: stloc.0 - IL_0012: br.s IL_0014 - - IL_0014: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() - IL_0019: stloc.2 - IL_001a: ldloca.s V_2 - IL_001c: call instance int32 [runtime]System.DateTime::get_Hour() - IL_0021: ldc.i4.7 - IL_0022: bne.un.s IL_0026 - - IL_0024: ldloc.3 - IL_0025: ret - - IL_0026: ldarg.0 - IL_0027: ret + IL_0012: ldloc.0 + IL_0013: ret } - .method public static string iPatternMatchOnArg(!!a arg) cil managed + .method public static int32 iAcceptNullExplicitAnnotation(!!T arg) cil managed { - .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param type T + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .maxstack 8 + .maxstack 3 + .locals init (!!T V_0) IL_0000: ldarg.0 - IL_0001: box !!a - IL_0006: brfalse.s IL_000a + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: box !!T + IL_0008: brtrue.s IL_000d - IL_0008: br.s IL_0010 + IL_000a: ldc.i4.1 + IL_000b: br.s IL_000e - IL_000a: ldstr "null" - IL_000f: ret + IL_000d: ldc.i4.0 + IL_000e: brfalse.s IL_0012 - IL_0010: ldstr "not null" - IL_0015: ret + IL_0010: ldc.i4.1 + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret } - .method public static int32 iAcceptNullPartiallyInferredFromUnderscore(!!a arg) cil managed + .method public static int32 iAcceptNullPartiallyInferredFromNamedTypar(!!a arg) cil managed { .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldc.i4.0 IL_0001: ret } - .method public static int32 iAcceptNullPartiallyInferredFromNamedTypar(!!a arg) cil managed + .method public static int32 iAcceptNullPartiallyInferredFromUnderscore(!!a arg) cil managed { .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 8 IL_0000: ldc.i4.0 @@ -108,9 +104,9 @@ .method public static int32 iAcceptNullWithNullAnnotation(!!a arg) cil managed { .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) .maxstack 3 .locals init (!!a V_0) @@ -133,59 +129,64 @@ IL_0013: ret } - .method public static int32 iAcceptNullExplicitAnnotation(!!T arg) cil managed + .method public static !!a iCanProduceNullSometimes(!!a arg) cil managed { - .param type T - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param type a + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .maxstack 3 - .locals init (!!T V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: box !!T - IL_0008: brtrue.s IL_000d + .maxstack 4 + .locals init (!!a V_0, + valuetype [runtime]System.DateTime V_1, + valuetype [runtime]System.DateTime V_2, + !!a V_3) + IL_0000: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0005: stloc.1 + IL_0006: ldloca.s V_1 + IL_0008: call instance int32 [runtime]System.DateTime::get_Hour() + IL_000d: ldc.i4.7 + IL_000e: bne.un.s IL_0014 - IL_000a: ldc.i4.1 - IL_000b: br.s IL_000e + IL_0010: ldarg.0 + IL_0011: stloc.0 + IL_0012: br.s IL_0014 - IL_000d: ldc.i4.0 - IL_000e: brfalse.s IL_0012 + IL_0014: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0019: stloc.2 + IL_001a: ldloca.s V_2 + IL_001c: call instance int32 [runtime]System.DateTime::get_Hour() + IL_0021: ldc.i4.7 + IL_0022: bne.un.s IL_0026 - IL_0010: ldc.i4.1 - IL_0011: ret + IL_0024: ldloc.3 + IL_0025: ret - IL_0012: ldc.i4.0 - IL_0013: ret + IL_0026: ldarg.0 + IL_0027: ret } - .method public static !!b fullyInferredTestCase(!!a arg1, - !!b arg2) cil managed + .method public static string iPatternMatchOnArg(!!a arg) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .param type b - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .param [1] - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .maxstack 3 - .locals init (!!b V_0) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: call int32 MyTestModule::iAcceptNullPartiallyInferredFromUnderscore(!!0) - IL_0006: call void [runtime]System.Console::Write(int32) - IL_000b: ldarg.1 - IL_000c: call !!0 MyTestModule::iCanProduceNullSometimes(!!0) - IL_0011: stloc.0 - IL_0012: ldloc.0 - IL_0013: ret + IL_0001: box !!a + IL_0006: brfalse.s IL_000a + + IL_0008: br.s IL_0010 + + IL_000a: ldstr "null" + IL_000f: ret + + IL_0010: ldstr "not null" + IL_0015: ret } .method public static int32 structShouldBeAllowedHere(!!a arg) cil managed { .param type a - .custom instance void System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 00 00 00 ) .maxstack 3 .locals init (object V_0) @@ -204,72 +205,6 @@ { } -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8[] NullableFlags - .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 public specialname rtspecialname instance void .ctor(uint8 scalarByteValue) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: newarr [runtime]System.Byte - IL_000d: dup - IL_000e: ldc.i4.0 - IL_000f: ldarg.1 - IL_0010: stelem.i1 - IL_0011: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_0016: ret - } - - .method public specialname rtspecialname instance void .ctor(uint8[] NullableFlags) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8[] System.Runtime.CompilerServices.NullableAttribute::NullableFlags - IL_000d: ret - } - -} - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.NullableContextAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public uint8 Flag - .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 public specialname rtspecialname instance void .ctor(uint8 Flag) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld uint8 System.Runtime.CompilerServices.NullableContextAttribute::Flag - IL_000d: ret - } - -} - - 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..c52ea0f7562 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 @@ -28,61 +28,56 @@ { .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 ) .custom instance void [runtime]System.Runtime.CompilerServices.NullableContextAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .method public static !!a iCanProduceNullSometimes(!!a arg) cil managed + .method public static !!b fullyInferredTestCase(!!a arg1, + !!b arg2) cil managed { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .param type a + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) + .param type b .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) + .param [1] + .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .maxstack 4 - .locals init (!!a V_0, - valuetype [runtime]System.DateTime V_1, - valuetype [runtime]System.DateTime V_2, - !!a V_3) - IL_0000: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() - IL_0005: stloc.1 - IL_0006: ldloca.s V_1 - IL_0008: call instance int32 [runtime]System.DateTime::get_Hour() - IL_000d: ldc.i4.7 - IL_000e: bne.un.s IL_0014 - - IL_0010: ldarg.0 + .maxstack 3 + .locals init (!!b V_0) + IL_0000: ldarg.0 + IL_0001: call int32 MyTestModule::iAcceptNullPartiallyInferredFromUnderscore(!!0) + IL_0006: call void [runtime]System.Console::Write(int32) + IL_000b: ldarg.1 + IL_000c: call !!0 MyTestModule::iCanProduceNullSometimes(!!0) IL_0011: stloc.0 - IL_0012: br.s IL_0014 - - IL_0014: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() - IL_0019: stloc.2 - IL_001a: ldloca.s V_2 - IL_001c: call instance int32 [runtime]System.DateTime::get_Hour() - IL_0021: ldc.i4.7 - IL_0022: bne.un.s IL_0026 - - IL_0024: ldloc.3 - IL_0025: ret - - IL_0026: ldarg.0 - IL_0027: ret + IL_0012: ldloc.0 + IL_0013: ret } - .method public static string iPatternMatchOnArg(!!a arg) cil managed + .method public static int32 iAcceptNullExplicitAnnotation(!!T arg) cil managed { - .param type a + .param type T .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .maxstack 8 + .maxstack 3 + .locals init (!!T V_0) IL_0000: ldarg.0 - IL_0001: box !!a - IL_0006: brfalse.s IL_000a + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: box !!T + IL_0008: brtrue.s IL_000d - IL_0008: br.s IL_0010 + IL_000a: ldc.i4.1 + IL_000b: br.s IL_000e - IL_000a: ldstr "null" - IL_000f: ret + IL_000d: ldc.i4.0 + IL_000e: brfalse.s IL_0012 - IL_0010: ldstr "not null" - IL_0015: ret + IL_0010: ldc.i4.1 + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret } - .method public static int32 iAcceptNullPartiallyInferredFromUnderscore(!!a arg) cil managed + .method public static int32 iAcceptNullPartiallyInferredFromNamedTypar(!!a arg) cil managed { .param type a .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) @@ -94,7 +89,7 @@ IL_0001: ret } - .method public static int32 iAcceptNullPartiallyInferredFromNamedTypar(!!a arg) cil managed + .method public static int32 iAcceptNullPartiallyInferredFromUnderscore(!!a arg) cil managed { .param type a .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) @@ -134,53 +129,58 @@ IL_0013: ret } - .method public static int32 iAcceptNullExplicitAnnotation(!!T arg) cil managed + .method public static !!a iCanProduceNullSometimes(!!a arg) cil managed { - .param type T + .param type a .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .maxstack 3 - .locals init (!!T V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: box !!T - IL_0008: brtrue.s IL_000d + .maxstack 4 + .locals init (!!a V_0, + valuetype [runtime]System.DateTime V_1, + valuetype [runtime]System.DateTime V_2, + !!a V_3) + IL_0000: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0005: stloc.1 + IL_0006: ldloca.s V_1 + IL_0008: call instance int32 [runtime]System.DateTime::get_Hour() + IL_000d: ldc.i4.7 + IL_000e: bne.un.s IL_0014 - IL_000a: ldc.i4.1 - IL_000b: br.s IL_000e + IL_0010: ldarg.0 + IL_0011: stloc.0 + IL_0012: br.s IL_0014 - IL_000d: ldc.i4.0 - IL_000e: brfalse.s IL_0012 + IL_0014: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0019: stloc.2 + IL_001a: ldloca.s V_2 + IL_001c: call instance int32 [runtime]System.DateTime::get_Hour() + IL_0021: ldc.i4.7 + IL_0022: bne.un.s IL_0026 - IL_0010: ldc.i4.1 - IL_0011: ret + IL_0024: ldloc.3 + IL_0025: ret - IL_0012: ldc.i4.0 - IL_0013: ret + IL_0026: ldarg.0 + IL_0027: ret } - .method public static !!b fullyInferredTestCase(!!a arg1, - !!b arg2) cil managed + .method public static string iPatternMatchOnArg(!!a arg) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .param type a - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 01 00 00 ) - .param type b .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .param [1] - .custom instance void [runtime]System.Runtime.CompilerServices.NullableAttribute::.ctor(uint8) = ( 01 00 02 00 00 ) - .maxstack 3 - .locals init (!!b V_0) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: call int32 MyTestModule::iAcceptNullPartiallyInferredFromUnderscore(!!0) - IL_0006: call void [runtime]System.Console::Write(int32) - IL_000b: ldarg.1 - IL_000c: call !!0 MyTestModule::iCanProduceNullSometimes(!!0) - IL_0011: stloc.0 - IL_0012: ldloc.0 - IL_0013: ret + IL_0001: box !!a + IL_0006: brfalse.s IL_000a + + IL_0008: br.s IL_0010 + + IL_000a: ldstr "null" + IL_000f: ret + + IL_0010: ldstr "not null" + IL_0015: ret } .method public static int32 structShouldBeAllowedHere(!!a arg) cil managed @@ -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..340a5ebf74a 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 @@ -64,6 +64,16 @@ IL_0014: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.2 + IL_0002: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -105,13 +115,16 @@ IL_003f: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.2 - IL_0002: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc + IL_0000: ldc.i4.0 + IL_0001: ldc.i4.0 + IL_0002: newobj instance void SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::.ctor(int32, + int32) IL_0007: ret } @@ -157,19 +170,17 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.0 - IL_0001: ldc.i4.0 - IL_0002: newobj instance void SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::.ctor(int32, - int32) - 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 public static class [runtime]System.Collections.Generic.IEnumerable`1 f0() cil managed @@ -185,6 +196,17 @@ } + .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 + } + } .class private abstract auto ansi sealed ''.$SeqExpressionSteppingTest1 @@ -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..3da3a3d181d 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 @@ -64,6 +64,16 @@ IL_0014: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.2 + IL_0002: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -105,13 +115,16 @@ IL_003f: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.2 - IL_0002: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc + IL_0000: ldc.i4.0 + IL_0001: ldc.i4.0 + IL_0002: newobj instance void SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::.ctor(int32, + int32) IL_0007: ret } @@ -157,41 +170,28 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.0 - IL_0001: ldc.i4.0 - IL_0002: newobj instance void SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::.ctor(int32, - int32) - IL_0007: ret - } - } - .method public static class [runtime]System.Collections.Generic.IEnumerable`1 f0() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 IL_0000: ldc.i4.0 - IL_0001: ldc.i4.0 - IL_0002: newobj instance void SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::.ctor(int32, - int32) - IL_0007: ret + 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 + .method public static class [runtime]System.Collections.Generic.IEnumerable`1 f0() 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 + IL_0001: ldc.i4.0 + IL_0002: newobj instance void SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::.ctor(int32, + int32) + IL_0007: ret } .method assembly static void staticInitialization@() cil managed @@ -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..d90fc834545 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 @@ -64,6 +64,16 @@ IL_0014: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -126,13 +136,16 @@ IL_0076: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.3 - IL_0002: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_0000: ldc.i4.0 + IL_0001: ldc.i4.0 + IL_0002: newobj instance void SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::.ctor(int32, + int32) IL_0007: ret } @@ -185,19 +198,17 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.0 - IL_0001: ldc.i4.0 - IL_0002: newobj instance void SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::.ctor(int32, - int32) - 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 public static class [runtime]System.Collections.Generic.IEnumerable`1 f1() cil managed @@ -213,6 +224,17 @@ } + .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 + } + } .class private abstract auto ansi sealed ''.$SeqExpressionSteppingTest2 @@ -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..eb5842df622 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 @@ -64,6 +64,16 @@ IL_0014: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -126,13 +136,16 @@ IL_0076: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.3 - IL_0002: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc + IL_0000: ldc.i4.0 + IL_0001: ldc.i4.0 + IL_0002: newobj instance void SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::.ctor(int32, + int32) IL_0007: ret } @@ -185,41 +198,28 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.0 - IL_0001: ldc.i4.0 - IL_0002: newobj instance void SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::.ctor(int32, - int32) - IL_0007: ret - } - } - .method public static class [runtime]System.Collections.Generic.IEnumerable`1 f1() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 IL_0000: ldc.i4.0 - IL_0001: ldc.i4.0 - IL_0002: newobj instance void SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::.ctor(int32, - int32) - IL_0007: ret + 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 + .method public static class [runtime]System.Collections.Generic.IEnumerable`1 f1() 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 + IL_0001: ldc.i4.0 + IL_0002: newobj instance void SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::.ctor(int32, + int32) + IL_0007: ret } .method assembly static void staticInitialization@() cil managed @@ -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..b74e0787a5f 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 @@ -71,6 +71,16 @@ IL_001b: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.2 + IL_0002: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -134,14 +144,20 @@ IL_0081: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.2 - IL_0002: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::pc - IL_0007: ret + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x + IL_0006: ldc.i4.0 + IL_0007: ldc.i4.0 + IL_0008: newobj instance void SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + int32, + int32) + IL_000d: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -186,22 +202,17 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x - IL_0006: ldc.i4.0 - IL_0007: ldc.i4.0 - IL_0008: newobj instance void SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, - int32, - int32) - IL_000d: 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 public static class [runtime]System.Collections.Generic.IEnumerable`1 f2() cil managed @@ -223,6 +234,17 @@ } + .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 + } + } .class private abstract auto ansi sealed ''.$SeqExpressionSteppingTest3 @@ -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..8b15887920f 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 @@ -71,6 +71,16 @@ IL_001b: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.2 + IL_0002: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -134,14 +144,20 @@ IL_0081: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.2 - IL_0002: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::pc - IL_0007: ret + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x + IL_0006: ldc.i4.0 + IL_0007: ldc.i4.0 + IL_0008: newobj instance void SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + int32, + int32) + IL_000d: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -186,22 +202,17 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::x - IL_0006: ldc.i4.0 - IL_0007: ldc.i4.0 - IL_0008: newobj instance void SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@7::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, - int32, - int32) - IL_000d: 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 public static class [runtime]System.Collections.Generic.IEnumerable`1 f2() cil managed @@ -221,17 +232,6 @@ 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 assembly static void staticInitialization@() cil managed { @@ -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..f6406c71af5 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 @@ -76,6 +76,16 @@ IL_0023: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -171,14 +181,21 @@ IL_00d4: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.3 - IL_0002: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc - IL_0007: ret + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + int32, + int32) + IL_0009: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -230,23 +247,17 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldnull - IL_0001: ldnull - IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, - int32, - int32) - 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 public static class [runtime]System.Collections.Generic.IEnumerable`1 f3() cil managed @@ -266,6 +277,17 @@ } + .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 + } + } .class private abstract auto ansi sealed ''.$SeqExpressionSteppingTest4 @@ -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..0e741dec09f 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 @@ -76,6 +76,16 @@ IL_0023: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -171,14 +181,21 @@ IL_00d4: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.3 - IL_0002: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::pc - IL_0007: ret + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + int32, + int32) + IL_0009: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -230,23 +247,17 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldnull - IL_0001: ldnull - IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, - int32, - int32) - 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 public static class [runtime]System.Collections.Generic.IEnumerable`1 f3() cil managed @@ -264,17 +275,6 @@ 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 assembly static void staticInitialization@() cil managed { @@ -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..d7bca489db3 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 @@ -76,6 +76,104 @@ IL_0023: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 7 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.Exception V_1) + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0006: ldc.i4.4 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 + + IL_0013: nop + IL_0014: br IL_00a1 + + IL_0019: nop + .try + { + IL_001a: ldarg.0 + IL_001b: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0020: switch ( + IL_003b, + IL_003e, + IL_0041, + IL_0044, + IL_0047) + IL_0039: br.s IL_004a + + IL_003b: nop + IL_003c: br.s IL_0081 + + IL_003e: nop + IL_003f: br.s IL_0051 + + IL_0041: nop + IL_0042: br.s IL_0050 + + IL_0044: nop + IL_0045: br.s IL_004d + + IL_0047: nop + IL_0048: br.s IL_0081 + + IL_004a: nop + IL_004b: br.s IL_004d + + IL_004d: nop + IL_004e: br.s IL_0051 + + IL_0050: nop + IL_0051: ldarg.0 + IL_0052: ldc.i4.4 + IL_0053: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0058: ldarg.0 + IL_0059: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_005e: ldarg.0 + IL_005f: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_0064: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0069: ldc.i4.1 + IL_006a: add + IL_006b: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_0070: ldstr "done" + IL_0075: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_007a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_007f: pop + IL_0080: nop + IL_0081: ldarg.0 + IL_0082: ldc.i4.4 + IL_0083: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0088: ldarg.0 + IL_0089: ldc.i4.0 + IL_008a: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current + IL_008f: leave.s IL_009b + + } + catch [runtime]System.Object + { + IL_0091: castclass [runtime]System.Exception + IL_0096: stloc.1 + IL_0097: ldloc.1 + IL_0098: stloc.0 + IL_0099: leave.s IL_009b + + } + IL_009b: nop + IL_009c: br IL_0000 + + IL_00a1: ldloc.0 + IL_00a2: brfalse.s IL_00a6 + + IL_00a4: ldloc.0 + IL_00a5: throw + + IL_00a6: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -185,102 +283,21 @@ IL_00fc: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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 7 - .locals init (class [runtime]System.Exception V_0, - class [runtime]System.Exception V_1) - IL_0000: ldarg.0 - IL_0001: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0006: ldc.i4.4 - IL_0007: sub - IL_0008: switch ( - IL_0013) - IL_0011: br.s IL_0019 - - IL_0013: nop - IL_0014: br IL_00a1 - - IL_0019: nop - .try - { - IL_001a: ldarg.0 - IL_001b: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0020: switch ( - IL_003b, - IL_003e, - IL_0041, - IL_0044, - IL_0047) - IL_0039: br.s IL_004a - - IL_003b: nop - IL_003c: br.s IL_0081 - - IL_003e: nop - IL_003f: br.s IL_0051 - - IL_0041: nop - IL_0042: br.s IL_0050 - - IL_0044: nop - IL_0045: br.s IL_004d - - IL_0047: nop - IL_0048: br.s IL_0081 - - IL_004a: nop - IL_004b: br.s IL_004d - - IL_004d: nop - IL_004e: br.s IL_0051 - - IL_0050: nop - IL_0051: ldarg.0 - IL_0052: ldc.i4.4 - IL_0053: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0058: ldarg.0 - IL_0059: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_005e: ldarg.0 - IL_005f: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_0064: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0069: ldc.i4.1 - IL_006a: add - IL_006b: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_0070: ldstr "done" - IL_0075: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_007a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_007f: pop - IL_0080: nop - IL_0081: ldarg.0 - IL_0082: ldc.i4.4 - IL_0083: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0088: ldarg.0 - IL_0089: ldc.i4.0 - IL_008a: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current - IL_008f: leave.s IL_009b - - } - catch [runtime]System.Object - { - IL_0091: castclass [runtime]System.Exception - IL_0096: stloc.1 - IL_0097: ldloc.1 - IL_0098: stloc.0 - IL_0099: leave.s IL_009b - - } - IL_009b: nop - IL_009c: br IL_0000 - - IL_00a1: ldloc.0 - IL_00a2: brfalse.s IL_00a6 - - IL_00a4: ldloc.0 - IL_00a5: throw - - IL_00a6: ret + .maxstack 8 + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + int32, + int32) + IL_0009: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -339,23 +356,17 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldnull - IL_0001: ldnull - IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, - int32, - int32) - 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 public static class [runtime]System.Collections.Generic.IEnumerable`1 f4() 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 ''.$SeqExpressionSteppingTest5::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest5::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$SeqExpressionSteppingTest5 @@ -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..3d6f162333a 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 @@ -76,6 +76,104 @@ IL_0023: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 7 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.Exception V_1) + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0006: ldc.i4.4 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 + + IL_0013: nop + IL_0014: br IL_00a1 + + IL_0019: nop + .try + { + IL_001a: ldarg.0 + IL_001b: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0020: switch ( + IL_003b, + IL_003e, + IL_0041, + IL_0044, + IL_0047) + IL_0039: br.s IL_004a + + IL_003b: nop + IL_003c: br.s IL_0081 + + IL_003e: nop + IL_003f: br.s IL_0051 + + IL_0041: nop + IL_0042: br.s IL_0050 + + IL_0044: nop + IL_0045: br.s IL_004d + + IL_0047: nop + IL_0048: br.s IL_0081 + + IL_004a: nop + IL_004b: br.s IL_004d + + IL_004d: nop + IL_004e: br.s IL_0051 + + IL_0050: nop + IL_0051: ldarg.0 + IL_0052: ldc.i4.4 + IL_0053: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0058: ldarg.0 + IL_0059: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_005e: ldarg.0 + IL_005f: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x + IL_0064: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0069: ldc.i4.1 + IL_006a: add + IL_006b: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) + IL_0070: ldstr "done" + IL_0075: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_007a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_007f: pop + IL_0080: nop + IL_0081: ldarg.0 + IL_0082: ldc.i4.4 + IL_0083: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc + IL_0088: ldarg.0 + IL_0089: ldc.i4.0 + IL_008a: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current + IL_008f: leave.s IL_009b + + } + catch [runtime]System.Object + { + IL_0091: castclass [runtime]System.Exception + IL_0096: stloc.1 + IL_0097: ldloc.1 + IL_0098: stloc.0 + IL_0099: leave.s IL_009b + + } + IL_009b: nop + IL_009c: br IL_0000 + + IL_00a1: ldloc.0 + IL_00a2: brfalse.s IL_00a6 + + IL_00a4: ldloc.0 + IL_00a5: throw + + IL_00a6: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -185,102 +283,21 @@ IL_00fc: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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 7 - .locals init (class [runtime]System.Exception V_0, - class [runtime]System.Exception V_1) - IL_0000: ldarg.0 - IL_0001: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0006: ldc.i4.4 - IL_0007: sub - IL_0008: switch ( - IL_0013) - IL_0011: br.s IL_0019 - - IL_0013: nop - IL_0014: br IL_00a1 - - IL_0019: nop - .try - { - IL_001a: ldarg.0 - IL_001b: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0020: switch ( - IL_003b, - IL_003e, - IL_0041, - IL_0044, - IL_0047) - IL_0039: br.s IL_004a - - IL_003b: nop - IL_003c: br.s IL_0081 - - IL_003e: nop - IL_003f: br.s IL_0051 - - IL_0041: nop - IL_0042: br.s IL_0050 - - IL_0044: nop - IL_0045: br.s IL_004d - - IL_0047: nop - IL_0048: br.s IL_0081 - - IL_004a: nop - IL_004b: br.s IL_004d - - IL_004d: nop - IL_004e: br.s IL_0051 - - IL_0050: nop - IL_0051: ldarg.0 - IL_0052: ldc.i4.4 - IL_0053: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0058: ldarg.0 - IL_0059: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_005e: ldarg.0 - IL_005f: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::x - IL_0064: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0069: ldc.i4.1 - IL_006a: add - IL_006b: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_contents(!0) - IL_0070: ldstr "done" - IL_0075: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_007a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_007f: pop - IL_0080: nop - IL_0081: ldarg.0 - IL_0082: ldc.i4.4 - IL_0083: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::pc - IL_0088: ldarg.0 - IL_0089: ldc.i4.0 - IL_008a: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::current - IL_008f: leave.s IL_009b - - } - catch [runtime]System.Object - { - IL_0091: castclass [runtime]System.Exception - IL_0096: stloc.1 - IL_0097: ldloc.1 - IL_0098: stloc.0 - IL_0099: leave.s IL_009b - - } - IL_009b: nop - IL_009c: br IL_0000 - - IL_00a1: ldloc.0 - IL_00a2: brfalse.s IL_00a6 - - IL_00a4: ldloc.0 - IL_00a5: throw - - IL_00a6: ret + .maxstack 8 + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + int32, + int32) + IL_0009: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -339,23 +356,17 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldnull - IL_0001: ldnull - IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, - int32, - int32) - 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 public static class [runtime]System.Collections.Generic.IEnumerable`1 f4() cil managed @@ -373,17 +384,6 @@ 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 assembly static void staticInitialization@() cil managed { @@ -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..40f0b02b35e 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 @@ -82,6 +82,108 @@ IL_0023: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 6 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.Exception V_1) + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0006: ldc.i4.5 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 + + IL_0013: nop + IL_0014: br IL_00a0 + + IL_0019: nop + .try + { + IL_001a: ldarg.0 + IL_001b: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0020: switch ( + IL_003f, + IL_0042, + IL_0045, + IL_0048, + IL_004b, + IL_004e) + IL_003d: br.s IL_0051 + + IL_003f: nop + IL_0040: br.s IL_0080 + + IL_0042: nop + IL_0043: br.s IL_006c + + IL_0045: nop + IL_0046: br.s IL_006b + + IL_0048: nop + IL_0049: br.s IL_0055 + + IL_004b: nop + IL_004c: br.s IL_0054 + + IL_004e: nop + IL_004f: br.s IL_0080 + + IL_0051: nop + IL_0052: br.s IL_0054 + + IL_0054: nop + IL_0055: ldarg.0 + IL_0056: ldc.i4.5 + IL_0057: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_005c: ldarg.0 + IL_005d: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_0062: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0067: nop + IL_0068: nop + IL_0069: br.s IL_0080 + + IL_006b: nop + IL_006c: ldarg.0 + IL_006d: ldc.i4.5 + IL_006e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0073: ldarg.0 + IL_0074: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0079: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007e: nop + IL_007f: nop + IL_0080: ldarg.0 + IL_0081: ldc.i4.5 + IL_0082: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0087: ldarg.0 + IL_0088: ldc.i4.0 + IL_0089: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_008e: leave.s IL_009a + + } + catch [runtime]System.Object + { + IL_0090: castclass [runtime]System.Exception + IL_0095: stloc.1 + IL_0096: ldloc.1 + IL_0097: stloc.0 + IL_0098: leave.s IL_009a + + } + IL_009a: nop + IL_009b: br IL_0000 + + IL_00a0: ldloc.0 + IL_00a1: brfalse.s IL_00a5 + + IL_00a3: ldloc.0 + IL_00a4: throw + + IL_00a5: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -216,106 +318,21 @@ IL_0129: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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 6 - .locals init (class [runtime]System.Exception V_0, - class [runtime]System.Exception V_1) - IL_0000: ldarg.0 - IL_0001: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0006: ldc.i4.5 - IL_0007: sub - IL_0008: switch ( - IL_0013) - IL_0011: br.s IL_0019 - - IL_0013: nop - IL_0014: br IL_00a0 - - IL_0019: nop - .try - { - IL_001a: ldarg.0 - IL_001b: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0020: switch ( - IL_003f, - IL_0042, - IL_0045, - IL_0048, - IL_004b, - IL_004e) - IL_003d: br.s IL_0051 - - IL_003f: nop - IL_0040: br.s IL_0080 - - IL_0042: nop - IL_0043: br.s IL_006c - - IL_0045: nop - IL_0046: br.s IL_006b - - IL_0048: nop - IL_0049: br.s IL_0055 - - IL_004b: nop - IL_004c: br.s IL_0054 - - IL_004e: nop - IL_004f: br.s IL_0080 - - IL_0051: nop - IL_0052: br.s IL_0054 - - IL_0054: nop - IL_0055: ldarg.0 - IL_0056: ldc.i4.5 - IL_0057: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_005c: ldarg.0 - IL_005d: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0062: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0067: nop - IL_0068: nop - IL_0069: br.s IL_0080 - - IL_006b: nop - IL_006c: ldarg.0 - IL_006d: ldc.i4.5 - IL_006e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0073: ldarg.0 - IL_0074: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_0079: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007e: nop - IL_007f: nop - IL_0080: ldarg.0 - IL_0081: ldc.i4.5 - IL_0082: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0087: ldarg.0 - IL_0088: ldc.i4.0 - IL_0089: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_008e: leave.s IL_009a - - } - catch [runtime]System.Object - { - IL_0090: castclass [runtime]System.Exception - IL_0095: stloc.1 - IL_0096: ldloc.1 - IL_0097: stloc.0 - IL_0098: leave.s IL_009a - - } - IL_009a: nop - IL_009b: br IL_0000 - - IL_00a0: ldloc.0 - IL_00a1: brfalse.s IL_00a5 - - IL_00a3: ldloc.0 - IL_00a4: throw - - IL_00a5: ret + .maxstack 8 + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::.ctor(class [runtime]System.Collections.Generic.IEnumerator`1, + class [runtime]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0009: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -381,31 +398,17 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldnull - IL_0001: ldnull - IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::.ctor(class [runtime]System.Collections.Generic.IEnumerator`1, - class [runtime]System.Collections.Generic.IEnumerator`1, - int32, - int32) - IL_0009: ret - } - } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$SeqExpressionSteppingTest6::es@4 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest6::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest6::init@ + IL_000b: pop + IL_000c: ret } .method public static class [runtime]System.Collections.Generic.IEnumerable`1 f7() cil managed @@ -423,6 +426,14 @@ IL_0009: ret } + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$SeqExpressionSteppingTest6::es@4 + IL_0005: 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/SeqExpressionSteppingTest06.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOn.il.bsl index b1eb89b93cc..b44dbc1423e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOn.il.bsl @@ -82,6 +82,108 @@ IL_0023: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 6 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.Exception V_1) + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0006: ldc.i4.5 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 + + IL_0013: nop + IL_0014: br IL_00a0 + + IL_0019: nop + .try + { + IL_001a: ldarg.0 + IL_001b: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0020: switch ( + IL_003f, + IL_0042, + IL_0045, + IL_0048, + IL_004b, + IL_004e) + IL_003d: br.s IL_0051 + + IL_003f: nop + IL_0040: br.s IL_0080 + + IL_0042: nop + IL_0043: br.s IL_006c + + IL_0045: nop + IL_0046: br.s IL_006b + + IL_0048: nop + IL_0049: br.s IL_0055 + + IL_004b: nop + IL_004c: br.s IL_0054 + + IL_004e: nop + IL_004f: br.s IL_0080 + + IL_0051: nop + IL_0052: br.s IL_0054 + + IL_0054: nop + IL_0055: ldarg.0 + IL_0056: ldc.i4.5 + IL_0057: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_005c: ldarg.0 + IL_005d: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_0062: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0067: nop + IL_0068: nop + IL_0069: br.s IL_0080 + + IL_006b: nop + IL_006c: ldarg.0 + IL_006d: ldc.i4.5 + IL_006e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0073: ldarg.0 + IL_0074: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0079: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007e: nop + IL_007f: nop + IL_0080: ldarg.0 + IL_0081: ldc.i4.5 + IL_0082: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0087: ldarg.0 + IL_0088: ldc.i4.0 + IL_0089: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_008e: leave.s IL_009a + + } + catch [runtime]System.Object + { + IL_0090: castclass [runtime]System.Exception + IL_0095: stloc.1 + IL_0096: ldloc.1 + IL_0097: stloc.0 + IL_0098: leave.s IL_009a + + } + IL_009a: nop + IL_009b: br IL_0000 + + IL_00a0: ldloc.0 + IL_00a1: brfalse.s IL_00a5 + + IL_00a3: ldloc.0 + IL_00a4: throw + + IL_00a5: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -216,106 +318,21 @@ IL_0129: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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 6 - .locals init (class [runtime]System.Exception V_0, - class [runtime]System.Exception V_1) - IL_0000: ldarg.0 - IL_0001: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0006: ldc.i4.5 - IL_0007: sub - IL_0008: switch ( - IL_0013) - IL_0011: br.s IL_0019 - - IL_0013: nop - IL_0014: br IL_00a0 - - IL_0019: nop - .try - { - IL_001a: ldarg.0 - IL_001b: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0020: switch ( - IL_003f, - IL_0042, - IL_0045, - IL_0048, - IL_004b, - IL_004e) - IL_003d: br.s IL_0051 - - IL_003f: nop - IL_0040: br.s IL_0080 - - IL_0042: nop - IL_0043: br.s IL_006c - - IL_0045: nop - IL_0046: br.s IL_006b - - IL_0048: nop - IL_0049: br.s IL_0055 - - IL_004b: nop - IL_004c: br.s IL_0054 - - IL_004e: nop - IL_004f: br.s IL_0080 - - IL_0051: nop - IL_0052: br.s IL_0054 - - IL_0054: nop - IL_0055: ldarg.0 - IL_0056: ldc.i4.5 - IL_0057: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_005c: ldarg.0 - IL_005d: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0062: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0067: nop - IL_0068: nop - IL_0069: br.s IL_0080 - - IL_006b: nop - IL_006c: ldarg.0 - IL_006d: ldc.i4.5 - IL_006e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0073: ldarg.0 - IL_0074: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_0079: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007e: nop - IL_007f: nop - IL_0080: ldarg.0 - IL_0081: ldc.i4.5 - IL_0082: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0087: ldarg.0 - IL_0088: ldc.i4.0 - IL_0089: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_008e: leave.s IL_009a - - } - catch [runtime]System.Object - { - IL_0090: castclass [runtime]System.Exception - IL_0095: stloc.1 - IL_0096: ldloc.1 - IL_0097: stloc.0 - IL_0098: leave.s IL_009a - - } - IL_009a: nop - IL_009b: br IL_0000 - - IL_00a0: ldloc.0 - IL_00a1: brfalse.s IL_00a5 - - IL_00a3: ldloc.0 - IL_00a4: throw - - IL_00a5: ret + .maxstack 8 + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::.ctor(class [runtime]System.Collections.Generic.IEnumerator`1, + class [runtime]System.Collections.Generic.IEnumerator`1, + int32, + int32) + IL_0009: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -381,33 +398,19 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldnull - IL_0001: ldnull - IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::.ctor(class [runtime]System.Collections.Generic.IEnumerator`1, - class [runtime]System.Collections.Generic.IEnumerator`1, - int32, - int32) - IL_0009: 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 + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::es@4 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest6::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest6::init@ + IL_000b: pop + IL_000c: ret } .method public static class [runtime]System.Collections.Generic.IEnumerable`1 f7() cil managed @@ -425,15 +428,12 @@ IL_0009: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() 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 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::es@4 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.net472.bsl index ba34e38db13..4c59441c199 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -43,21 +44,65 @@ 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 public specialname static int32 get_r() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32 ''.$SeqExpressionSteppingTest7::r@4 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest7::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest7::init@ + IL_000b: pop + IL_000c: ret } - .method public specialname static void set_r(int32 'value') cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest7() cil managed { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest7::r@4 - IL_0006: ret + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + uint64 V_1, + int32 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.1 + IL_0004: stloc.2 + IL_0005: br.s IL_0033 + + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldstr "hello" + IL_0014: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.3 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.2 + IL_002b: ldc.i4.1 + IL_002c: add + IL_002d: stloc.2 + IL_002e: ldloc.1 + IL_002f: ldc.i4.1 + IL_0030: conv.i8 + IL_0031: add + IL_0032: stloc.1 + IL_0033: ldloc.1 + IL_0034: ldc.i4.4 + IL_0035: conv.i8 + IL_0036: blt.un.s IL_0007 + + IL_0038: ldloca.s V_0 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f() cil managed @@ -100,102 +145,21 @@ IL_003c: ret } - .method public static void testSimpleForEachSeqLoopWithOneStatement(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed + .method public specialname static int32 get_r() cil managed { - .maxstack 4 - .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - object[] V_2, - class [runtime]System.IDisposable V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0008: stloc.1 - .try - { - IL_0009: br.s IL_001d - - IL_000b: ldloc.1 - IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: call void [runtime]System.Console::WriteLine(string, - object[]) - IL_001d: ldloc.1 - IL_001e: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0023: brtrue.s IL_000b - - IL_0025: leave.s IL_0039 - - } - finally - { - IL_0027: ldloc.1 - IL_0028: isinst [runtime]System.IDisposable - IL_002d: stloc.3 - IL_002e: ldloc.3 - IL_002f: brfalse.s IL_0038 - - IL_0031: ldloc.3 - IL_0032: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0037: endfinally - IL_0038: endfinally - } - IL_0039: ret + .maxstack 8 + IL_0000: ldsfld int32 ''.$SeqExpressionSteppingTest7::r@4 + IL_0005: ret } - .method public static void testSimpleForEachSeqLoopWithTwoStatements(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed + .method public specialname static void set_r(int32 'value') cil managed { - .maxstack 4 - .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - object[] V_2, - class [runtime]System.IDisposable V_3) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0008: stloc.1 - .try - { - IL_0009: br.s IL_0028 - - IL_000b: ldloc.1 - IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: call void [runtime]System.Console::WriteLine(string, - object[]) - IL_001d: ldstr "{0}" - IL_0022: ldloc.2 - IL_0023: call void [runtime]System.Console::WriteLine(string, - object[]) - IL_0028: ldloc.1 - IL_0029: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_002e: brtrue.s IL_000b - - IL_0030: leave.s IL_0044 - - } - finally - { - IL_0032: ldloc.1 - IL_0033: isinst [runtime]System.IDisposable - IL_0038: stloc.3 - IL_0039: ldloc.3 - IL_003a: brfalse.s IL_0043 - - IL_003c: ldloc.3 - IL_003d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0042: endfinally - IL_0043: endfinally - } - IL_0044: ret + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest7::r@4 + IL_0006: ret } .method public static void testSimpleForEachArrayLoopWithOneStatement(int32[] inp) cil managed @@ -219,7 +183,7 @@ IL_000f: ldloc.2 IL_0010: box [runtime]System.Int32 IL_0015: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_001a: ldloc.1 IL_001b: ldc.i4.1 IL_001c: add @@ -254,12 +218,12 @@ IL_000f: ldloc.2 IL_0010: box [runtime]System.Int32 IL_0015: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_001a: ldstr "{0}" IL_001f: ldloc.2 IL_0020: box [runtime]System.Int32 IL_0025: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_002a: ldloc.1 IL_002b: ldc.i4.1 IL_002c: add @@ -273,79 +237,79 @@ IL_0034: ret } - .method public static void testSimpleForEachListLoopWithOneStatement(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed + .method public static void testSimpleForEachIntLoopDownWithOneStatement(int32 start, + int32 stop) 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.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0008: stloc.1 - IL_0009: br.s IL_002b + .maxstack 5 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.1 + IL_0001: stloc.1 + IL_0002: ldarg.0 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: bgt.s IL_0022 - IL_000b: ldloc.0 - IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: box [runtime]System.Int32 - IL_001d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0022: ldloc.1 - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: brtrue.s IL_000b + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [runtime]System.Int32 + IL_0013: call void [runtime]System.Console::WriteLine(string, + object) + IL_0018: ldloc.1 + IL_0019: ldc.i4.1 + IL_001a: sub + IL_001b: stloc.1 + IL_001c: ldloc.1 + IL_001d: ldloc.0 + IL_001e: ldc.i4.1 + IL_001f: sub + IL_0020: bne.un.s IL_0008 - IL_002e: ret + IL_0022: ret } - .method public static void testSimpleForEachListLoopWithTwoStatements(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed + .method public static void testSimpleForEachIntLoopDownWithTwoStatements(int32 start, + int32 stop) 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.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0008: stloc.1 - IL_0009: br.s IL_003b + .maxstack 5 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.1 + IL_0001: stloc.1 + IL_0002: ldarg.0 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: bgt.s IL_0032 - IL_000b: ldloc.0 - IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: box [runtime]System.Int32 - IL_001d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0022: ldstr "{0}" - IL_0027: ldloc.2 - IL_0028: box [runtime]System.Int32 - IL_002d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0032: ldloc.1 - IL_0033: stloc.0 - IL_0034: ldloc.0 - IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003a: stloc.1 - IL_003b: ldloc.1 - IL_003c: brtrue.s IL_000b + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [runtime]System.Int32 + IL_0013: call void [runtime]System.Console::WriteLine(string, + object) + IL_0018: ldstr "{0}" + IL_001d: ldloc.1 + IL_001e: box [runtime]System.Int32 + IL_0023: call void [runtime]System.Console::WriteLine(string, + object) + IL_0028: ldloc.1 + IL_0029: ldc.i4.1 + IL_002a: sub + IL_002b: stloc.1 + IL_002c: ldloc.1 + IL_002d: ldloc.0 + IL_002e: ldc.i4.1 + IL_002f: sub + IL_0030: bne.un.s IL_0008 - IL_003e: ret + IL_0032: ret } - .method public static void testSimpleForEachIntRangeLoopWithOneStatement(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntLoopWithOneStatement(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -363,7 +327,7 @@ IL_000d: ldloc.1 IL_000e: box [runtime]System.Int32 IL_0013: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_0018: ldloc.1 IL_0019: ldc.i4.1 IL_001a: add @@ -377,8 +341,8 @@ IL_0022: ret } - .method public static void testSimpleForEachIntRangeLoopWithTwoStatements(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntLoopWithTwoStatements(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -396,12 +360,12 @@ IL_000d: ldloc.1 IL_000e: box [runtime]System.Int32 IL_0013: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_0018: ldstr "{0}" IL_001d: ldloc.1 IL_001e: box [runtime]System.Int32 IL_0023: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_0028: ldloc.1 IL_0029: ldc.i4.1 IL_002a: add @@ -455,7 +419,7 @@ IL_0020: ldloc.3 IL_0021: box [runtime]System.Int32 IL_0026: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_002b: ldloc.2 IL_002c: ldc.i4.m1 IL_002d: add @@ -512,12 +476,12 @@ IL_0020: ldloc.3 IL_0021: box [runtime]System.Int32 IL_0026: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_002b: ldstr "{0}" IL_0030: ldloc.3 IL_0031: box [runtime]System.Int32 IL_0036: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_003b: ldloc.2 IL_003c: ldc.i4.m1 IL_003d: add @@ -534,8 +498,8 @@ IL_0048: ret } - .method public static void testSimpleForEachIntLoopWithOneStatement(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntRangeLoopWithOneStatement(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -553,7 +517,7 @@ IL_000d: ldloc.1 IL_000e: box [runtime]System.Int32 IL_0013: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_0018: ldloc.1 IL_0019: ldc.i4.1 IL_001a: add @@ -567,8 +531,8 @@ IL_0022: ret } - .method public static void testSimpleForEachIntLoopWithTwoStatements(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntRangeLoopWithTwoStatements(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -586,12 +550,12 @@ IL_000d: ldloc.1 IL_000e: box [runtime]System.Int32 IL_0013: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_0018: ldstr "{0}" IL_001d: ldloc.1 IL_001e: box [runtime]System.Int32 IL_0023: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_0028: ldloc.1 IL_0029: ldc.i4.1 IL_002a: add @@ -605,119 +569,176 @@ IL_0032: ret } - .method public static void testSimpleForEachIntLoopDownWithOneStatement(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachListLoopWithOneStatement(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed { - .maxstack 5 - .locals init (int32 V_0, - int32 V_1) - IL_0000: ldarg.1 - IL_0001: stloc.1 - IL_0002: ldarg.0 - IL_0003: stloc.0 - IL_0004: ldloc.0 - IL_0005: ldloc.1 - IL_0006: bgt.s IL_0022 + .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.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: stloc.1 + IL_0009: br.s IL_002b - IL_0008: ldstr "{0}" - IL_000d: ldloc.1 - IL_000e: box [runtime]System.Int32 - IL_0013: call void [runtime]System.Console::WriteLine(string, - object) - IL_0018: ldloc.1 - IL_0019: ldc.i4.1 - IL_001a: sub - IL_001b: stloc.1 - IL_001c: ldloc.1 - IL_001d: ldloc.0 - IL_001e: ldc.i4.1 - IL_001f: sub - IL_0020: bne.un.s IL_0008 + IL_000b: ldloc.0 + IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0022: ldloc.1 + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002a: stloc.1 + IL_002b: ldloc.1 + IL_002c: brtrue.s IL_000b - IL_0022: ret + IL_002e: ret } - .method public static void testSimpleForEachIntLoopDownWithTwoStatements(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachListLoopWithTwoStatements(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed { - .maxstack 5 - .locals init (int32 V_0, - int32 V_1) - IL_0000: ldarg.1 - IL_0001: stloc.1 - IL_0002: ldarg.0 - IL_0003: stloc.0 - IL_0004: ldloc.0 - IL_0005: ldloc.1 - IL_0006: bgt.s IL_0032 + .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.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: stloc.1 + IL_0009: br.s IL_003b - IL_0008: ldstr "{0}" - IL_000d: ldloc.1 - IL_000e: box [runtime]System.Int32 - IL_0013: call void [runtime]System.Console::WriteLine(string, - object) - IL_0018: ldstr "{0}" - IL_001d: ldloc.1 - IL_001e: box [runtime]System.Int32 - IL_0023: call void [runtime]System.Console::WriteLine(string, - object) - IL_0028: ldloc.1 - IL_0029: ldc.i4.1 - IL_002a: sub - IL_002b: stloc.1 - IL_002c: ldloc.1 - IL_002d: ldloc.0 - IL_002e: ldc.i4.1 - IL_002f: sub - IL_0030: bne.un.s IL_0008 + IL_000b: ldloc.0 + IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0022: ldstr "{0}" + IL_0027: ldloc.2 + IL_0028: box [runtime]System.Int32 + IL_002d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0032: ldloc.1 + IL_0033: stloc.0 + IL_0034: ldloc.0 + IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003a: stloc.1 + IL_003b: ldloc.1 + IL_003c: brtrue.s IL_000b - IL_0032: ret + IL_003e: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest7() cil managed + .method public static void testSimpleForEachSeqLoopWithOneStatement(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed { .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, + .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, int32 V_2, - int32 V_3) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.1 - IL_0004: stloc.2 - IL_0005: br.s IL_002b - - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 - IL_000b: ldstr "hello" - IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0015: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_001a: pop - IL_001b: ldloc.3 - IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0021: nop - IL_0022: ldloc.2 - IL_0023: ldc.i4.1 - IL_0024: add - IL_0025: stloc.2 - IL_0026: ldloc.1 - IL_0027: ldc.i4.1 - IL_0028: conv.i8 - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: ldc.i4.4 - IL_002d: conv.i8 - IL_002e: blt.un.s IL_0007 + class [runtime]System.IDisposable V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0008: stloc.1 + .try + { + IL_0009: br.s IL_0022 + + IL_000b: ldloc.1 + IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0022: ldloc.1 + IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0028: brtrue.s IL_000b - IL_0030: ldloca.s V_0 - IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0037: ret + IL_002a: leave.s IL_003e + + } + finally + { + IL_002c: ldloc.1 + IL_002d: isinst [runtime]System.IDisposable + IL_0032: stloc.3 + IL_0033: ldloc.3 + IL_0034: brfalse.s IL_003d + + IL_0036: ldloc.3 + IL_0037: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003c: endfinally + IL_003d: endfinally + } + IL_003e: ret + } + + .method public static void testSimpleForEachSeqLoopWithTwoStatements(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed + { + + .maxstack 4 + .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, + int32 V_2, + class [runtime]System.IDisposable V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0008: stloc.1 + .try + { + IL_0009: br.s IL_0032 + + IL_000b: ldloc.1 + IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0022: ldstr "{0}" + IL_0027: ldloc.2 + IL_0028: box [runtime]System.Int32 + IL_002d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0032: ldloc.1 + IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0038: brtrue.s IL_000b + + IL_003a: leave.s IL_004e + + } + finally + { + IL_003c: ldloc.1 + IL_003d: isinst [runtime]System.IDisposable + IL_0042: stloc.3 + IL_0043: ldloc.3 + IL_0044: brfalse.s IL_004d + + IL_0046: ldloc.3 + IL_0047: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004c: endfinally + IL_004d: endfinally + } + IL_004e: ret } .property int32 r() @@ -743,51 +764,54 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [runtime]System.Exception V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_3) + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + class [runtime]System.Exception V_3, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4) IL_0000: ldc.i4.0 IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest7::r@4 IL_0006: ldstr "res = %A" IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(string) IL_0010: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0015: stloc.0 + IL_0016: ldloc.0 + IL_0017: stloc.1 .try { - IL_0016: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest7::f() - IL_001b: stloc.1 - IL_001c: leave.s IL_004b + IL_0018: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest7::f() + IL_001d: stloc.2 + IL_001e: leave.s IL_004f } catch [runtime]System.Object { - IL_001e: castclass [runtime]System.Exception - IL_0023: stloc.2 - IL_0024: ldloc.2 - IL_0025: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) - IL_002a: stloc.3 - IL_002b: ldloc.3 - IL_002c: brfalse.s IL_0040 - - IL_002e: call int32 SeqExpressionSteppingTest7::get_r() - IL_0033: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0038: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0020: castclass [runtime]System.Exception + IL_0025: stloc.3 + IL_0026: ldloc.3 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_0044 + + IL_0032: call int32 SeqExpressionSteppingTest7::get_r() + IL_0037: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_003c: 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_003d: stloc.1 - IL_003e: leave.s IL_004b + IL_0041: stloc.2 + IL_0042: leave.s IL_004f - IL_0040: rethrow - IL_0042: ldnull - IL_0043: unbox.any class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - IL_0048: stloc.1 - IL_0049: leave.s IL_004b + IL_0044: rethrow + IL_0046: ldnull + IL_0047: unbox.any class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + IL_004c: stloc.2 + IL_004d: leave.s IL_004f } - IL_004b: ldloc.0 - IL_004c: ldloc.1 - IL_004d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_0052: pop - IL_0053: ret + IL_004f: ldloc.1 + IL_0050: ldloc.2 + IL_0051: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_0056: pop + IL_0057: ret } } @@ -796,4 +820,3 @@ - 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..06389b044fb 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 @@ -34,21 +34,65 @@ 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 public specialname static int32 get_r() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32 ''.$SeqExpressionSteppingTest7::r@4 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest7::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest7::init@ + IL_000b: pop + IL_000c: ret } - .method public specialname static void set_r(int32 'value') cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest7() cil managed { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest7::r@4 - IL_0006: ret + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + uint64 V_1, + int32 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.1 + IL_0004: stloc.2 + IL_0005: br.s IL_0033 + + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldstr "hello" + IL_0014: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.3 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.2 + IL_002b: ldc.i4.1 + IL_002c: add + IL_002d: stloc.2 + IL_002e: ldloc.1 + IL_002f: ldc.i4.1 + IL_0030: conv.i8 + IL_0031: add + IL_0032: stloc.1 + IL_0033: ldloc.1 + IL_0034: ldc.i4.4 + IL_0035: conv.i8 + IL_0036: blt.un.s IL_0007 + + IL_0038: ldloca.s V_0 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f() cil managed @@ -91,105 +135,21 @@ IL_003c: ret } - .method public static void testSimpleForEachSeqLoopWithOneStatement(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed + .method public specialname static int32 get_r() cil managed { - .maxstack 4 - .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - int32 V_2, - class [runtime]System.IDisposable V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0008: stloc.1 - .try - { - IL_0009: br.s IL_0022 - - IL_000b: ldloc.1 - IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: box [runtime]System.Int32 - IL_001d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0022: ldloc.1 - IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0028: brtrue.s IL_000b - - IL_002a: leave.s IL_003e - - } - finally - { - IL_002c: ldloc.1 - IL_002d: isinst [runtime]System.IDisposable - IL_0032: stloc.3 - IL_0033: ldloc.3 - IL_0034: brfalse.s IL_003d - - IL_0036: ldloc.3 - IL_0037: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003c: endfinally - IL_003d: endfinally - } - IL_003e: ret + .maxstack 8 + IL_0000: ldsfld int32 ''.$SeqExpressionSteppingTest7::r@4 + IL_0005: ret } - .method public static void testSimpleForEachSeqLoopWithTwoStatements(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed + .method public specialname static void set_r(int32 'value') cil managed { - .maxstack 4 - .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - int32 V_2, - class [runtime]System.IDisposable V_3) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0008: stloc.1 - .try - { - IL_0009: br.s IL_0032 - - IL_000b: ldloc.1 - IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: box [runtime]System.Int32 - IL_001d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0022: ldstr "{0}" - IL_0027: ldloc.2 - IL_0028: box [runtime]System.Int32 - IL_002d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000b - - IL_003a: leave.s IL_004e - - } - finally - { - IL_003c: ldloc.1 - IL_003d: isinst [runtime]System.IDisposable - IL_0042: stloc.3 - IL_0043: ldloc.3 - IL_0044: brfalse.s IL_004d - - IL_0046: ldloc.3 - IL_0047: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004c: endfinally - IL_004d: endfinally - } - IL_004e: ret + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest7::r@4 + IL_0006: ret } .method public static void testSimpleForEachArrayLoopWithOneStatement(int32[] inp) cil managed @@ -267,79 +227,79 @@ IL_0034: ret } - .method public static void testSimpleForEachListLoopWithOneStatement(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed + .method public static void testSimpleForEachIntLoopDownWithOneStatement(int32 start, + int32 stop) 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.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0008: stloc.1 - IL_0009: br.s IL_002b + .maxstack 5 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.1 + IL_0001: stloc.1 + IL_0002: ldarg.0 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: bgt.s IL_0022 - IL_000b: ldloc.0 - IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: box [runtime]System.Int32 - IL_001d: call void [runtime]System.Console::WriteLine(string, + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [runtime]System.Int32 + IL_0013: call void [runtime]System.Console::WriteLine(string, object) - IL_0022: ldloc.1 - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: brtrue.s IL_000b + IL_0018: ldloc.1 + IL_0019: ldc.i4.1 + IL_001a: sub + IL_001b: stloc.1 + IL_001c: ldloc.1 + IL_001d: ldloc.0 + IL_001e: ldc.i4.1 + IL_001f: sub + IL_0020: bne.un.s IL_0008 - IL_002e: ret + IL_0022: ret } - .method public static void testSimpleForEachListLoopWithTwoStatements(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed + .method public static void testSimpleForEachIntLoopDownWithTwoStatements(int32 start, + int32 stop) 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.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0008: stloc.1 - IL_0009: br.s IL_003b + .maxstack 5 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.1 + IL_0001: stloc.1 + IL_0002: ldarg.0 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: bgt.s IL_0032 - IL_000b: ldloc.0 - IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: box [runtime]System.Int32 - IL_001d: call void [runtime]System.Console::WriteLine(string, + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [runtime]System.Int32 + IL_0013: call void [runtime]System.Console::WriteLine(string, object) - IL_0022: ldstr "{0}" - IL_0027: ldloc.2 - IL_0028: box [runtime]System.Int32 - IL_002d: call void [runtime]System.Console::WriteLine(string, + IL_0018: ldstr "{0}" + IL_001d: ldloc.1 + IL_001e: box [runtime]System.Int32 + IL_0023: call void [runtime]System.Console::WriteLine(string, object) - IL_0032: ldloc.1 - IL_0033: stloc.0 - IL_0034: ldloc.0 - IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003a: stloc.1 - IL_003b: ldloc.1 - IL_003c: brtrue.s IL_000b + IL_0028: ldloc.1 + IL_0029: ldc.i4.1 + IL_002a: sub + IL_002b: stloc.1 + IL_002c: ldloc.1 + IL_002d: ldloc.0 + IL_002e: ldc.i4.1 + IL_002f: sub + IL_0030: bne.un.s IL_0008 - IL_003e: ret + IL_0032: ret } - .method public static void testSimpleForEachIntRangeLoopWithOneStatement(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntLoopWithOneStatement(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -371,8 +331,8 @@ IL_0022: ret } - .method public static void testSimpleForEachIntRangeLoopWithTwoStatements(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntLoopWithTwoStatements(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -528,8 +488,8 @@ IL_0048: ret } - .method public static void testSimpleForEachIntLoopWithOneStatement(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntRangeLoopWithOneStatement(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -561,8 +521,8 @@ IL_0022: ret } - .method public static void testSimpleForEachIntLoopWithTwoStatements(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntRangeLoopWithTwoStatements(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -599,125 +559,176 @@ IL_0032: ret } - .method public static void testSimpleForEachIntLoopDownWithOneStatement(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachListLoopWithOneStatement(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed { - .maxstack 5 - .locals init (int32 V_0, - int32 V_1) - IL_0000: ldarg.1 - IL_0001: stloc.1 - IL_0002: ldarg.0 - IL_0003: stloc.0 - IL_0004: ldloc.0 - IL_0005: ldloc.1 - IL_0006: bgt.s IL_0022 + .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.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: stloc.1 + IL_0009: br.s IL_002b - IL_0008: ldstr "{0}" - IL_000d: ldloc.1 - IL_000e: box [runtime]System.Int32 - IL_0013: call void [runtime]System.Console::WriteLine(string, + IL_000b: ldloc.0 + IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, object) - IL_0018: ldloc.1 - IL_0019: ldc.i4.1 - IL_001a: sub - IL_001b: stloc.1 - IL_001c: ldloc.1 - IL_001d: ldloc.0 - IL_001e: ldc.i4.1 - IL_001f: sub - IL_0020: bne.un.s IL_0008 + IL_0022: ldloc.1 + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002a: stloc.1 + IL_002b: ldloc.1 + IL_002c: brtrue.s IL_000b - IL_0022: ret + IL_002e: ret } - .method public static void testSimpleForEachIntLoopDownWithTwoStatements(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachListLoopWithTwoStatements(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed { - .maxstack 5 - .locals init (int32 V_0, - int32 V_1) - IL_0000: ldarg.1 - IL_0001: stloc.1 - IL_0002: ldarg.0 - IL_0003: stloc.0 - IL_0004: ldloc.0 - IL_0005: ldloc.1 - IL_0006: bgt.s IL_0032 + .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.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: stloc.1 + IL_0009: br.s IL_003b - IL_0008: ldstr "{0}" - IL_000d: ldloc.1 - IL_000e: box [runtime]System.Int32 - IL_0013: call void [runtime]System.Console::WriteLine(string, + IL_000b: ldloc.0 + IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, object) - IL_0018: ldstr "{0}" - IL_001d: ldloc.1 - IL_001e: box [runtime]System.Int32 - IL_0023: call void [runtime]System.Console::WriteLine(string, + IL_0022: ldstr "{0}" + IL_0027: ldloc.2 + IL_0028: box [runtime]System.Int32 + IL_002d: call void [runtime]System.Console::WriteLine(string, object) - IL_0028: ldloc.1 - IL_0029: ldc.i4.1 - IL_002a: sub - IL_002b: stloc.1 - IL_002c: ldloc.1 - IL_002d: ldloc.0 - IL_002e: ldc.i4.1 - IL_002f: sub - IL_0030: bne.un.s IL_0008 + IL_0032: ldloc.1 + IL_0033: stloc.0 + IL_0034: ldloc.0 + IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003a: stloc.1 + IL_003b: ldloc.1 + IL_003c: brtrue.s IL_000b - IL_0032: ret + IL_003e: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest7() cil managed + .method public static void testSimpleForEachSeqLoopWithOneStatement(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed { .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, + .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, int32 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.1 - IL_0004: stloc.2 - IL_0005: br.s IL_0033 + class [runtime]System.IDisposable V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0008: stloc.1 + .try + { + IL_0009: br.s IL_0022 - IL_0007: ldloc.2 - IL_0008: stloc.3 - IL_0009: ldloca.s V_0 - IL_000b: stloc.s V_4 - IL_000d: ldloc.s V_4 - IL_000f: ldstr "hello" - IL_0014: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_001e: pop - IL_001f: stloc.s V_5 - IL_0021: ldloc.s V_5 - IL_0023: ldloc.3 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.2 - IL_002b: ldc.i4.1 - IL_002c: add - IL_002d: stloc.2 - IL_002e: ldloc.1 - IL_002f: ldc.i4.1 - IL_0030: conv.i8 - IL_0031: add - IL_0032: stloc.1 - IL_0033: ldloc.1 - IL_0034: ldc.i4.4 - IL_0035: conv.i8 - IL_0036: blt.un.s IL_0007 + IL_000b: ldloc.1 + IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0022: ldloc.1 + IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0028: brtrue.s IL_000b - IL_0038: ldloca.s V_0 - IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003f: ret + IL_002a: leave.s IL_003e + + } + finally + { + IL_002c: ldloc.1 + IL_002d: isinst [runtime]System.IDisposable + IL_0032: stloc.3 + IL_0033: ldloc.3 + IL_0034: brfalse.s IL_003d + + IL_0036: ldloc.3 + IL_0037: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003c: endfinally + IL_003d: endfinally + } + IL_003e: ret + } + + .method public static void testSimpleForEachSeqLoopWithTwoStatements(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed + { + + .maxstack 4 + .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, + int32 V_2, + class [runtime]System.IDisposable V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0008: stloc.1 + .try + { + IL_0009: br.s IL_0032 + + IL_000b: ldloc.1 + IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0022: ldstr "{0}" + IL_0027: ldloc.2 + IL_0028: box [runtime]System.Int32 + IL_002d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0032: ldloc.1 + IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0038: brtrue.s IL_000b + + IL_003a: leave.s IL_004e + + } + finally + { + IL_003c: ldloc.1 + IL_003d: isinst [runtime]System.IDisposable + IL_0042: stloc.3 + IL_0043: ldloc.3 + IL_0044: brfalse.s IL_004d + + IL_0046: ldloc.3 + IL_0047: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004c: endfinally + IL_004d: endfinally + } + IL_004e: ret } .property int32 r() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.net472.bsl index 14fdd67aba0..53fc630d825 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -45,21 +46,65 @@ .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 int32 r@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 int32 get_r() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32 SeqExpressionSteppingTest7::r@4 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest7::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest7::init@ + IL_000b: pop + IL_000c: ret } - .method public specialname static void set_r(int32 'value') cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest7() cil managed { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 SeqExpressionSteppingTest7::r@4 - IL_0006: ret + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + uint64 V_1, + int32 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.1 + IL_0004: stloc.2 + IL_0005: br.s IL_0033 + + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldstr "hello" + IL_0014: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.3 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.2 + IL_002b: ldc.i4.1 + IL_002c: add + IL_002d: stloc.2 + IL_002e: ldloc.1 + IL_002f: ldc.i4.1 + IL_0030: conv.i8 + IL_0031: add + IL_0032: stloc.1 + IL_0033: ldloc.1 + IL_0034: ldc.i4.4 + IL_0035: conv.i8 + IL_0036: blt.un.s IL_0007 + + IL_0038: ldloca.s V_0 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f() cil managed @@ -102,102 +147,21 @@ IL_003c: ret } - .method public static void testSimpleForEachSeqLoopWithOneStatement(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed + .method public specialname static int32 get_r() cil managed { - .maxstack 4 - .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - object[] V_2, - class [runtime]System.IDisposable V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0008: stloc.1 - .try - { - IL_0009: br.s IL_001d - - IL_000b: ldloc.1 - IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: call void [runtime]System.Console::WriteLine(string, - object[]) - IL_001d: ldloc.1 - IL_001e: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0023: brtrue.s IL_000b - - IL_0025: leave.s IL_0039 - - } - finally - { - IL_0027: ldloc.1 - IL_0028: isinst [runtime]System.IDisposable - IL_002d: stloc.3 - IL_002e: ldloc.3 - IL_002f: brfalse.s IL_0038 - - IL_0031: ldloc.3 - IL_0032: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0037: endfinally - IL_0038: endfinally - } - IL_0039: ret + .maxstack 8 + IL_0000: ldsfld int32 SeqExpressionSteppingTest7::r@4 + IL_0005: ret } - .method public static void testSimpleForEachSeqLoopWithTwoStatements(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed + .method public specialname static void set_r(int32 'value') cil managed { - .maxstack 4 - .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - object[] V_2, - class [runtime]System.IDisposable V_3) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0008: stloc.1 - .try - { - IL_0009: br.s IL_0028 - - IL_000b: ldloc.1 - IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: call void [runtime]System.Console::WriteLine(string, - object[]) - IL_001d: ldstr "{0}" - IL_0022: ldloc.2 - IL_0023: call void [runtime]System.Console::WriteLine(string, - object[]) - IL_0028: ldloc.1 - IL_0029: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_002e: brtrue.s IL_000b - - IL_0030: leave.s IL_0044 - - } - finally - { - IL_0032: ldloc.1 - IL_0033: isinst [runtime]System.IDisposable - IL_0038: stloc.3 - IL_0039: ldloc.3 - IL_003a: brfalse.s IL_0043 - - IL_003c: ldloc.3 - IL_003d: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0042: endfinally - IL_0043: endfinally - } - IL_0044: ret + IL_0001: stsfld int32 SeqExpressionSteppingTest7::r@4 + IL_0006: ret } .method public static void testSimpleForEachArrayLoopWithOneStatement(int32[] inp) cil managed @@ -221,7 +185,7 @@ IL_000f: ldloc.2 IL_0010: box [runtime]System.Int32 IL_0015: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_001a: ldloc.1 IL_001b: ldc.i4.1 IL_001c: add @@ -256,12 +220,12 @@ IL_000f: ldloc.2 IL_0010: box [runtime]System.Int32 IL_0015: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_001a: ldstr "{0}" IL_001f: ldloc.2 IL_0020: box [runtime]System.Int32 IL_0025: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_002a: ldloc.1 IL_002b: ldc.i4.1 IL_002c: add @@ -275,79 +239,79 @@ IL_0034: ret } - .method public static void testSimpleForEachListLoopWithOneStatement(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed + .method public static void testSimpleForEachIntLoopDownWithOneStatement(int32 start, + int32 stop) 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.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0008: stloc.1 - IL_0009: br.s IL_002b + .maxstack 5 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.1 + IL_0001: stloc.1 + IL_0002: ldarg.0 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: bgt.s IL_0022 - IL_000b: ldloc.0 - IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: box [runtime]System.Int32 - IL_001d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0022: ldloc.1 - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: brtrue.s IL_000b + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [runtime]System.Int32 + IL_0013: call void [runtime]System.Console::WriteLine(string, + object) + IL_0018: ldloc.1 + IL_0019: ldc.i4.1 + IL_001a: sub + IL_001b: stloc.1 + IL_001c: ldloc.1 + IL_001d: ldloc.0 + IL_001e: ldc.i4.1 + IL_001f: sub + IL_0020: bne.un.s IL_0008 - IL_002e: ret + IL_0022: ret } - .method public static void testSimpleForEachListLoopWithTwoStatements(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed + .method public static void testSimpleForEachIntLoopDownWithTwoStatements(int32 start, + int32 stop) 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.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0008: stloc.1 - IL_0009: br.s IL_003b + .maxstack 5 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.1 + IL_0001: stloc.1 + IL_0002: ldarg.0 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: bgt.s IL_0032 - IL_000b: ldloc.0 - IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: box [runtime]System.Int32 - IL_001d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0022: ldstr "{0}" - IL_0027: ldloc.2 - IL_0028: box [runtime]System.Int32 - IL_002d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0032: ldloc.1 - IL_0033: stloc.0 - IL_0034: ldloc.0 - IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003a: stloc.1 - IL_003b: ldloc.1 - IL_003c: brtrue.s IL_000b + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [runtime]System.Int32 + IL_0013: call void [runtime]System.Console::WriteLine(string, + object) + IL_0018: ldstr "{0}" + IL_001d: ldloc.1 + IL_001e: box [runtime]System.Int32 + IL_0023: call void [runtime]System.Console::WriteLine(string, + object) + IL_0028: ldloc.1 + IL_0029: ldc.i4.1 + IL_002a: sub + IL_002b: stloc.1 + IL_002c: ldloc.1 + IL_002d: ldloc.0 + IL_002e: ldc.i4.1 + IL_002f: sub + IL_0030: bne.un.s IL_0008 - IL_003e: ret + IL_0032: ret } - .method public static void testSimpleForEachIntRangeLoopWithOneStatement(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntLoopWithOneStatement(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -365,7 +329,7 @@ IL_000d: ldloc.1 IL_000e: box [runtime]System.Int32 IL_0013: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_0018: ldloc.1 IL_0019: ldc.i4.1 IL_001a: add @@ -379,8 +343,8 @@ IL_0022: ret } - .method public static void testSimpleForEachIntRangeLoopWithTwoStatements(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntLoopWithTwoStatements(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -398,12 +362,12 @@ IL_000d: ldloc.1 IL_000e: box [runtime]System.Int32 IL_0013: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_0018: ldstr "{0}" IL_001d: ldloc.1 IL_001e: box [runtime]System.Int32 IL_0023: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_0028: ldloc.1 IL_0029: ldc.i4.1 IL_002a: add @@ -457,7 +421,7 @@ IL_0020: ldloc.3 IL_0021: box [runtime]System.Int32 IL_0026: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_002b: ldloc.2 IL_002c: ldc.i4.m1 IL_002d: add @@ -514,12 +478,12 @@ IL_0020: ldloc.3 IL_0021: box [runtime]System.Int32 IL_0026: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_002b: ldstr "{0}" IL_0030: ldloc.3 IL_0031: box [runtime]System.Int32 IL_0036: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_003b: ldloc.2 IL_003c: ldc.i4.m1 IL_003d: add @@ -536,8 +500,8 @@ IL_0048: ret } - .method public static void testSimpleForEachIntLoopWithOneStatement(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntRangeLoopWithOneStatement(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -555,7 +519,7 @@ IL_000d: ldloc.1 IL_000e: box [runtime]System.Int32 IL_0013: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_0018: ldloc.1 IL_0019: ldc.i4.1 IL_001a: add @@ -569,8 +533,8 @@ IL_0022: ret } - .method public static void testSimpleForEachIntLoopWithTwoStatements(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntRangeLoopWithTwoStatements(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -588,12 +552,12 @@ IL_000d: ldloc.1 IL_000e: box [runtime]System.Int32 IL_0013: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_0018: ldstr "{0}" IL_001d: ldloc.1 IL_001e: box [runtime]System.Int32 IL_0023: call void [runtime]System.Console::WriteLine(string, - object) + object) IL_0028: ldloc.1 IL_0029: ldc.i4.1 IL_002a: add @@ -607,130 +571,176 @@ IL_0032: ret } - .method public static void testSimpleForEachIntLoopDownWithOneStatement(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachListLoopWithOneStatement(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed { - .maxstack 5 - .locals init (int32 V_0, - int32 V_1) - IL_0000: ldarg.1 - IL_0001: stloc.1 - IL_0002: ldarg.0 - IL_0003: stloc.0 - IL_0004: ldloc.0 - IL_0005: ldloc.1 - IL_0006: bgt.s IL_0022 + .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.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: stloc.1 + IL_0009: br.s IL_002b - IL_0008: ldstr "{0}" - IL_000d: ldloc.1 - IL_000e: box [runtime]System.Int32 - IL_0013: call void [runtime]System.Console::WriteLine(string, - object) - IL_0018: ldloc.1 - IL_0019: ldc.i4.1 - IL_001a: sub - IL_001b: stloc.1 - IL_001c: ldloc.1 - IL_001d: ldloc.0 - IL_001e: ldc.i4.1 - IL_001f: sub - IL_0020: bne.un.s IL_0008 + IL_000b: ldloc.0 + IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0022: ldloc.1 + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002a: stloc.1 + IL_002b: ldloc.1 + IL_002c: brtrue.s IL_000b - IL_0022: ret + IL_002e: ret } - .method public static void testSimpleForEachIntLoopDownWithTwoStatements(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachListLoopWithTwoStatements(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed { - .maxstack 5 - .locals init (int32 V_0, - int32 V_1) - IL_0000: ldarg.1 - IL_0001: stloc.1 - IL_0002: ldarg.0 - IL_0003: stloc.0 - IL_0004: ldloc.0 - IL_0005: ldloc.1 - IL_0006: bgt.s IL_0032 + .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.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: stloc.1 + IL_0009: br.s IL_003b - IL_0008: ldstr "{0}" - IL_000d: ldloc.1 - IL_000e: box [runtime]System.Int32 - IL_0013: call void [runtime]System.Console::WriteLine(string, - object) - IL_0018: ldstr "{0}" - IL_001d: ldloc.1 - IL_001e: box [runtime]System.Int32 - IL_0023: call void [runtime]System.Console::WriteLine(string, - object) - IL_0028: ldloc.1 - IL_0029: ldc.i4.1 - IL_002a: sub - IL_002b: stloc.1 - IL_002c: ldloc.1 - IL_002d: ldloc.0 - IL_002e: ldc.i4.1 - IL_002f: sub - IL_0030: bne.un.s IL_0008 + IL_000b: ldloc.0 + IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0022: ldstr "{0}" + IL_0027: ldloc.2 + IL_0028: box [runtime]System.Int32 + IL_002d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0032: ldloc.1 + IL_0033: stloc.0 + IL_0034: ldloc.0 + IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003a: stloc.1 + IL_003b: ldloc.1 + IL_003c: brtrue.s IL_000b - IL_0032: ret + IL_003e: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest7() cil managed + .method public static void testSimpleForEachSeqLoopWithOneStatement(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed { .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, + .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, int32 V_2, - int32 V_3) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.1 - IL_0004: stloc.2 - IL_0005: br.s IL_002b - - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 - IL_000b: ldstr "hello" - IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0015: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_001a: pop - IL_001b: ldloc.3 - IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0021: nop - IL_0022: ldloc.2 - IL_0023: ldc.i4.1 - IL_0024: add - IL_0025: stloc.2 - IL_0026: ldloc.1 - IL_0027: ldc.i4.1 - IL_0028: conv.i8 - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: ldc.i4.4 - IL_002d: conv.i8 - IL_002e: blt.un.s IL_0007 + class [runtime]System.IDisposable V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0008: stloc.1 + .try + { + IL_0009: br.s IL_0022 + + IL_000b: ldloc.1 + IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0022: ldloc.1 + IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0028: brtrue.s IL_000b + + IL_002a: leave.s IL_003e - IL_0030: ldloca.s V_0 - IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0037: ret + } + finally + { + IL_002c: ldloc.1 + IL_002d: isinst [runtime]System.IDisposable + IL_0032: stloc.3 + IL_0033: ldloc.3 + IL_0034: brfalse.s IL_003d + + IL_0036: ldloc.3 + IL_0037: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003c: endfinally + IL_003d: endfinally + } + IL_003e: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public static void testSimpleForEachSeqLoopWithTwoStatements(class [runtime]System.Collections.Generic.IEnumerable`1 inp) 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 + .maxstack 4 + .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, + int32 V_2, + class [runtime]System.IDisposable V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0008: stloc.1 + .try + { + IL_0009: br.s IL_0032 + + IL_000b: ldloc.1 + IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0022: ldstr "{0}" + IL_0027: ldloc.2 + IL_0028: box [runtime]System.Int32 + IL_002d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0032: ldloc.1 + IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0038: brtrue.s IL_000b + + IL_003a: leave.s IL_004e + + } + finally + { + IL_003c: ldloc.1 + IL_003d: isinst [runtime]System.IDisposable + IL_0042: stloc.3 + IL_0043: ldloc.3 + IL_0044: brfalse.s IL_004d + + IL_0046: ldloc.3 + IL_0047: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004c: endfinally + IL_004d: endfinally + } + IL_004e: ret } .method assembly static void staticInitialization@() cil managed @@ -738,51 +748,54 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [runtime]System.Exception V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_3) + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + class [runtime]System.Exception V_3, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4) IL_0000: ldc.i4.0 IL_0001: stsfld int32 SeqExpressionSteppingTest7::r@4 IL_0006: ldstr "res = %A" IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,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,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(string) IL_0010: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0015: stloc.0 + IL_0016: ldloc.0 + IL_0017: stloc.1 .try { - IL_0016: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest7::f() - IL_001b: stloc.1 - IL_001c: leave.s IL_004b + IL_0018: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest7::f() + IL_001d: stloc.2 + IL_001e: leave.s IL_004f } catch [runtime]System.Object { - IL_001e: castclass [runtime]System.Exception - IL_0023: stloc.2 - IL_0024: ldloc.2 - IL_0025: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) - IL_002a: stloc.3 - IL_002b: ldloc.3 - IL_002c: brfalse.s IL_0040 - - IL_002e: call int32 SeqExpressionSteppingTest7::get_r() - IL_0033: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0038: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0020: castclass [runtime]System.Exception + IL_0025: stloc.3 + IL_0026: ldloc.3 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_0044 + + IL_0032: call int32 SeqExpressionSteppingTest7::get_r() + IL_0037: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_003c: 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_003d: stloc.1 - IL_003e: leave.s IL_004b + IL_0041: stloc.2 + IL_0042: leave.s IL_004f - IL_0040: rethrow - IL_0042: ldnull - IL_0043: unbox.any class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - IL_0048: stloc.1 - IL_0049: leave.s IL_004b + IL_0044: rethrow + IL_0046: ldnull + IL_0047: unbox.any class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + IL_004c: stloc.2 + IL_004d: leave.s IL_004f } - IL_004b: ldloc.0 - IL_004c: ldloc.1 - IL_004d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_0052: pop - IL_0053: ret + IL_004f: ldloc.1 + IL_0050: ldloc.2 + IL_0051: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_0056: pop + IL_0057: ret } .property int32 r() @@ -815,4 +828,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.netcore.bsl index 36d7b5fc66a..3b50437eb13 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.netcore.bsl @@ -36,21 +36,65 @@ .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 int32 r@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 int32 get_r() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32 SeqExpressionSteppingTest7::r@4 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest7::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest7::init@ + IL_000b: pop + IL_000c: ret } - .method public specialname static void set_r(int32 'value') cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest7() cil managed { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 SeqExpressionSteppingTest7::r@4 - IL_0006: ret + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + uint64 V_1, + int32 V_2, + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.1 + IL_0004: stloc.2 + IL_0005: br.s IL_0033 + + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldstr "hello" + IL_0014: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.3 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.2 + IL_002b: ldc.i4.1 + IL_002c: add + IL_002d: stloc.2 + IL_002e: ldloc.1 + IL_002f: ldc.i4.1 + IL_0030: conv.i8 + IL_0031: add + IL_0032: stloc.1 + IL_0033: ldloc.1 + IL_0034: ldc.i4.4 + IL_0035: conv.i8 + IL_0036: blt.un.s IL_0007 + + IL_0038: ldloca.s V_0 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f() cil managed @@ -93,105 +137,21 @@ IL_003c: ret } - .method public static void testSimpleForEachSeqLoopWithOneStatement(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed + .method public specialname static int32 get_r() cil managed { - .maxstack 4 - .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - int32 V_2, - class [runtime]System.IDisposable V_3) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0008: stloc.1 - .try - { - IL_0009: br.s IL_0022 - - IL_000b: ldloc.1 - IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: box [runtime]System.Int32 - IL_001d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0022: ldloc.1 - IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0028: brtrue.s IL_000b - - IL_002a: leave.s IL_003e - - } - finally - { - IL_002c: ldloc.1 - IL_002d: isinst [runtime]System.IDisposable - IL_0032: stloc.3 - IL_0033: ldloc.3 - IL_0034: brfalse.s IL_003d - - IL_0036: ldloc.3 - IL_0037: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003c: endfinally - IL_003d: endfinally - } - IL_003e: ret + .maxstack 8 + IL_0000: ldsfld int32 SeqExpressionSteppingTest7::r@4 + IL_0005: ret } - .method public static void testSimpleForEachSeqLoopWithTwoStatements(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed + .method public specialname static void set_r(int32 'value') cil managed { - .maxstack 4 - .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - int32 V_2, - class [runtime]System.IDisposable V_3) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0008: stloc.1 - .try - { - IL_0009: br.s IL_0032 - - IL_000b: ldloc.1 - IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: box [runtime]System.Int32 - IL_001d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0022: ldstr "{0}" - IL_0027: ldloc.2 - IL_0028: box [runtime]System.Int32 - IL_002d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000b - - IL_003a: leave.s IL_004e - - } - finally - { - IL_003c: ldloc.1 - IL_003d: isinst [runtime]System.IDisposable - IL_0042: stloc.3 - IL_0043: ldloc.3 - IL_0044: brfalse.s IL_004d - - IL_0046: ldloc.3 - IL_0047: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004c: endfinally - IL_004d: endfinally - } - IL_004e: ret + IL_0001: stsfld int32 SeqExpressionSteppingTest7::r@4 + IL_0006: ret } .method public static void testSimpleForEachArrayLoopWithOneStatement(int32[] inp) cil managed @@ -269,91 +229,20 @@ IL_0034: ret } - .method public static void testSimpleForEachListLoopWithOneStatement(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) 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.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0008: stloc.1 - IL_0009: br.s IL_002b - - IL_000b: ldloc.0 - IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: box [runtime]System.Int32 - IL_001d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0022: ldloc.1 - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: brtrue.s IL_000b - - IL_002e: ret - } - - .method public static void testSimpleForEachListLoopWithTwoStatements(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) 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.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0008: stloc.1 - IL_0009: br.s IL_003b - - IL_000b: ldloc.0 - IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0011: stloc.2 - IL_0012: ldstr "{0}" - IL_0017: ldloc.2 - IL_0018: box [runtime]System.Int32 - IL_001d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0022: ldstr "{0}" - IL_0027: ldloc.2 - IL_0028: box [runtime]System.Int32 - IL_002d: call void [runtime]System.Console::WriteLine(string, - object) - IL_0032: ldloc.1 - IL_0033: stloc.0 - IL_0034: ldloc.0 - IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003a: stloc.1 - IL_003b: ldloc.1 - IL_003c: brtrue.s IL_000b - - IL_003e: ret - } - - .method public static void testSimpleForEachIntRangeLoopWithOneStatement(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntLoopDownWithOneStatement(int32 start, + int32 stop) cil managed { .maxstack 5 .locals init (int32 V_0, int32 V_1) - IL_0000: ldarg.0 + IL_0000: ldarg.1 IL_0001: stloc.1 - IL_0002: ldarg.1 + IL_0002: ldarg.0 IL_0003: stloc.0 IL_0004: ldloc.0 IL_0005: ldloc.1 - IL_0006: blt.s IL_0022 + IL_0006: bgt.s IL_0022 IL_0008: ldstr "{0}" IL_000d: ldloc.1 @@ -362,31 +251,31 @@ object) IL_0018: ldloc.1 IL_0019: ldc.i4.1 - IL_001a: add + IL_001a: sub IL_001b: stloc.1 IL_001c: ldloc.1 IL_001d: ldloc.0 IL_001e: ldc.i4.1 - IL_001f: add + IL_001f: sub IL_0020: bne.un.s IL_0008 IL_0022: ret } - .method public static void testSimpleForEachIntRangeLoopWithTwoStatements(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntLoopDownWithTwoStatements(int32 start, + int32 stop) cil managed { .maxstack 5 .locals init (int32 V_0, int32 V_1) - IL_0000: ldarg.0 + IL_0000: ldarg.1 IL_0001: stloc.1 - IL_0002: ldarg.1 + IL_0002: ldarg.0 IL_0003: stloc.0 IL_0004: ldloc.0 IL_0005: ldloc.1 - IL_0006: blt.s IL_0032 + IL_0006: bgt.s IL_0032 IL_0008: ldstr "{0}" IL_000d: ldloc.1 @@ -400,7 +289,78 @@ object) IL_0028: ldloc.1 IL_0029: ldc.i4.1 - IL_002a: add + IL_002a: sub + IL_002b: stloc.1 + IL_002c: ldloc.1 + IL_002d: ldloc.0 + IL_002e: ldc.i4.1 + IL_002f: sub + IL_0030: bne.un.s IL_0008 + + IL_0032: ret + } + + .method public static void testSimpleForEachIntLoopWithOneStatement(int32 start, + int32 stop) cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.0 + IL_0001: stloc.1 + IL_0002: ldarg.1 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: blt.s IL_0022 + + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [runtime]System.Int32 + IL_0013: call void [runtime]System.Console::WriteLine(string, + object) + IL_0018: ldloc.1 + IL_0019: ldc.i4.1 + IL_001a: add + IL_001b: stloc.1 + IL_001c: ldloc.1 + IL_001d: ldloc.0 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: bne.un.s IL_0008 + + IL_0022: ret + } + + .method public static void testSimpleForEachIntLoopWithTwoStatements(int32 start, + int32 stop) cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.0 + IL_0001: stloc.1 + IL_0002: ldarg.1 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: blt.s IL_0032 + + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [runtime]System.Int32 + IL_0013: call void [runtime]System.Console::WriteLine(string, + object) + IL_0018: ldstr "{0}" + IL_001d: ldloc.1 + IL_001e: box [runtime]System.Int32 + IL_0023: call void [runtime]System.Console::WriteLine(string, + object) + IL_0028: ldloc.1 + IL_0029: ldc.i4.1 + IL_002a: add IL_002b: stloc.1 IL_002c: ldloc.1 IL_002d: ldloc.0 @@ -530,8 +490,8 @@ IL_0048: ret } - .method public static void testSimpleForEachIntLoopWithOneStatement(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntRangeLoopWithOneStatement(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -563,8 +523,8 @@ IL_0022: ret } - .method public static void testSimpleForEachIntLoopWithTwoStatements(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachIntRangeLoopWithTwoStatements(int32 start, + int32 stop) cil managed { .maxstack 5 @@ -601,136 +561,176 @@ IL_0032: ret } - .method public static void testSimpleForEachIntLoopDownWithOneStatement(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachListLoopWithOneStatement(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed { - .maxstack 5 - .locals init (int32 V_0, - int32 V_1) - IL_0000: ldarg.1 - IL_0001: stloc.1 - IL_0002: ldarg.0 - IL_0003: stloc.0 - IL_0004: ldloc.0 - IL_0005: ldloc.1 - IL_0006: bgt.s IL_0022 + .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.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: stloc.1 + IL_0009: br.s IL_002b - IL_0008: ldstr "{0}" - IL_000d: ldloc.1 - IL_000e: box [runtime]System.Int32 - IL_0013: call void [runtime]System.Console::WriteLine(string, + IL_000b: ldloc.0 + IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, object) - IL_0018: ldloc.1 - IL_0019: ldc.i4.1 - IL_001a: sub - IL_001b: stloc.1 - IL_001c: ldloc.1 - IL_001d: ldloc.0 - IL_001e: ldc.i4.1 - IL_001f: sub - IL_0020: bne.un.s IL_0008 + IL_0022: ldloc.1 + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002a: stloc.1 + IL_002b: ldloc.1 + IL_002c: brtrue.s IL_000b - IL_0022: ret + IL_002e: ret } - .method public static void testSimpleForEachIntLoopDownWithTwoStatements(int32 start, - int32 stop) cil managed + .method public static void testSimpleForEachListLoopWithTwoStatements(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed { - .maxstack 5 - .locals init (int32 V_0, - int32 V_1) - IL_0000: ldarg.1 - IL_0001: stloc.1 - IL_0002: ldarg.0 - IL_0003: stloc.0 - IL_0004: ldloc.0 - IL_0005: ldloc.1 - IL_0006: bgt.s IL_0032 + .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.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: stloc.1 + IL_0009: br.s IL_003b - IL_0008: ldstr "{0}" - IL_000d: ldloc.1 - IL_000e: box [runtime]System.Int32 - IL_0013: call void [runtime]System.Console::WriteLine(string, + IL_000b: ldloc.0 + IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, object) - IL_0018: ldstr "{0}" - IL_001d: ldloc.1 - IL_001e: box [runtime]System.Int32 - IL_0023: call void [runtime]System.Console::WriteLine(string, + IL_0022: ldstr "{0}" + IL_0027: ldloc.2 + IL_0028: box [runtime]System.Int32 + IL_002d: call void [runtime]System.Console::WriteLine(string, object) - IL_0028: ldloc.1 - IL_0029: ldc.i4.1 - IL_002a: sub - IL_002b: stloc.1 - IL_002c: ldloc.1 - IL_002d: ldloc.0 - IL_002e: ldc.i4.1 - IL_002f: sub - IL_0030: bne.un.s IL_0008 + IL_0032: ldloc.1 + IL_0033: stloc.0 + IL_0034: ldloc.0 + IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003a: stloc.1 + IL_003b: ldloc.1 + IL_003c: brtrue.s IL_000b - IL_0032: ret + IL_003e: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest7() cil managed + .method public static void testSimpleForEachSeqLoopWithOneStatement(class [runtime]System.Collections.Generic.IEnumerable`1 inp) cil managed { .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - uint64 V_1, + .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, int32 V_2, - int32 V_3, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldc.i4.1 - IL_0004: stloc.2 - IL_0005: br.s IL_0033 + class [runtime]System.IDisposable V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0008: stloc.1 + .try + { + IL_0009: br.s IL_0022 - IL_0007: ldloc.2 - IL_0008: stloc.3 - IL_0009: ldloca.s V_0 - IL_000b: stloc.s V_4 - IL_000d: ldloc.s V_4 - IL_000f: ldstr "hello" - IL_0014: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_001e: pop - IL_001f: stloc.s V_5 - IL_0021: ldloc.s V_5 - IL_0023: ldloc.3 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.2 - IL_002b: ldc.i4.1 - IL_002c: add - IL_002d: stloc.2 - IL_002e: ldloc.1 - IL_002f: ldc.i4.1 - IL_0030: conv.i8 - IL_0031: add - IL_0032: stloc.1 - IL_0033: ldloc.1 - IL_0034: ldc.i4.4 - IL_0035: conv.i8 - IL_0036: blt.un.s IL_0007 + IL_000b: ldloc.1 + IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0022: ldloc.1 + IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0028: brtrue.s IL_000b - IL_0038: ldloca.s V_0 - IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003f: ret + IL_002a: leave.s IL_003e + + } + finally + { + IL_002c: ldloc.1 + IL_002d: isinst [runtime]System.IDisposable + IL_0032: stloc.3 + IL_0033: ldloc.3 + IL_0034: brfalse.s IL_003d + + IL_0036: ldloc.3 + IL_0037: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003c: endfinally + IL_003d: endfinally + } + IL_003e: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public static void testSimpleForEachSeqLoopWithTwoStatements(class [runtime]System.Collections.Generic.IEnumerable`1 inp) 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 + .maxstack 4 + .locals init (class [runtime]System.Collections.Generic.IEnumerable`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, + int32 V_2, + class [runtime]System.IDisposable V_3) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0008: stloc.1 + .try + { + IL_0009: br.s IL_0032 + + IL_000b: ldloc.1 + IL_000c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0011: stloc.2 + IL_0012: ldstr "{0}" + IL_0017: ldloc.2 + IL_0018: box [runtime]System.Int32 + IL_001d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0022: ldstr "{0}" + IL_0027: ldloc.2 + IL_0028: box [runtime]System.Int32 + IL_002d: call void [runtime]System.Console::WriteLine(string, + object) + IL_0032: ldloc.1 + IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0038: brtrue.s IL_000b + + IL_003a: leave.s IL_004e + + } + finally + { + IL_003c: ldloc.1 + IL_003d: isinst [runtime]System.IDisposable + IL_0042: stloc.3 + IL_0043: ldloc.3 + IL_0044: brfalse.s IL_004d + + IL_0046: ldloc.3 + IL_0047: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004c: endfinally + IL_004d: endfinally + } + IL_004e: ret } .method assembly static void staticInitialization@() cil managed 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..4d1aaef1a30 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs.il.bsl @@ -67,6 +67,16 @@ IL_001b: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 assembly/rwalk@3::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -126,14 +136,20 @@ IL_0067: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.3 - IL_0002: stfld int32 assembly/rwalk@3::pc - IL_0007: ret + IL_0001: ldfld int32 assembly/rwalk@3::x + IL_0006: ldc.i4.0 + IL_0007: ldc.i4.0 + IL_0008: newobj instance void assembly/rwalk@3::.ctor(int32, + int32, + int32) + IL_000d: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -185,22 +201,6 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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/rwalk@3::x - IL_0006: ldc.i4.0 - IL_0007: ldc.i4.0 - IL_0008: newobj instance void assembly/rwalk@3::.ctor(int32, - int32, - int32) - IL_000d: ret - } - } .method public static class [runtime]System.Collections.Generic.IEnumerable`1 rwalk(int32 x) cil managed @@ -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..6171fc46f69 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs.il.bsl @@ -67,6 +67,16 @@ IL_001b: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 assembly/rwalk1@5::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -126,14 +136,20 @@ IL_0067: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.3 - IL_0002: stfld int32 assembly/rwalk1@5::pc - IL_0007: ret + IL_0001: ldfld int32 assembly/rwalk1@5::x + IL_0006: ldc.i4.0 + IL_0007: ldc.i4.0 + IL_0008: newobj instance void assembly/rwalk1@5::.ctor(int32, + int32, + int32) + IL_000d: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -185,22 +201,6 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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/rwalk1@5::x - IL_0006: ldc.i4.0 - IL_0007: ldc.i4.0 - IL_0008: newobj instance void assembly/rwalk1@5::.ctor(int32, - int32, - int32) - IL_000d: ret - } - } .class auto autochar serializable sealed nested assembly beforefieldinit specialname rwalk2@6 @@ -237,6 +237,16 @@ IL_001b: ret } + .method public strict virtual instance void Close() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: stfld int32 assembly/rwalk2@6::pc + IL_0007: ret + } + .method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1& next) cil managed { @@ -296,14 +306,20 @@ IL_0067: ret } - .method public strict virtual instance void Close() cil managed + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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: ldc.i4.3 - IL_0002: stfld int32 assembly/rwalk2@6::pc - IL_0007: ret + IL_0001: ldfld int32 assembly/rwalk2@6::x + IL_0006: ldc.i4.0 + IL_0007: ldc.i4.0 + IL_0008: newobj instance void assembly/rwalk2@6::.ctor(int32, + int32, + int32) + IL_000d: ret } .method public strict virtual instance bool get_CheckClose() cil managed @@ -355,22 +371,6 @@ IL_0006: ret } - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() 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/rwalk2@6::x - IL_0006: ldc.i4.0 - IL_0007: ldc.i4.0 - IL_0008: newobj instance void assembly/rwalk2@6::.ctor(int32, - int32, - int32) - IL_000d: ret - } - } .method public static class [runtime]System.Collections.Generic.IEnumerable`1 rwalk1(int32 x) cil managed @@ -418,4 +418,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl index a2dd006417a..1341a85567e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl @@ -1,8 +1,3 @@ -Module::|Id| - (4,23-4,24) x - IL_0000: ldarg.0 - IL_0001: ret - Module::f (7,5-10,7) [| for Id i in l do yield i |] IL_0000: nop @@ -56,3 +51,8 @@ Module::f IL_004a: ldloca.s 0 IL_004c: call Close IL_0051: ret + +Module::|Id| + (4,23-4,24) x + IL_0000: ldarg.0 + IL_0001: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - ActivePattern 01.bsl index 735b64ef291..cd1046c6912 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - ActivePattern 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - ActivePattern 01.bsl @@ -1,8 +1,3 @@ -Module::|Id| - (4,23-4,24) x - IL_0000: ldarg.0 - IL_0001: ret - Module::f (7,17-7,18) l IL_0000: ldarg.0 @@ -38,3 +33,8 @@ Module::f IL_001c: conv.i4 IL_001d: blt.s IL_0006 IL_001f: ret + +Module::|Id| + (4,23-4,24) x + IL_0000: ldarg.0 + IL_0001: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - ActivePattern 01.bsl index 08615e86be6..621e60cef4c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - ActivePattern 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - ActivePattern 01.bsl @@ -1,8 +1,3 @@ -Module::|Id| - (4,23-4,24) x - IL_0000: ldarg.0 - IL_0001: ret - Module::f (7,5-10,6) [ for Id i in l do yield i ] IL_0000: nop @@ -42,3 +37,8 @@ Module::f IL_0039: ldloca.s 0 IL_003b: call Close IL_0040: ret + +Module::|Id| + (4,23-4,24) x + IL_0000: ldarg.0 + IL_0001: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - ActivePattern 01.bsl index 04c4ef9351d..15c9beace77 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - ActivePattern 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - ActivePattern 01.bsl @@ -1,8 +1,3 @@ -Module::|Id| - (4,23-4,24) x - IL_0000: ldarg.0 - IL_0001: ret - Module::f (7,17-7,18) l IL_0000: ldarg.0 @@ -36,3 +31,8 @@ Module::f IL_0026: ldloc.1 IL_0027: brtrue.s IL_000b IL_0029: ret + +Module::|Id| + (4,23-4,24) x + IL_0000: ldarg.0 + IL_0001: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl index a1d4ee342ca..aa5630f6bc4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl @@ -1,8 +1,3 @@ -Module::|Id| - (4,23-4,24) x - IL_0000: ldarg.0 - IL_0001: ret - Module::f (7,5-10,6) seq { for Id i in l do yield i } IL_0000: ldarg.0 @@ -12,84 +7,10 @@ Module::f IL_0004: newobj .ctor IL_0009: ret -f@8::GenerateNext - +Module::|Id| + (4,23-4,24) x IL_0000: ldarg.0 - IL_0001: ldfld pc - IL_0006: ldc.i4.1 - IL_0007: sub - IL_0008: switch (3 targets) - IL_0019: br.s IL_0024 - - - IL_001b: nop - IL_001c: br.s IL_0073 - - - IL_001e: nop - IL_001f: br.s IL_0066 - - - IL_0021: nop - IL_0022: br.s IL_0094 - - - IL_0024: nop - IL_0025: br.s IL_0027 - - (8,9-8,12) for - IL_0027: ldarg.0 - IL_0028: ldarg.0 - IL_0029: ldfld l - IL_002e: callvirt GetEnumerator - IL_0033: stfld enum - IL_0038: ldarg.0 - IL_0039: ldc.i4.1 - IL_003a: stfld pc - IL_003f: br.s IL_0066 - IL_0041: ldarg.0 - IL_0042: ldfld enum - IL_0047: callvirt get_Current - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: call |Id| - IL_0053: stloc.1 - IL_0054: ldloc.1 - IL_0055: stloc.2 - - (9,13-9,20) yield i - IL_0056: ldarg.0 - IL_0057: ldc.i4.2 - IL_0058: stfld pc - IL_005d: ldarg.0 - IL_005e: ldloc.2 - IL_005f: stfld current - IL_0064: ldc.i4.1 - IL_0065: ret - - (8,18-8,20) in - IL_0066: ldarg.0 - IL_0067: ldfld enum - IL_006c: callvirt MoveNext - IL_0071: brtrue.s IL_0041 - IL_0073: ldarg.0 - IL_0074: ldc.i4.3 - IL_0075: stfld pc - IL_007a: ldarg.0 - IL_007b: ldfld enum - IL_0080: call Dispose - IL_0085: nop - IL_0086: ldarg.0 - IL_0087: ldnull - IL_0088: stfld enum - IL_008d: ldarg.0 - IL_008e: ldc.i4.3 - IL_008f: stfld pc - IL_0094: ldarg.0 - IL_0095: ldc.i4.0 - IL_0096: stfld current - IL_009b: ldc.i4.0 - IL_009c: ret + IL_0001: ret f@8::Close @@ -175,6 +96,85 @@ f@8::Close +f@8::GenerateNext + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch (3 targets) + IL_0019: br.s IL_0024 + + + IL_001b: nop + IL_001c: br.s IL_0073 + + + IL_001e: nop + IL_001f: br.s IL_0066 + + + IL_0021: nop + IL_0022: br.s IL_0094 + + + IL_0024: nop + IL_0025: br.s IL_0027 + + (8,9-8,12) for + IL_0027: ldarg.0 + IL_0028: ldarg.0 + IL_0029: ldfld l + IL_002e: callvirt GetEnumerator + IL_0033: stfld enum + IL_0038: ldarg.0 + IL_0039: ldc.i4.1 + IL_003a: stfld pc + IL_003f: br.s IL_0066 + IL_0041: ldarg.0 + IL_0042: ldfld enum + IL_0047: callvirt get_Current + IL_004c: stloc.0 + IL_004d: ldloc.0 + IL_004e: call |Id| + IL_0053: stloc.1 + IL_0054: ldloc.1 + IL_0055: stloc.2 + + (9,13-9,20) yield i + IL_0056: ldarg.0 + IL_0057: ldc.i4.2 + IL_0058: stfld pc + IL_005d: ldarg.0 + IL_005e: ldloc.2 + IL_005f: stfld current + IL_0064: ldc.i4.1 + IL_0065: ret + + (8,18-8,20) in + IL_0066: ldarg.0 + IL_0067: ldfld enum + IL_006c: callvirt MoveNext + IL_0071: brtrue.s IL_0041 + IL_0073: ldarg.0 + IL_0074: ldc.i4.3 + IL_0075: stfld pc + IL_007a: ldarg.0 + IL_007b: ldfld enum + IL_0080: call Dispose + IL_0085: nop + IL_0086: ldarg.0 + IL_0087: ldnull + IL_0088: stfld enum + IL_008d: ldarg.0 + IL_008e: ldc.i4.3 + IL_008f: stfld pc + IL_0094: ldarg.0 + IL_0095: ldc.i4.0 + IL_0096: stfld current + IL_009b: ldc.i4.0 + IL_009c: ret + f@8::get_CheckClose IL_0000: ldarg.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl index c22c1947a13..e3ae578cdaa 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl @@ -7,82 +7,6 @@ Module::f IL_0004: newobj .ctor IL_0009: ret -f@6::GenerateNext - - IL_0000: ldarg.0 - IL_0001: ldfld pc - IL_0006: ldc.i4.1 - IL_0007: sub - IL_0008: switch (3 targets) - IL_0019: br.s IL_0024 - - - IL_001b: nop - IL_001c: br.s IL_006c - - - IL_001e: nop - IL_001f: br.s IL_005f - - - IL_0021: nop - IL_0022: br.s IL_008d - - - IL_0024: nop - IL_0025: br.s IL_0027 - - (6,9-6,12) for - IL_0027: ldarg.0 - IL_0028: ldarg.0 - IL_0029: ldfld l - IL_002e: callvirt GetEnumerator - IL_0033: stfld enum - IL_0038: ldarg.0 - IL_0039: ldc.i4.1 - IL_003a: stfld pc - IL_003f: br.s IL_005f - IL_0041: ldarg.0 - IL_0042: ldfld enum - IL_0047: callvirt get_Current - IL_004c: stloc.0 - IL_004d: ldarg.0 - IL_004e: ldc.i4.2 - IL_004f: stfld pc - IL_0054: ldarg.0 - IL_0055: stloc.1 - - (6,23-6,24) n - IL_0056: ldloc.1 - IL_0057: ldloc.0 - IL_0058: stfld current - IL_005d: ldc.i4.1 - IL_005e: ret - - (6,15-6,17) in - IL_005f: ldarg.0 - IL_0060: ldfld enum - IL_0065: callvirt MoveNext - IL_006a: brtrue.s IL_0041 - IL_006c: ldarg.0 - IL_006d: ldc.i4.3 - IL_006e: stfld pc - IL_0073: ldarg.0 - IL_0074: ldfld enum - IL_0079: call Dispose - IL_007e: nop - IL_007f: ldarg.0 - IL_0080: ldnull - IL_0081: stfld enum - IL_0086: ldarg.0 - IL_0087: ldc.i4.3 - IL_0088: stfld pc - IL_008d: ldarg.0 - IL_008e: ldc.i4.0 - IL_008f: stfld current - IL_0094: ldc.i4.0 - IL_0095: ret - f@6::Close IL_0000: ldarg.0 @@ -167,6 +91,82 @@ f@6::Close +f@6::GenerateNext + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch (3 targets) + IL_0019: br.s IL_0024 + + + IL_001b: nop + IL_001c: br.s IL_006c + + + IL_001e: nop + IL_001f: br.s IL_005f + + + IL_0021: nop + IL_0022: br.s IL_008d + + + IL_0024: nop + IL_0025: br.s IL_0027 + + (6,9-6,12) for + IL_0027: ldarg.0 + IL_0028: ldarg.0 + IL_0029: ldfld l + IL_002e: callvirt GetEnumerator + IL_0033: stfld enum + IL_0038: ldarg.0 + IL_0039: ldc.i4.1 + IL_003a: stfld pc + IL_003f: br.s IL_005f + IL_0041: ldarg.0 + IL_0042: ldfld enum + IL_0047: callvirt get_Current + IL_004c: stloc.0 + IL_004d: ldarg.0 + IL_004e: ldc.i4.2 + IL_004f: stfld pc + IL_0054: ldarg.0 + IL_0055: stloc.1 + + (6,23-6,24) n + IL_0056: ldloc.1 + IL_0057: ldloc.0 + IL_0058: stfld current + IL_005d: ldc.i4.1 + IL_005e: ret + + (6,15-6,17) in + IL_005f: ldarg.0 + IL_0060: ldfld enum + IL_0065: callvirt MoveNext + IL_006a: brtrue.s IL_0041 + IL_006c: ldarg.0 + IL_006d: ldc.i4.3 + IL_006e: stfld pc + IL_0073: ldarg.0 + IL_0074: ldfld enum + IL_0079: call Dispose + IL_007e: nop + IL_007f: ldarg.0 + IL_0080: ldnull + IL_0081: stfld enum + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld pc + IL_008d: ldarg.0 + IL_008e: ldc.i4.0 + IL_008f: stfld current + IL_0094: ldc.i4.0 + IL_0095: ret + f@6::get_CheckClose IL_0000: ldarg.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl index c87c15661e4..1c74a9151b8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl @@ -7,82 +7,6 @@ Module::f IL_0004: newobj .ctor IL_0009: ret -f@6::GenerateNext - - IL_0000: ldarg.0 - IL_0001: ldfld pc - IL_0006: ldc.i4.1 - IL_0007: sub - IL_0008: switch (3 targets) - IL_0019: br.s IL_0024 - - - IL_001b: nop - IL_001c: br.s IL_006c - - - IL_001e: nop - IL_001f: br.s IL_005f - - - IL_0021: nop - IL_0022: br.s IL_008d - - - IL_0024: nop - IL_0025: br.s IL_0027 - - (6,9-6,12) for - IL_0027: ldarg.0 - IL_0028: ldarg.0 - IL_0029: ldfld l - IL_002e: callvirt GetEnumerator - IL_0033: stfld enum - IL_0038: ldarg.0 - IL_0039: ldc.i4.1 - IL_003a: stfld pc - IL_003f: br.s IL_005f - IL_0041: ldarg.0 - IL_0042: ldfld enum - IL_0047: callvirt get_Current - IL_004c: stloc.0 - IL_004d: ldarg.0 - IL_004e: ldc.i4.2 - IL_004f: stfld pc - IL_0054: ldarg.0 - IL_0055: stloc.1 - - (7,13-7,20) yield n - IL_0056: ldloc.1 - IL_0057: ldloc.0 - IL_0058: stfld current - IL_005d: ldc.i4.1 - IL_005e: ret - - (6,15-6,17) in - IL_005f: ldarg.0 - IL_0060: ldfld enum - IL_0065: callvirt MoveNext - IL_006a: brtrue.s IL_0041 - IL_006c: ldarg.0 - IL_006d: ldc.i4.3 - IL_006e: stfld pc - IL_0073: ldarg.0 - IL_0074: ldfld enum - IL_0079: call Dispose - IL_007e: nop - IL_007f: ldarg.0 - IL_0080: ldnull - IL_0081: stfld enum - IL_0086: ldarg.0 - IL_0087: ldc.i4.3 - IL_0088: stfld pc - IL_008d: ldarg.0 - IL_008e: ldnull - IL_008f: stfld current - IL_0094: ldc.i4.0 - IL_0095: ret - f@6::Close IL_0000: ldarg.0 @@ -167,6 +91,82 @@ f@6::Close +f@6::GenerateNext + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch (3 targets) + IL_0019: br.s IL_0024 + + + IL_001b: nop + IL_001c: br.s IL_006c + + + IL_001e: nop + IL_001f: br.s IL_005f + + + IL_0021: nop + IL_0022: br.s IL_008d + + + IL_0024: nop + IL_0025: br.s IL_0027 + + (6,9-6,12) for + IL_0027: ldarg.0 + IL_0028: ldarg.0 + IL_0029: ldfld l + IL_002e: callvirt GetEnumerator + IL_0033: stfld enum + IL_0038: ldarg.0 + IL_0039: ldc.i4.1 + IL_003a: stfld pc + IL_003f: br.s IL_005f + IL_0041: ldarg.0 + IL_0042: ldfld enum + IL_0047: callvirt get_Current + IL_004c: stloc.0 + IL_004d: ldarg.0 + IL_004e: ldc.i4.2 + IL_004f: stfld pc + IL_0054: ldarg.0 + IL_0055: stloc.1 + + (7,13-7,20) yield n + IL_0056: ldloc.1 + IL_0057: ldloc.0 + IL_0058: stfld current + IL_005d: ldc.i4.1 + IL_005e: ret + + (6,15-6,17) in + IL_005f: ldarg.0 + IL_0060: ldfld enum + IL_0065: callvirt MoveNext + IL_006a: brtrue.s IL_0041 + IL_006c: ldarg.0 + IL_006d: ldc.i4.3 + IL_006e: stfld pc + IL_0073: ldarg.0 + IL_0074: ldfld enum + IL_0079: call Dispose + IL_007e: nop + IL_007f: ldarg.0 + IL_0080: ldnull + IL_0081: stfld enum + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld pc + IL_008d: ldarg.0 + IL_008e: ldnull + IL_008f: stfld current + IL_0094: ldc.i4.0 + IL_0095: ret + f@6::get_CheckClose IL_0000: ldarg.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl index 563e2b0a3f0..074677f7037 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl @@ -7,86 +7,6 @@ Module::f IL_0004: newobj .ctor IL_0009: ret -f@6::GenerateNext - - IL_0000: ldarg.0 - IL_0001: ldfld pc - IL_0006: ldc.i4.1 - IL_0007: sub - IL_0008: switch (3 targets) - IL_0019: br.s IL_0024 - - - IL_001b: nop - IL_001c: br.s IL_0078 - - - IL_001e: nop - IL_001f: br.s IL_006b - - - IL_0021: nop - IL_0022: br.s IL_0099 - - - IL_0024: nop - IL_0025: br.s IL_0027 - - (6,9-6,12) for - IL_0027: ldarg.0 - IL_0028: ldarg.0 - IL_0029: ldfld l - IL_002e: callvirt GetEnumerator - IL_0033: stfld enum - IL_0038: ldarg.0 - IL_0039: ldc.i4.1 - IL_003a: stfld pc - IL_003f: br.s IL_006b - IL_0041: ldarg.0 - IL_0042: ldfld enum - IL_0047: callvirt get_Current - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: call get_Item2 - IL_0053: stloc.1 - IL_0054: ldloc.0 - IL_0055: call get_Item1 - IL_005a: stloc.2 - - (7,13-7,20) yield i - IL_005b: ldarg.0 - IL_005c: ldc.i4.2 - IL_005d: stfld pc - IL_0062: ldarg.0 - IL_0063: ldloc.2 - IL_0064: stfld current - IL_0069: ldc.i4.1 - IL_006a: ret - - (6,19-6,21) in - IL_006b: ldarg.0 - IL_006c: ldfld enum - IL_0071: callvirt MoveNext - IL_0076: brtrue.s IL_0041 - IL_0078: ldarg.0 - IL_0079: ldc.i4.3 - IL_007a: stfld pc - IL_007f: ldarg.0 - IL_0080: ldfld enum - IL_0085: call Dispose - IL_008a: nop - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld enum - IL_0092: ldarg.0 - IL_0093: ldc.i4.3 - IL_0094: stfld pc - IL_0099: ldarg.0 - IL_009a: ldc.i4.0 - IL_009b: stfld current - IL_00a0: ldc.i4.0 - IL_00a1: ret - f@6::Close IL_0000: ldarg.0 @@ -171,6 +91,86 @@ f@6::Close +f@6::GenerateNext + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch (3 targets) + IL_0019: br.s IL_0024 + + + IL_001b: nop + IL_001c: br.s IL_0078 + + + IL_001e: nop + IL_001f: br.s IL_006b + + + IL_0021: nop + IL_0022: br.s IL_0099 + + + IL_0024: nop + IL_0025: br.s IL_0027 + + (6,9-6,12) for + IL_0027: ldarg.0 + IL_0028: ldarg.0 + IL_0029: ldfld l + IL_002e: callvirt GetEnumerator + IL_0033: stfld enum + IL_0038: ldarg.0 + IL_0039: ldc.i4.1 + IL_003a: stfld pc + IL_003f: br.s IL_006b + IL_0041: ldarg.0 + IL_0042: ldfld enum + IL_0047: callvirt get_Current + IL_004c: stloc.0 + IL_004d: ldloc.0 + IL_004e: call get_Item2 + IL_0053: stloc.1 + IL_0054: ldloc.0 + IL_0055: call get_Item1 + IL_005a: stloc.2 + + (7,13-7,20) yield i + IL_005b: ldarg.0 + IL_005c: ldc.i4.2 + IL_005d: stfld pc + IL_0062: ldarg.0 + IL_0063: ldloc.2 + IL_0064: stfld current + IL_0069: ldc.i4.1 + IL_006a: ret + + (6,19-6,21) in + IL_006b: ldarg.0 + IL_006c: ldfld enum + IL_0071: callvirt MoveNext + IL_0076: brtrue.s IL_0041 + IL_0078: ldarg.0 + IL_0079: ldc.i4.3 + IL_007a: stfld pc + IL_007f: ldarg.0 + IL_0080: ldfld enum + IL_0085: call Dispose + IL_008a: nop + IL_008b: ldarg.0 + IL_008c: ldnull + IL_008d: stfld enum + IL_0092: ldarg.0 + IL_0093: ldc.i4.3 + IL_0094: stfld pc + IL_0099: ldarg.0 + IL_009a: ldc.i4.0 + IL_009b: stfld current + IL_00a0: ldc.i4.0 + IL_00a1: ret + f@6::get_CheckClose IL_0000: ldarg.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl index 6e703a4a985..1aab5167431 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl @@ -15,84 +15,6 @@ Module::staticInitialization@ IL_0008: stsfld a@4 IL_000d: ret -a@6::GenerateNext - - IL_0000: ldarg.0 - IL_0001: ldfld pc - IL_0006: ldc.i4.1 - IL_0007: sub - IL_0008: switch (3 targets) - IL_0019: br.s IL_0024 - - - IL_001b: nop - IL_001c: br.s IL_006f - - - IL_001e: nop - IL_001f: br.s IL_0062 - - - IL_0021: nop - IL_0022: br.s IL_0090 - - - IL_0024: nop - IL_0025: br.s IL_0027 - - (6,9-6,12) for - IL_0027: ldarg.0 - IL_0028: ldc.i4.1 - IL_0029: ldc.i4.1 - IL_002a: ldc.i4.s 10 - IL_002c: call RangeInt32 - IL_0031: callvirt GetEnumerator - IL_0036: stfld enum - IL_003b: ldarg.0 - IL_003c: ldc.i4.1 - IL_003d: stfld pc - IL_0042: br.s IL_0062 - IL_0044: ldarg.0 - IL_0045: ldfld enum - IL_004a: callvirt get_Current - IL_004f: stloc.0 - IL_0050: ldarg.0 - IL_0051: ldc.i4.2 - IL_0052: stfld pc - IL_0057: ldarg.0 - IL_0058: stloc.1 - - (7,13-7,20) yield n - IL_0059: ldloc.1 - IL_005a: ldloc.0 - IL_005b: stfld current - IL_0060: ldc.i4.1 - IL_0061: ret - - (6,15-6,17) in - IL_0062: ldarg.0 - IL_0063: ldfld enum - IL_0068: callvirt MoveNext - IL_006d: brtrue.s IL_0044 - IL_006f: ldarg.0 - IL_0070: ldc.i4.3 - IL_0071: stfld pc - IL_0076: ldarg.0 - IL_0077: ldfld enum - IL_007c: call Dispose - IL_0081: nop - IL_0082: ldarg.0 - IL_0083: ldnull - IL_0084: stfld enum - IL_0089: ldarg.0 - IL_008a: ldc.i4.3 - IL_008b: stfld pc - IL_0090: ldarg.0 - IL_0091: ldc.i4.0 - IL_0092: stfld current - IL_0097: ldc.i4.0 - IL_0098: ret - a@6::Close IL_0000: ldarg.0 @@ -177,6 +99,84 @@ a@6::Close +a@6::GenerateNext + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch (3 targets) + IL_0019: br.s IL_0024 + + + IL_001b: nop + IL_001c: br.s IL_006f + + + IL_001e: nop + IL_001f: br.s IL_0062 + + + IL_0021: nop + IL_0022: br.s IL_0090 + + + IL_0024: nop + IL_0025: br.s IL_0027 + + (6,9-6,12) for + IL_0027: ldarg.0 + IL_0028: ldc.i4.1 + IL_0029: ldc.i4.1 + IL_002a: ldc.i4.s 10 + IL_002c: call RangeInt32 + IL_0031: callvirt GetEnumerator + IL_0036: stfld enum + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld pc + IL_0042: br.s IL_0062 + IL_0044: ldarg.0 + IL_0045: ldfld enum + IL_004a: callvirt get_Current + IL_004f: stloc.0 + IL_0050: ldarg.0 + IL_0051: ldc.i4.2 + IL_0052: stfld pc + IL_0057: ldarg.0 + IL_0058: stloc.1 + + (7,13-7,20) yield n + IL_0059: ldloc.1 + IL_005a: ldloc.0 + IL_005b: stfld current + IL_0060: ldc.i4.1 + IL_0061: ret + + (6,15-6,17) in + IL_0062: ldarg.0 + IL_0063: ldfld enum + IL_0068: callvirt MoveNext + IL_006d: brtrue.s IL_0044 + IL_006f: ldarg.0 + IL_0070: ldc.i4.3 + IL_0071: stfld pc + IL_0076: ldarg.0 + IL_0077: ldfld enum + IL_007c: call Dispose + IL_0081: nop + IL_0082: ldarg.0 + IL_0083: ldnull + IL_0084: stfld enum + IL_0089: ldarg.0 + IL_008a: ldc.i4.3 + IL_008b: stfld pc + IL_0090: ldarg.0 + IL_0091: ldc.i4.0 + IL_0092: stfld current + IL_0097: ldc.i4.0 + IL_0098: ret + a@6::get_CheckClose IL_0000: ldarg.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl index 93ea36c1411..5d8245fc5e8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl @@ -7,82 +7,6 @@ Module::f IL_0004: newobj .ctor IL_0009: ret -f@6::GenerateNext - - IL_0000: ldarg.0 - IL_0001: ldfld pc - IL_0006: ldc.i4.1 - IL_0007: sub - IL_0008: switch (3 targets) - IL_0019: br.s IL_0024 - - - IL_001b: nop - IL_001c: br.s IL_006c - - - IL_001e: nop - IL_001f: br.s IL_005f - - - IL_0021: nop - IL_0022: br.s IL_008d - - - IL_0024: nop - IL_0025: br.s IL_0027 - - (6,9-6,12) for - IL_0027: ldarg.0 - IL_0028: ldarg.0 - IL_0029: ldfld l - IL_002e: callvirt GetEnumerator - IL_0033: stfld enum - IL_0038: ldarg.0 - IL_0039: ldc.i4.1 - IL_003a: stfld pc - IL_003f: br.s IL_005f - IL_0041: ldarg.0 - IL_0042: ldfld enum - IL_0047: callvirt get_Current - IL_004c: stloc.0 - IL_004d: ldarg.0 - IL_004e: ldc.i4.2 - IL_004f: stfld pc - IL_0054: ldarg.0 - IL_0055: stloc.1 - - (7,13-7,20) yield n - IL_0056: ldloc.1 - IL_0057: ldloc.0 - IL_0058: stfld current - IL_005d: ldc.i4.1 - IL_005e: ret - - (6,15-6,17) in - IL_005f: ldarg.0 - IL_0060: ldfld enum - IL_0065: callvirt MoveNext - IL_006a: brtrue.s IL_0041 - IL_006c: ldarg.0 - IL_006d: ldc.i4.3 - IL_006e: stfld pc - IL_0073: ldarg.0 - IL_0074: ldfld enum - IL_0079: call Dispose - IL_007e: nop - IL_007f: ldarg.0 - IL_0080: ldnull - IL_0081: stfld enum - IL_0086: ldarg.0 - IL_0087: ldc.i4.3 - IL_0088: stfld pc - IL_008d: ldarg.0 - IL_008e: ldc.i4.0 - IL_008f: stfld current - IL_0094: ldc.i4.0 - IL_0095: ret - f@6::Close IL_0000: ldarg.0 @@ -167,6 +91,82 @@ f@6::Close +f@6::GenerateNext + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch (3 targets) + IL_0019: br.s IL_0024 + + + IL_001b: nop + IL_001c: br.s IL_006c + + + IL_001e: nop + IL_001f: br.s IL_005f + + + IL_0021: nop + IL_0022: br.s IL_008d + + + IL_0024: nop + IL_0025: br.s IL_0027 + + (6,9-6,12) for + IL_0027: ldarg.0 + IL_0028: ldarg.0 + IL_0029: ldfld l + IL_002e: callvirt GetEnumerator + IL_0033: stfld enum + IL_0038: ldarg.0 + IL_0039: ldc.i4.1 + IL_003a: stfld pc + IL_003f: br.s IL_005f + IL_0041: ldarg.0 + IL_0042: ldfld enum + IL_0047: callvirt get_Current + IL_004c: stloc.0 + IL_004d: ldarg.0 + IL_004e: ldc.i4.2 + IL_004f: stfld pc + IL_0054: ldarg.0 + IL_0055: stloc.1 + + (7,13-7,20) yield n + IL_0056: ldloc.1 + IL_0057: ldloc.0 + IL_0058: stfld current + IL_005d: ldc.i4.1 + IL_005e: ret + + (6,15-6,17) in + IL_005f: ldarg.0 + IL_0060: ldfld enum + IL_0065: callvirt MoveNext + IL_006a: brtrue.s IL_0041 + IL_006c: ldarg.0 + IL_006d: ldc.i4.3 + IL_006e: stfld pc + IL_0073: ldarg.0 + IL_0074: ldfld enum + IL_0079: call Dispose + IL_007e: nop + IL_007f: ldarg.0 + IL_0080: ldnull + IL_0081: stfld enum + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld pc + IL_008d: ldarg.0 + IL_008e: ldc.i4.0 + IL_008f: stfld current + IL_0094: ldc.i4.0 + IL_0095: ret + f@6::get_CheckClose IL_0000: ldarg.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - ActivePattern 01.bsl index b367716fac3..c00c45672d6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - ActivePattern 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - ActivePattern 01.bsl @@ -1,8 +1,3 @@ -Module::|Id| - (4,23-4,24) x - IL_0000: ldarg.0 - IL_0001: ret - Module::f (7,17-7,18) l IL_0000: ldarg.0 @@ -48,3 +43,8 @@ Module::f IL_003c: ret + +Module::|Id| + (4,23-4,24) x + IL_0000: ldarg.0 + IL_0001: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.net472.bsl index 7f7632e16e7..b58400b2e0d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.net472.bsl @@ -42,30 +42,17 @@ [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 ) + 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 ) .field assembly initonly int32 item .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 public static class ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 08 41 42 43 2B 45 78 70 72 00 - 00 ) + .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 08 41 42 43 2B 45 78 70 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 ) @@ -78,56 +65,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -250,58 +187,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -426,6 +311,121 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class ABC/Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void ABC/Expr::.ctor(int32) + IL_0006: 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 ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item() 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 ABC/Expr::item + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -481,91 +481,23 @@ IL_0001: ldarg.1 IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) + valuetype [runtime]System.Runtime.Serialization.StreamingContext) IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed + .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 8 + .maxstack 4 + .locals init (class [runtime]System.Exception V_0, + object V_1, + class [runtime]System.Collections.IEqualityComparer V_2) IL_0000: ldarg.0 - IL_0001: ldfld int32 ABC/MyExn::Data0@ - IL_0006: ret - } + IL_0001: brfalse.s IL_0034 - .method public strict virtual instance string get_Message() 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 ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass ABC/MyExn - IL_0012: call instance int32 ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool Equals(class [runtime]System.Exception 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 [runtime]System.Exception V_0, - object V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0034 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0032 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0032 IL_0006: ldarg.1 IL_0007: stloc.0 @@ -689,6 +621,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass ABC/MyExn + IL_0012: call instance int32 ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -744,30 +744,17 @@ [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 ) + 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 ) .field assembly initonly int32 item .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 public static class ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void ABC/ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0C 41 42 43 2B 41 42 43 2B 45 - 78 70 72 00 00 ) + .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 0C 41 42 43 2B 41 42 43 2B 45 + 78 70 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 ) @@ -780,56 +767,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 ABC/ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -952,58 +889,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class ABC/ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 ABC/ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class ABC/ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1070,62 +955,177 @@ IL_0014: ret } - .method public hidebysig virtual final instance bool Equals(class ABC/ABC/Expr obj) cil managed + .method public hidebysig virtual final instance bool Equals(class ABC/ABC/Expr obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class ABC/ABC/Expr V_0, + class ABC/ABC/Expr V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_001d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 ABC/ABC/Expr::item + IL_0012: ldloc.1 + IL_0013: ldfld int32 ABC/ABC/Expr::item + IL_0018: ceq + IL_001a: ret + + IL_001b: ldc.i4.0 + IL_001c: ret + + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: 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 ABC/ABC/Expr V_0) + IL_0000: ldarg.1 + IL_0001: isinst ABC/ABC/Expr + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool ABC/ABC/Expr::Equals(class ABC/ABC/Expr) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: 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 7 + .locals init (int32 V_0, + class ABC/ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 ABC/ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void ABC/ABC/Expr::.ctor(int32) + IL_0006: 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 ABC/ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item() 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 4 - .locals init (class ABC/ABC/Expr V_0, - class ABC/ABC/Expr V_1) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse.s IL_001d - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_001b - - IL_0006: ldarg.0 - IL_0007: pop - IL_0008: ldarg.0 - IL_0009: stloc.0 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldloc.0 - IL_000d: ldfld int32 ABC/ABC/Expr::item - IL_0012: ldloc.1 - IL_0013: ldfld int32 ABC/ABC/Expr::item - IL_0018: ceq - IL_001a: ret - - IL_001b: ldc.i4.0 - IL_001c: ret - - IL_001d: ldarg.1 - IL_001e: ldnull - IL_001f: cgt.un - IL_0021: ldc.i4.0 - IL_0022: ceq - IL_0024: ret + IL_0001: ldfld int32 ABC/ABC/Expr::item + IL_0006: ret } - .method public hidebysig virtual final instance bool Equals(object obj) cil managed + .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 4 - .locals init (class ABC/ABC/Expr V_0) - IL_0000: ldarg.1 - IL_0001: isinst ABC/ABC/Expr - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 - - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: callvirt instance bool ABC/ABC/Expr::Equals(class ABC/ABC/Expr) - IL_0011: ret - - IL_0012: ldc.i4.0 - IL_0013: ret + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret } .property instance int32 Tag() @@ -1183,78 +1183,10 @@ IL_0001: ldarg.1 IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) + valuetype [runtime]System.Runtime.Serialization.StreamingContext) IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 ABC/ABC/MyExn::Data0@ - IL_0006: ret - } - - .method public strict virtual instance string get_Message() 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 ABC/ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass ABC/ABC/MyExn - IL_0012: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1391,6 +1323,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass ABC/ABC/MyExn + IL_0012: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ABC/ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 ABC/ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -1433,6 +1433,17 @@ } } + .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 + } + .method public static int32 'add'(int32 x, int32 y) cil managed { @@ -1461,6 +1472,17 @@ } } + .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 + } + .method public static int32 'add'(int32 x, int32 y) cil managed { @@ -1512,97 +1534,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..b58400b2e0d 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 @@ -48,19 +48,6 @@ .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 public static class ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -78,56 +65,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -250,58 +187,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -426,6 +311,121 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class ABC/Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void ABC/Expr::.ctor(int32) + IL_0006: 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 ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item() 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 ABC/Expr::item + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -485,87 +485,19 @@ IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed + .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 8 + .maxstack 4 + .locals init (class [runtime]System.Exception V_0, + object V_1, + class [runtime]System.Collections.IEqualityComparer V_2) IL_0000: ldarg.0 - IL_0001: ldfld int32 ABC/MyExn::Data0@ - IL_0006: ret - } + IL_0001: brfalse.s IL_0034 - .method public strict virtual instance string get_Message() 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 ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass ABC/MyExn - IL_0012: call instance int32 ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool Equals(class [runtime]System.Exception 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 [runtime]System.Exception V_0, - object V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0034 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0032 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0032 IL_0006: ldarg.1 IL_0007: stloc.0 @@ -689,6 +621,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass ABC/MyExn + IL_0012: call instance int32 ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -750,19 +750,6 @@ .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 public static class ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void ABC/ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -780,56 +767,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 ABC/ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -952,58 +889,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class ABC/ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 ABC/ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class ABC/ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1128,6 +1013,121 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class ABC/ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 ABC/ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void ABC/ABC/Expr::.ctor(int32) + IL_0006: 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 ABC/ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item() 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 ABC/ABC/Expr::item + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1187,74 +1187,6 @@ IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 ABC/ABC/MyExn::Data0@ - IL_0006: ret - } - - .method public strict virtual instance string get_Message() 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 ABC/ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass ABC/ABC/MyExn - IL_0012: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1391,6 +1323,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass ABC/ABC/MyExn + IL_0012: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ABC/ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 ABC/ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -1433,6 +1433,17 @@ } } + .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 + } + .method public static int32 'add'(int32 x, int32 y) cil managed { @@ -1461,6 +1472,17 @@ } } + .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 + } + .method public static int32 'add'(int32 x, int32 y) cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.net472.bsl index 0d7172dfc0a..04aedf94dbd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.net472.bsl @@ -42,30 +42,17 @@ [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 ) + 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 ) .field assembly initonly int32 item .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 public static class ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 08 41 42 43 2B 45 78 70 72 00 - 00 ) + .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 08 41 42 43 2B 45 78 70 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 ) @@ -78,56 +65,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -250,58 +187,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -426,6 +311,121 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class ABC/Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void ABC/Expr::.ctor(int32) + IL_0006: 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 ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item() 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 ABC/Expr::item + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -481,91 +481,23 @@ IL_0001: ldarg.1 IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) + valuetype [runtime]System.Runtime.Serialization.StreamingContext) IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed + .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 8 + .maxstack 4 + .locals init (class [runtime]System.Exception V_0, + object V_1, + class [runtime]System.Collections.IEqualityComparer V_2) IL_0000: ldarg.0 - IL_0001: ldfld int32 ABC/MyExn::Data0@ - IL_0006: ret - } + IL_0001: brfalse.s IL_0034 - .method public strict virtual instance string get_Message() 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 ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass ABC/MyExn - IL_0012: call instance int32 ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool Equals(class [runtime]System.Exception 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 [runtime]System.Exception V_0, - object V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0034 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0032 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0032 IL_0006: ldarg.1 IL_0007: stloc.0 @@ -689,6 +621,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass ABC/MyExn + IL_0012: call instance int32 ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -744,30 +744,17 @@ [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 ) + 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 ) .field assembly initonly int32 item .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 public static class ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void ABC/ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0C 41 42 43 2B 41 42 43 2B 45 - 78 70 72 00 00 ) + .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 0C 41 42 43 2B 41 42 43 2B 45 + 78 70 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 ) @@ -780,56 +767,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 ABC/ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -952,58 +889,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class ABC/ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 ABC/ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class ABC/ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1128,131 +1013,178 @@ IL_0013: ret } - .property instance int32 Tag() - { - .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 int32 ABC/ABC/Expr::get_Tag() - } - .property instance int32 Item() + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 ABC/ABC/Expr::get_Item() + + .maxstack 7 + .locals init (int32 V_0, + class ABC/ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 ABC/ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: ret } - } - .class auto ansi serializable nested public beforefieldinit MyExn - extends [runtime]System.Exception - implements [runtime]System.Collections.IStructuralEquatable - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) - .field assembly int32 Data0@ - .method public specialname rtspecialname instance void .ctor(int32 data0) cil managed + .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 instance void [runtime]System.Exception::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 ABC/ABC/MyExn::Data0@ - IL_000d: ret + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret } - .method public specialname rtspecialname instance void .ctor() cil managed + .method public static class ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0001: newobj instance void ABC/ABC/Expr::.ctor(int32) IL_0006: ret } - .method family specialname rtspecialname instance void .ctor(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed + .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 ABC/ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ret + 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_Data0() cil managed + .method public hidebysig instance int32 get_Item() 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 ABC/ABC/MyExn::Data0@ + IL_0001: ldfld int32 ABC/ABC/Expr::item IL_0006: ret } - .method public strict virtual instance string get_Message() cil managed + .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: 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 ABC/ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret } - .method public hidebysig virtual instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + .property instance int32 Tag() { .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 int32 ABC/ABC/Expr::get_Tag() + } + .property instance int32 Item() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 ABC/ABC/Expr::get_Item() + } + } + + .class auto ansi serializable nested public beforefieldinit MyExn + extends [runtime]System.Exception + implements [runtime]System.Collections.IStructuralEquatable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) + .field assembly int32 Data0@ + .method public specialname rtspecialname instance void .ctor(int32 data0) cil managed + { - .maxstack 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass ABC/ABC/MyExn - IL_0012: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret + IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 ABC/ABC/MyExn::Data0@ + IL_000d: ret + } - IL_0023: ldc.i4.0 - IL_0024: ret + .method public specialname rtspecialname instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0006: ret } - .method public hidebysig virtual instance int32 GetHashCode() cil managed + .method family specialname rtspecialname instance void .ctor(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) 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 class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() - IL_0006: callvirt instance int32 ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, + valuetype [runtime]System.Runtime.Serialization.StreamingContext) + IL_0008: ret } .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed @@ -1391,6 +1323,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass ABC/ABC/MyExn + IL_0012: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ABC/ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 ABC/ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -1502,97 +1502,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.netcore.bsl index 4f12c1595c8..04aedf94dbd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.netcore.bsl @@ -48,19 +48,6 @@ .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 public static class ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -78,56 +65,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -250,58 +187,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -426,6 +311,121 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class ABC/Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void ABC/Expr::.ctor(int32) + IL_0006: 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 ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item() 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 ABC/Expr::item + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -485,87 +485,19 @@ IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed + .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 8 + .maxstack 4 + .locals init (class [runtime]System.Exception V_0, + object V_1, + class [runtime]System.Collections.IEqualityComparer V_2) IL_0000: ldarg.0 - IL_0001: ldfld int32 ABC/MyExn::Data0@ - IL_0006: ret - } + IL_0001: brfalse.s IL_0034 - .method public strict virtual instance string get_Message() 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 ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass ABC/MyExn - IL_0012: call instance int32 ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool Equals(class [runtime]System.Exception 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 [runtime]System.Exception V_0, - object V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0034 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0032 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0032 IL_0006: ldarg.1 IL_0007: stloc.0 @@ -689,6 +621,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass ABC/MyExn + IL_0012: call instance int32 ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -750,19 +750,6 @@ .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 public static class ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void ABC/ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -780,56 +767,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 ABC/ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ABC/ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -952,58 +889,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class ABC/ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 ABC/ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class ABC/ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1128,6 +1013,121 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class ABC/ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 ABC/ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void ABC/ABC/Expr::.ctor(int32) + IL_0006: 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 ABC/ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item() 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 ABC/ABC/Expr::item + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1187,74 +1187,6 @@ IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 ABC/ABC/MyExn::Data0@ - IL_0006: ret - } - - .method public strict virtual instance string get_Message() 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 ABC/ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass ABC/ABC/MyExn - IL_0012: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1391,6 +1323,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass ABC/ABC/MyExn + IL_0012: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 ABC/ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 ABC/ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.net472.bsl index c8ee72c0771..01ad30b6ec4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.net472.bsl @@ -38,30 +38,17 @@ [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 ) + 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 ) .field assembly initonly int32 item .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 public static class XYZ.Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void XYZ.Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 08 58 59 5A 2E 45 78 70 72 00 - 00 ) + .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 08 58 59 5A 2E 45 78 70 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 ) @@ -74,56 +61,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 XYZ.Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -246,58 +183,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class XYZ.Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 XYZ.Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 XYZ.Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class XYZ.Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -422,6 +307,121 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class XYZ.Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 XYZ.Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class XYZ.Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void XYZ.Expr::.ctor(int32) + IL_0006: 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 XYZ.Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item() 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 XYZ.Expr::item + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -477,91 +477,23 @@ IL_0001: ldarg.1 IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) + valuetype [runtime]System.Runtime.Serialization.StreamingContext) IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed + .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 8 + .maxstack 4 + .locals init (class [runtime]System.Exception V_0, + object V_1, + class [runtime]System.Collections.IEqualityComparer V_2) IL_0000: ldarg.0 - IL_0001: ldfld int32 XYZ.MyExn::Data0@ - IL_0006: ret - } + IL_0001: brfalse.s IL_0034 - .method public strict virtual instance string get_Message() 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 XYZ.MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass XYZ.MyExn - IL_0012: call instance int32 XYZ.MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 XYZ.MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool Equals(class [runtime]System.Exception 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 [runtime]System.Exception V_0, - object V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0034 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0032 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0032 IL_0006: ldarg.1 IL_0007: stloc.0 @@ -685,6 +617,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.MyExn + IL_0012: call instance int32 XYZ.MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 XYZ.MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 XYZ.MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -740,30 +740,17 @@ [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 ) + 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 ) .field assembly initonly int32 item .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 public static class XYZ.ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void XYZ.ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0C 58 59 5A 2E 41 42 43 2B 45 - 78 70 72 00 00 ) + .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 0C 58 59 5A 2E 41 42 43 2B 45 + 78 70 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 ) @@ -776,56 +763,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 XYZ.ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -948,58 +885,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class XYZ.ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 XYZ.ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 XYZ.ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class XYZ.ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1124,131 +1009,178 @@ IL_0013: ret } - .property instance int32 Tag() - { - .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 int32 XYZ.ABC/Expr::get_Tag() - } - .property instance int32 Item() + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 XYZ.ABC/Expr::get_Item() + + .maxstack 7 + .locals init (int32 V_0, + class XYZ.ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: ret } - } - .class auto ansi serializable nested public beforefieldinit MyExn - extends [runtime]System.Exception - implements [runtime]System.Collections.IStructuralEquatable - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) - .field assembly int32 Data0@ - .method public specialname rtspecialname instance void .ctor(int32 data0) cil managed + .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 instance void [runtime]System.Exception::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 XYZ.ABC/MyExn::Data0@ - IL_000d: ret + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 XYZ.ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret } - .method public specialname rtspecialname instance void .ctor() cil managed + .method public static class XYZ.ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0001: newobj instance void XYZ.ABC/Expr::.ctor(int32) IL_0006: ret } - .method family specialname rtspecialname instance void .ctor(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed + .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 XYZ.ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ret + 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_Data0() cil managed + .method public hidebysig instance int32 get_Item() 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 XYZ.ABC/MyExn::Data0@ + IL_0001: ldfld int32 XYZ.ABC/Expr::item IL_0006: ret } - .method public strict virtual instance string get_Message() cil managed + .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: 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 XYZ.ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret } - .method public hidebysig virtual instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + .property instance int32 Tag() { .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 int32 XYZ.ABC/Expr::get_Tag() + } + .property instance int32 Item() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 XYZ.ABC/Expr::get_Item() + } + } + + .class auto ansi serializable nested public beforefieldinit MyExn + extends [runtime]System.Exception + implements [runtime]System.Collections.IStructuralEquatable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) + .field assembly int32 Data0@ + .method public specialname rtspecialname instance void .ctor(int32 data0) cil managed + { - .maxstack 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass XYZ.ABC/MyExn - IL_0012: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret + IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 XYZ.ABC/MyExn::Data0@ + IL_000d: ret + } - IL_0023: ldc.i4.0 - IL_0024: ret + .method public specialname rtspecialname instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0006: ret } - .method public hidebysig virtual instance int32 GetHashCode() cil managed + .method family specialname rtspecialname instance void .ctor(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) 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 class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() - IL_0006: callvirt instance int32 XYZ.ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, + valuetype [runtime]System.Runtime.Serialization.StreamingContext) + IL_0008: ret } .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed @@ -1387,6 +1319,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.ABC/MyExn + IL_0012: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 XYZ.ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 XYZ.ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -1442,30 +1442,17 @@ [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 ) + 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 ) .field assembly initonly int32 item .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 public static class XYZ.ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void XYZ.ABC/ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 10 58 59 5A 2E 41 42 43 2B 41 - 42 43 2B 45 78 70 72 00 00 ) + .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 10 58 59 5A 2E 41 42 43 2B 41 + 42 43 2B 45 78 70 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 ) @@ -1478,56 +1465,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 XYZ.ABC/ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1650,58 +1587,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class XYZ.ABC/ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 XYZ.ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class XYZ.ABC/ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1805,25 +1690,140 @@ IL_0024: ret } - .method public hidebysig virtual final instance bool Equals(object obj) cil managed + .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 XYZ.ABC/ABC/Expr V_0) + IL_0000: ldarg.1 + IL_0001: isinst XYZ.ABC/ABC/Expr + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool XYZ.ABC/ABC/Expr::Equals(class XYZ.ABC/ABC/Expr) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: 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 7 + .locals init (int32 V_0, + class XYZ.ABC/ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 XYZ.ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class XYZ.ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void XYZ.ABC/ABC/Expr::.ctor(int32) + IL_0006: 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 XYZ.ABC/ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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 4 - .locals init (class XYZ.ABC/ABC/Expr V_0) - IL_0000: ldarg.1 - IL_0001: isinst XYZ.ABC/ABC/Expr - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 + .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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: callvirt instance bool XYZ.ABC/ABC/Expr::Equals(class XYZ.ABC/ABC/Expr) - IL_0011: ret + .method public hidebysig instance int32 get_Item() 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 XYZ.ABC/ABC/Expr::item + IL_0006: ret + } - IL_0012: ldc.i4.0 - IL_0013: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret } .property instance int32 Tag() @@ -1881,78 +1881,10 @@ IL_0001: ldarg.1 IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) + valuetype [runtime]System.Runtime.Serialization.StreamingContext) IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 XYZ.ABC/ABC/MyExn::Data0@ - IL_0006: ret - } - - .method public strict virtual instance string get_Message() 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 XYZ.ABC/ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass XYZ.ABC/ABC/MyExn - IL_0012: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 XYZ.ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -2089,6 +2021,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.ABC/ABC/MyExn + IL_0012: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 XYZ.ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.ABC/ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 XYZ.ABC/ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -2131,6 +2131,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 + } + .method public static int32 'add'(int32 x, int32 y) cil managed { @@ -2159,6 +2170,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 + } + .method public static int32 'add'(int32 x, int32 y) cil managed { @@ -2210,97 +2232,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..01ad30b6ec4 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 @@ -44,19 +44,6 @@ .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 public static class XYZ.Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void XYZ.Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -74,56 +61,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 XYZ.Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -246,58 +183,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class XYZ.Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 XYZ.Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 XYZ.Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class XYZ.Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -422,6 +307,121 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class XYZ.Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 XYZ.Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class XYZ.Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void XYZ.Expr::.ctor(int32) + IL_0006: 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 XYZ.Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item() 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 XYZ.Expr::item + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -481,87 +481,19 @@ IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed + .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 8 + .maxstack 4 + .locals init (class [runtime]System.Exception V_0, + object V_1, + class [runtime]System.Collections.IEqualityComparer V_2) IL_0000: ldarg.0 - IL_0001: ldfld int32 XYZ.MyExn::Data0@ - IL_0006: ret - } + IL_0001: brfalse.s IL_0034 - .method public strict virtual instance string get_Message() 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 XYZ.MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass XYZ.MyExn - IL_0012: call instance int32 XYZ.MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 XYZ.MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool Equals(class [runtime]System.Exception 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 [runtime]System.Exception V_0, - object V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0034 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0032 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0032 IL_0006: ldarg.1 IL_0007: stloc.0 @@ -685,6 +617,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.MyExn + IL_0012: call instance int32 XYZ.MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 XYZ.MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 XYZ.MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -746,19 +746,6 @@ .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 public static class XYZ.ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void XYZ.ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -776,56 +763,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 XYZ.ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -948,58 +885,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class XYZ.ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 XYZ.ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 XYZ.ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class XYZ.ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1124,131 +1009,178 @@ IL_0013: ret } - .property instance int32 Tag() - { - .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 int32 XYZ.ABC/Expr::get_Tag() - } - .property instance int32 Item() + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 XYZ.ABC/Expr::get_Item() + + .maxstack 7 + .locals init (int32 V_0, + class XYZ.ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: ret } - } - .class auto ansi serializable nested public beforefieldinit MyExn - extends [runtime]System.Exception - implements [runtime]System.Collections.IStructuralEquatable - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) - .field assembly int32 Data0@ - .method public specialname rtspecialname instance void .ctor(int32 data0) cil managed + .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 instance void [runtime]System.Exception::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 XYZ.ABC/MyExn::Data0@ - IL_000d: ret + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 XYZ.ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret } - .method public specialname rtspecialname instance void .ctor() cil managed + .method public static class XYZ.ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0001: newobj instance void XYZ.ABC/Expr::.ctor(int32) IL_0006: ret } - .method family specialname rtspecialname instance void .ctor(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed + .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 XYZ.ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ret + 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_Data0() cil managed + .method public hidebysig instance int32 get_Item() 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 XYZ.ABC/MyExn::Data0@ + IL_0001: ldfld int32 XYZ.ABC/Expr::item IL_0006: ret } - .method public strict virtual instance string get_Message() cil managed + .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: 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 XYZ.ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret } - .method public hidebysig virtual instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + .property instance int32 Tag() { .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 int32 XYZ.ABC/Expr::get_Tag() + } + .property instance int32 Item() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 XYZ.ABC/Expr::get_Item() + } + } + + .class auto ansi serializable nested public beforefieldinit MyExn + extends [runtime]System.Exception + implements [runtime]System.Collections.IStructuralEquatable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) + .field assembly int32 Data0@ + .method public specialname rtspecialname instance void .ctor(int32 data0) cil managed + { - .maxstack 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass XYZ.ABC/MyExn - IL_0012: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret + IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 XYZ.ABC/MyExn::Data0@ + IL_000d: ret + } - IL_0023: ldc.i4.0 - IL_0024: ret + .method public specialname rtspecialname instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0006: ret } - .method public hidebysig virtual instance int32 GetHashCode() cil managed + .method family specialname rtspecialname instance void .ctor(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) 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 class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() - IL_0006: callvirt instance int32 XYZ.ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, + valuetype [runtime]System.Runtime.Serialization.StreamingContext) + IL_0008: ret } .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed @@ -1387,6 +1319,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.ABC/MyExn + IL_0012: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 XYZ.ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 XYZ.ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -1448,19 +1448,6 @@ .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 public static class XYZ.ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void XYZ.ABC/ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -1478,56 +1465,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 XYZ.ABC/ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1650,6 +1587,130 @@ IL_0045: ret } + .method public hidebysig instance bool Equals(class XYZ.ABC/ABC/Expr 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 XYZ.ABC/ABC/Expr V_0, + class XYZ.ABC/ABC/Expr V_1, + class XYZ.ABC/ABC/Expr V_2, + class [runtime]System.Collections.IEqualityComparer V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0021 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001f + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: pop + IL_000a: ldarg.0 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: stloc.2 + IL_000e: ldarg.2 + IL_000f: stloc.3 + IL_0010: ldloc.1 + IL_0011: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0016: ldloc.2 + IL_0017: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001c: ceq + IL_001e: ret + + IL_001f: ldc.i4.0 + IL_0020: ret + + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: cgt.un + IL_0025: ldc.i4.0 + IL_0026: ceq + IL_0028: 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 XYZ.ABC/ABC/Expr V_0) + IL_0000: ldarg.1 + IL_0001: isinst XYZ.ABC/ABC/Expr + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0013 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: callvirt instance bool XYZ.ABC/ABC/Expr::Equals(class XYZ.ABC/ABC/Expr, + class [runtime]System.Collections.IEqualityComparer) + IL_0012: ret + + IL_0013: ldc.i4.0 + IL_0014: ret + } + + .method public hidebysig virtual final instance bool Equals(class XYZ.ABC/ABC/Expr obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class XYZ.ABC/ABC/Expr V_0, + class XYZ.ABC/ABC/Expr V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_001d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0018: ceq + IL_001a: ret + + IL_001b: ldc.i4.0 + IL_001c: ret + + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: 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 XYZ.ABC/ABC/Expr V_0) + IL_0000: ldarg.1 + IL_0001: isinst XYZ.ABC/ABC/Expr + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool XYZ.ABC/ABC/Expr::Equals(class XYZ.ABC/ABC/Expr) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: 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 ) @@ -1702,128 +1763,67 @@ IL_000b: ret } - .method public hidebysig instance bool Equals(class XYZ.ABC/ABC/Expr 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 XYZ.ABC/ABC/Expr V_0, - class XYZ.ABC/ABC/Expr V_1, - class XYZ.ABC/ABC/Expr V_2, - class [runtime]System.Collections.IEqualityComparer V_3) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0021 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_001f - - IL_0006: ldarg.1 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldloc.0 - IL_000d: stloc.2 - IL_000e: ldarg.2 - IL_000f: stloc.3 - IL_0010: ldloc.1 - IL_0011: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0016: ldloc.2 - IL_0017: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_001c: ceq - IL_001e: ret - - IL_001f: ldc.i4.0 - IL_0020: ret - - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: ldc.i4.0 - IL_0026: ceq - IL_0028: ret - } - - .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public static class XYZ.ABC/ABC/Expr NewNum(int32 item) 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 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 5 - .locals init (class XYZ.ABC/ABC/Expr V_0) - IL_0000: ldarg.1 - IL_0001: isinst XYZ.ABC/ABC/Expr - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0013 + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: newobj instance void XYZ.ABC/ABC/Expr::.ctor(int32) + IL_0006: ret + } - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: ldarg.2 - IL_000d: callvirt instance bool XYZ.ABC/ABC/Expr::Equals(class XYZ.ABC/ABC/Expr, - class [runtime]System.Collections.IEqualityComparer) - IL_0012: 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 XYZ.ABC/ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } - IL_0013: ldc.i4.0 - IL_0014: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 bool Equals(class XYZ.ABC/ABC/Expr obj) cil managed + .method public hidebysig instance int32 get_Item() 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 4 - .locals init (class XYZ.ABC/ABC/Expr V_0, - class XYZ.ABC/ABC/Expr V_1) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse.s IL_001d - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_001b - - IL_0006: ldarg.0 - IL_0007: pop - IL_0008: ldarg.0 - IL_0009: stloc.0 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldloc.0 - IL_000d: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0012: ldloc.1 - IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0018: ceq - IL_001a: ret - - IL_001b: ldc.i4.0 - IL_001c: ret - - IL_001d: ldarg.1 - IL_001e: ldnull - IL_001f: cgt.un - IL_0021: ldc.i4.0 - IL_0022: ceq - IL_0024: ret + IL_0001: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0006: ret } - .method public hidebysig virtual final instance bool Equals(object obj) cil managed + .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 4 - .locals init (class XYZ.ABC/ABC/Expr V_0) - IL_0000: ldarg.1 - IL_0001: isinst XYZ.ABC/ABC/Expr - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 - - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: callvirt instance bool XYZ.ABC/ABC/Expr::Equals(class XYZ.ABC/ABC/Expr) - IL_0011: ret - - IL_0012: ldc.i4.0 - IL_0013: ret + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret } .property instance int32 Tag() @@ -1885,74 +1885,6 @@ IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 XYZ.ABC/ABC/MyExn::Data0@ - IL_0006: ret - } - - .method public strict virtual instance string get_Message() 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 XYZ.ABC/ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass XYZ.ABC/ABC/MyExn - IL_0012: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 XYZ.ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -2089,6 +2021,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.ABC/ABC/MyExn + IL_0012: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 XYZ.ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.ABC/ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 XYZ.ABC/ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -2131,6 +2131,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 + } + .method public static int32 'add'(int32 x, int32 y) cil managed { @@ -2159,6 +2170,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 + } + .method public static int32 'add'(int32 x, int32 y) cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.net472.bsl index 407197b1184..2165e10b4d6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.net472.bsl @@ -38,30 +38,17 @@ [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 ) + 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 ) .field assembly initonly int32 item .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 public static class XYZ.Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void XYZ.Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 08 58 59 5A 2E 45 78 70 72 00 - 00 ) + .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 08 58 59 5A 2E 45 78 70 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 ) @@ -74,56 +61,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 XYZ.Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -246,58 +183,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class XYZ.Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 XYZ.Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 XYZ.Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class XYZ.Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -422,6 +307,121 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class XYZ.Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 XYZ.Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class XYZ.Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void XYZ.Expr::.ctor(int32) + IL_0006: 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 XYZ.Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item() 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 XYZ.Expr::item + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -477,91 +477,23 @@ IL_0001: ldarg.1 IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) + valuetype [runtime]System.Runtime.Serialization.StreamingContext) IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed + .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 8 + .maxstack 4 + .locals init (class [runtime]System.Exception V_0, + object V_1, + class [runtime]System.Collections.IEqualityComparer V_2) IL_0000: ldarg.0 - IL_0001: ldfld int32 XYZ.MyExn::Data0@ - IL_0006: ret - } + IL_0001: brfalse.s IL_0034 - .method public strict virtual instance string get_Message() 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 XYZ.MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass XYZ.MyExn - IL_0012: call instance int32 XYZ.MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 XYZ.MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool Equals(class [runtime]System.Exception 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 [runtime]System.Exception V_0, - object V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0034 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0032 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0032 IL_0006: ldarg.1 IL_0007: stloc.0 @@ -685,6 +617,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.MyExn + IL_0012: call instance int32 XYZ.MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 XYZ.MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 XYZ.MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -740,30 +740,17 @@ [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 ) + 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 ) .field assembly initonly int32 item .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 public static class XYZ.ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void XYZ.ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0C 58 59 5A 2E 41 42 43 2B 45 - 78 70 72 00 00 ) + .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 0C 58 59 5A 2E 41 42 43 2B 45 + 78 70 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 ) @@ -776,56 +763,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 XYZ.ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -948,58 +885,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class XYZ.ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 XYZ.ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 XYZ.ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class XYZ.ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1124,131 +1009,178 @@ IL_0013: ret } - .property instance int32 Tag() - { - .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 int32 XYZ.ABC/Expr::get_Tag() - } - .property instance int32 Item() + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 XYZ.ABC/Expr::get_Item() + + .maxstack 7 + .locals init (int32 V_0, + class XYZ.ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: ret } - } - .class auto ansi serializable nested public beforefieldinit MyExn - extends [runtime]System.Exception - implements [runtime]System.Collections.IStructuralEquatable - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) - .field assembly int32 Data0@ - .method public specialname rtspecialname instance void .ctor(int32 data0) cil managed + .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 instance void [runtime]System.Exception::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 XYZ.ABC/MyExn::Data0@ - IL_000d: ret + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 XYZ.ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret } - .method public specialname rtspecialname instance void .ctor() cil managed + .method public static class XYZ.ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0001: newobj instance void XYZ.ABC/Expr::.ctor(int32) IL_0006: ret } - .method family specialname rtspecialname instance void .ctor(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed + .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 XYZ.ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ret + 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_Data0() cil managed + .method public hidebysig instance int32 get_Item() 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 XYZ.ABC/MyExn::Data0@ + IL_0001: ldfld int32 XYZ.ABC/Expr::item IL_0006: ret } - .method public strict virtual instance string get_Message() cil managed + .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: 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 XYZ.ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret } - .method public hidebysig virtual instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + .property instance int32 Tag() { .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 int32 XYZ.ABC/Expr::get_Tag() + } + .property instance int32 Item() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 XYZ.ABC/Expr::get_Item() + } + } + + .class auto ansi serializable nested public beforefieldinit MyExn + extends [runtime]System.Exception + implements [runtime]System.Collections.IStructuralEquatable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) + .field assembly int32 Data0@ + .method public specialname rtspecialname instance void .ctor(int32 data0) cil managed + { - .maxstack 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass XYZ.ABC/MyExn - IL_0012: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret + IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 XYZ.ABC/MyExn::Data0@ + IL_000d: ret + } - IL_0023: ldc.i4.0 - IL_0024: ret + .method public specialname rtspecialname instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0006: ret } - .method public hidebysig virtual instance int32 GetHashCode() cil managed + .method family specialname rtspecialname instance void .ctor(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) 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 class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() - IL_0006: callvirt instance int32 XYZ.ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, + valuetype [runtime]System.Runtime.Serialization.StreamingContext) + IL_0008: ret } .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed @@ -1387,6 +1319,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.ABC/MyExn + IL_0012: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 XYZ.ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 XYZ.ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -1442,30 +1442,17 @@ [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 ) + 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 ) .field assembly initonly int32 item .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 public static class XYZ.ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void XYZ.ABC/ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 10 58 59 5A 2E 41 42 43 2B 41 - 42 43 2B 45 78 70 72 00 00 ) + .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 10 58 59 5A 2E 41 42 43 2B 41 + 42 43 2B 45 78 70 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 ) @@ -1478,56 +1465,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 XYZ.ABC/ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1650,58 +1587,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class XYZ.ABC/ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 XYZ.ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class XYZ.ABC/ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1768,62 +1653,177 @@ IL_0014: ret } - .method public hidebysig virtual final instance bool Equals(class XYZ.ABC/ABC/Expr obj) cil managed + .method public hidebysig virtual final instance bool Equals(class XYZ.ABC/ABC/Expr obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class XYZ.ABC/ABC/Expr V_0, + class XYZ.ABC/ABC/Expr V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_001d + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b + + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0018: ceq + IL_001a: ret + + IL_001b: ldc.i4.0 + IL_001c: ret + + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: 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 XYZ.ABC/ABC/Expr V_0) + IL_0000: ldarg.1 + IL_0001: isinst XYZ.ABC/ABC/Expr + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: callvirt instance bool XYZ.ABC/ABC/Expr::Equals(class XYZ.ABC/ABC/Expr) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: 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 7 + .locals init (int32 V_0, + class XYZ.ABC/ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 XYZ.ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class XYZ.ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void XYZ.ABC/ABC/Expr::.ctor(int32) + IL_0006: 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 XYZ.ABC/ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item() 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 4 - .locals init (class XYZ.ABC/ABC/Expr V_0, - class XYZ.ABC/ABC/Expr V_1) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse.s IL_001d - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_001b - - IL_0006: ldarg.0 - IL_0007: pop - IL_0008: ldarg.0 - IL_0009: stloc.0 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldloc.0 - IL_000d: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0012: ldloc.1 - IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0018: ceq - IL_001a: ret - - IL_001b: ldc.i4.0 - IL_001c: ret - - IL_001d: ldarg.1 - IL_001e: ldnull - IL_001f: cgt.un - IL_0021: ldc.i4.0 - IL_0022: ceq - IL_0024: ret + IL_0001: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0006: ret } - .method public hidebysig virtual final instance bool Equals(object obj) cil managed + .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 4 - .locals init (class XYZ.ABC/ABC/Expr V_0) - IL_0000: ldarg.1 - IL_0001: isinst XYZ.ABC/ABC/Expr - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 - - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: callvirt instance bool XYZ.ABC/ABC/Expr::Equals(class XYZ.ABC/ABC/Expr) - IL_0011: ret - - IL_0012: ldc.i4.0 - IL_0013: ret + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret } .property instance int32 Tag() @@ -1881,78 +1881,10 @@ IL_0001: ldarg.1 IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) + valuetype [runtime]System.Runtime.Serialization.StreamingContext) IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 XYZ.ABC/ABC/MyExn::Data0@ - IL_0006: ret - } - - .method public strict virtual instance string get_Message() 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 XYZ.ABC/ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass XYZ.ABC/ABC/MyExn - IL_0012: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 XYZ.ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -2089,6 +2021,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.ABC/ABC/MyExn + IL_0012: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 XYZ.ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.ABC/ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 XYZ.ABC/ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -2200,97 +2200,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.netcore.bsl index ef41cabbfcb..2165e10b4d6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.netcore.bsl @@ -44,19 +44,6 @@ .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 public static class XYZ.Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void XYZ.Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -74,56 +61,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 XYZ.Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -246,58 +183,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class XYZ.Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 XYZ.Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 XYZ.Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class XYZ.Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -422,6 +307,121 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class XYZ.Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 XYZ.Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class XYZ.Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void XYZ.Expr::.ctor(int32) + IL_0006: 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 XYZ.Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item() 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 XYZ.Expr::item + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -481,87 +481,19 @@ IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed + .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 8 + .maxstack 4 + .locals init (class [runtime]System.Exception V_0, + object V_1, + class [runtime]System.Collections.IEqualityComparer V_2) IL_0000: ldarg.0 - IL_0001: ldfld int32 XYZ.MyExn::Data0@ - IL_0006: ret - } + IL_0001: brfalse.s IL_0034 - .method public strict virtual instance string get_Message() 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 XYZ.MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass XYZ.MyExn - IL_0012: call instance int32 XYZ.MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 XYZ.MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool Equals(class [runtime]System.Exception 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 [runtime]System.Exception V_0, - object V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0034 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0032 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0032 IL_0006: ldarg.1 IL_0007: stloc.0 @@ -685,6 +617,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.MyExn + IL_0012: call instance int32 XYZ.MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 XYZ.MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 XYZ.MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -746,19 +746,6 @@ .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 public static class XYZ.ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void XYZ.ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -776,56 +763,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 XYZ.ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -948,58 +885,6 @@ IL_0045: 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 7 - .locals init (int32 V_0, - class XYZ.ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 XYZ.ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 XYZ.ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class XYZ.ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1124,131 +1009,178 @@ IL_0013: ret } - .property instance int32 Tag() - { - .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 int32 XYZ.ABC/Expr::get_Tag() - } - .property instance int32 Item() + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 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 ) - .get instance int32 XYZ.ABC/Expr::get_Item() + + .maxstack 7 + .locals init (int32 V_0, + class XYZ.ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: ret } - } - .class auto ansi serializable nested public beforefieldinit MyExn - extends [runtime]System.Exception - implements [runtime]System.Collections.IStructuralEquatable - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) - .field assembly int32 Data0@ - .method public specialname rtspecialname instance void .ctor(int32 data0) cil managed + .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 instance void [runtime]System.Exception::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 XYZ.ABC/MyExn::Data0@ - IL_000d: ret + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: callvirt instance int32 XYZ.ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret } - .method public specialname rtspecialname instance void .ctor() cil managed + .method public static class XYZ.ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0001: newobj instance void XYZ.ABC/Expr::.ctor(int32) IL_0006: ret } - .method family specialname rtspecialname instance void .ctor(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed + .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 XYZ.ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ret + 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_Data0() cil managed + .method public hidebysig instance int32 get_Item() 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 XYZ.ABC/MyExn::Data0@ + IL_0001: ldfld int32 XYZ.ABC/Expr::item IL_0006: ret } - .method public strict virtual instance string get_Message() cil managed + .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: 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 XYZ.ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldc.i4.0 + IL_0003: ret } - .method public hidebysig virtual instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + .property instance int32 Tag() { .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 int32 XYZ.ABC/Expr::get_Tag() + } + .property instance int32 Item() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32, + int32) = ( 01 00 04 00 00 00 00 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 ) + .get instance int32 XYZ.ABC/Expr::get_Item() + } + } + + .class auto ansi serializable nested public beforefieldinit MyExn + extends [runtime]System.Exception + implements [runtime]System.Collections.IStructuralEquatable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 05 00 00 00 00 00 ) + .field assembly int32 Data0@ + .method public specialname rtspecialname instance void .ctor(int32 data0) cil managed + { - .maxstack 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass XYZ.ABC/MyExn - IL_0012: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret + IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 XYZ.ABC/MyExn::Data0@ + IL_000d: ret + } - IL_0023: ldc.i4.0 - IL_0024: ret + .method public specialname rtspecialname instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Exception::.ctor() + IL_0006: ret } - .method public hidebysig virtual instance int32 GetHashCode() cil managed + .method family specialname rtspecialname instance void .ctor(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) 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 class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() - IL_0006: callvirt instance int32 XYZ.ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, + valuetype [runtime]System.Runtime.Serialization.StreamingContext) + IL_0008: ret } .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed @@ -1387,6 +1319,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.ABC/MyExn + IL_0012: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 XYZ.ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 XYZ.ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -1448,19 +1448,6 @@ .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 public static class XYZ.ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 - IL_0001: newobj instance void XYZ.ABC/ABC/Expr::.ctor(int32) - IL_0006: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -1478,56 +1465,6 @@ IL_000d: ret } - .method public hidebysig instance int32 get_Item() 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 XYZ.ABC/ABC/Expr::item - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/ABC/Expr>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1643,63 +1580,11 @@ IL_003b: unbox.any XYZ.ABC/ABC/Expr IL_0040: brfalse.s IL_0044 - IL_0042: ldc.i4.m1 - IL_0043: ret - - IL_0044: ldc.i4.0 - IL_0045: 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 7 - .locals init (int32 V_0, - class XYZ.ABC/ABC/Expr V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0024 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ret - - IL_0024: ldc.i4.0 - IL_0025: 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 XYZ.ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret + IL_0042: ldc.i4.m1 + IL_0043: ret + + IL_0044: ldc.i4.0 + IL_0045: ret } .method public hidebysig instance bool Equals(class XYZ.ABC/ABC/Expr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed @@ -1826,6 +1711,121 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class XYZ.ABC/ABC/Expr V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0024 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret + + IL_0024: ldc.i4.0 + IL_0025: 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 XYZ.ABC/ABC/Expr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class XYZ.ABC/ABC/Expr NewNum(int32 item) 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 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: ldarg.0 + IL_0001: newobj instance void XYZ.ABC/ABC/Expr::.ctor(int32) + IL_0006: 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 XYZ.ABC/ABC/Expr>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item() 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 XYZ.ABC/ABC/Expr::item + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -1885,74 +1885,6 @@ IL_0008: ret } - .method public hidebysig specialname instance int32 get_Data0() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 XYZ.ABC/ABC/MyExn::Data0@ - IL_0006: ret - } - - .method public strict virtual instance string get_Message() 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 XYZ.ABC/ABC/MyExn>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0023 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: castclass XYZ.ABC/ABC/MyExn - IL_0012: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0017: ldloc.0 - IL_0018: ldc.i4.6 - IL_0019: shl - IL_001a: ldloc.0 - IL_001b: ldc.i4.2 - IL_001c: shr - IL_001d: add - IL_001e: add - IL_001f: add - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - } - - .method public hidebysig virtual 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 XYZ.ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class [runtime]System.Exception obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -2089,6 +2021,74 @@ IL_0013: ret } + .method public hidebysig virtual 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0023 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.ABC/ABC/MyExn + IL_0012: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl + IL_001a: ldloc.0 + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + } + + .method public hidebysig virtual 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 XYZ.ABC/ABC/MyExn::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance int32 get_Data0() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 XYZ.ABC/ABC/MyExn::Data0@ + IL_0006: ret + } + + .method public strict virtual instance string get_Message() 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 XYZ.ABC/ABC/MyExn>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + .property instance int32 Data0() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, 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..3394de48d7a 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 @@ -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 + } + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Core.Unit get_x() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -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..5f17d86eb24 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 @@ -33,16 +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 ) - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Core.Unit get_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: ldnull - IL_0001: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -54,6 +44,16 @@ IL_000c: ret } + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Core.Unit get_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: ldnull + IL_0001: ret + } + .method assembly static void staticInitialization@() cil managed { @@ -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..b231448fbd6 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 @@ -39,6 +39,17 @@ .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 .field static assembly int32 init@4 + .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 + } + .method public specialname rtspecialname instance void .ctor(valuetype [runtime]System.DateTime s) cil managed { @@ -74,17 +85,17 @@ IL_0025: ret } - .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 - } + } + .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 } } @@ -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..7feece52a58 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 @@ -39,6 +39,17 @@ .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 .field static assembly int32 init@4 + .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 + } + .method public specialname rtspecialname instance void .ctor(valuetype [runtime]System.DateTime s) cil managed { @@ -74,17 +85,6 @@ IL_0025: ret } - .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 - } - .method assembly static void staticInitialization@() cil managed { @@ -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..e08ea713ec0 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 @@ -41,6 +41,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 + } + .method public specialname static int32 get_y() cil managed { @@ -69,6 +80,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 + } + .method public specialname static int32 get_x() cil managed { @@ -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..f9abefeb293 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 @@ -45,31 +45,31 @@ .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 z@8 .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 int32 get_y() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32 assembly/M/N::y@7 - 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 public specialname static int32 get_z() cil managed + .method public specialname static int32 get_y() cil managed { .maxstack 8 - IL_0000: ldsfld int32 assembly/M/N::z@8 + IL_0000: ldsfld int32 assembly/M/N::y@7 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public specialname static int32 get_z() 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/M/N::z@8 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -103,14 +103,6 @@ .field static assembly int32 x@5 .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 int32 get_x() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly/M::x@5 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -122,6 +114,14 @@ IL_000c: ret } + .method public specialname static int32 get_x() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 assembly/M::x@5 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { @@ -183,4 +183,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOff.il.net472.bsl index 72f0b5a628c..5133cc46cce 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOff.il.net472.bsl @@ -60,6 +60,27 @@ .field static assembly int32 x .field static assembly int32 init@4 .field assembly valuetype [runtime]System.DateTime s + .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 public specialname rtspecialname instance void .ctor(valuetype [runtime]System.DateTime s) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld valuetype [runtime]System.DateTime assembly/C::s + IL_0007: ret + } + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -92,9 +113,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -118,48 +137,7 @@ IL_001d: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.1 - IL_0008: ldarg.0 - IL_0009: ldfld valuetype [runtime]System.DateTime assembly/C::s - IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add - IL_001a: add - IL_001b: add - IL_001c: stloc.0 - IL_001d: ldloc.0 - IL_001e: 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: call instance int32 assembly/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(valuetype assembly/C obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype assembly/C obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -179,9 +157,7 @@ IL_0016: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -210,40 +186,6 @@ IL_001e: ret } - .method public specialname rtspecialname instance void .ctor(valuetype [runtime]System.DateTime s) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld valuetype [runtime]System.DateTime assembly/C::s - IL_0007: ret - } - - .method assembly static int32 f() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: nop - IL_0001: volatile. - IL_0003: ldsfld int32 assembly/C::init@4 - IL_0008: ldc.i4.1 - IL_0009: bge.s IL_0014 - - IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() - IL_0010: nop - IL_0011: nop - IL_0012: br.s IL_0015 - - IL_0014: nop - IL_0015: ldsfld int32 assembly/C::x - IL_001a: ldstr "2" - IL_001f: callvirt instance int32 [runtime]System.String::get_Length() - IL_0024: add - IL_0025: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -288,17 +230,80 @@ IL_001d: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .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 8 + .maxstack 7 + .locals init (int32 V_0) IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.1 + IL_0008: ldarg.0 + IL_0009: ldfld valuetype [runtime]System.DateTime assembly/C::s + IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0013: ldloc.0 + IL_0014: ldc.i4.6 + IL_0015: shl + IL_0016: ldloc.0 + IL_0017: ldc.i4.2 + IL_0018: shr + IL_0019: add + IL_001a: add + IL_001b: add + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: 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: call instance int32 assembly/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method assembly static int32 f() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: nop + IL_0001: volatile. + IL_0003: ldsfld int32 assembly/C::init@4 + IL_0008: ldc.i4.1 + IL_0009: bge.s IL_0014 + + IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() + IL_0010: nop + IL_0011: nop + IL_0012: br.s IL_0015 + + IL_0014: nop + IL_0015: ldsfld int32 assembly/C::x + IL_001a: ldstr "2" + IL_001f: callvirt instance int32 [runtime]System.String::get_Length() + IL_0024: add + IL_0025: 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 } } @@ -330,4 +335,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..ce6b678820d 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 @@ -50,6 +50,27 @@ .field static assembly int32 x .field static assembly int32 init@4 .field assembly valuetype [runtime]System.DateTime s + .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 public specialname rtspecialname instance void .ctor(valuetype [runtime]System.DateTime s) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld valuetype [runtime]System.DateTime assembly/C::s + IL_0007: ret + } + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -106,45 +127,6 @@ IL_001d: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.1 - IL_0008: ldarg.0 - IL_0009: ldfld valuetype [runtime]System.DateTime assembly/C::s - IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add - IL_001a: add - IL_001b: add - IL_001c: stloc.0 - IL_001d: ldloc.0 - IL_001e: 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: call instance int32 assembly/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/C obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -194,40 +176,6 @@ IL_001e: ret } - .method public specialname rtspecialname instance void .ctor(valuetype [runtime]System.DateTime s) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld valuetype [runtime]System.DateTime assembly/C::s - IL_0007: ret - } - - .method assembly static int32 f() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: nop - IL_0001: volatile. - IL_0003: ldsfld int32 assembly/C::init@4 - IL_0008: ldc.i4.1 - IL_0009: bge.s IL_0014 - - IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() - IL_0010: nop - IL_0011: nop - IL_0012: br.s IL_0015 - - IL_0014: nop - IL_0015: ldsfld int32 assembly/C::x - IL_001a: ldstr "2" - IL_001f: callvirt instance int32 [runtime]System.String::get_Length() - IL_0024: add - IL_0025: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -272,17 +220,80 @@ IL_001d: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .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 8 + .maxstack 7 + .locals init (int32 V_0) IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.1 + IL_0008: ldarg.0 + IL_0009: ldfld valuetype [runtime]System.DateTime assembly/C::s + IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0013: ldloc.0 + IL_0014: ldc.i4.6 + IL_0015: shl + IL_0016: ldloc.0 + IL_0017: ldc.i4.2 + IL_0018: shr + IL_0019: add + IL_001a: add + IL_001b: add + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: 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: call instance int32 assembly/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method assembly static int32 f() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: nop + IL_0001: volatile. + IL_0003: ldsfld int32 assembly/C::init@4 + IL_0008: ldc.i4.1 + IL_0009: bge.s IL_0014 + + IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() + IL_0010: nop + IL_0011: nop + IL_0012: br.s IL_0015 + + IL_0014: nop + IL_0015: ldsfld int32 assembly/C::x + IL_001a: ldstr "2" + IL_001f: callvirt instance int32 [runtime]System.String::get_Length() + IL_0024: add + IL_0025: 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 } } @@ -314,4 +325,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOn.il.net472.bsl index 5e7f3ba9550..1a1d38c2a9a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOn.il.net472.bsl @@ -60,6 +60,27 @@ .field static assembly int32 x .field static assembly int32 init@4 .field assembly valuetype [runtime]System.DateTime s + .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 public specialname rtspecialname instance void .ctor(valuetype [runtime]System.DateTime s) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld valuetype [runtime]System.DateTime assembly/C::s + IL_0007: ret + } + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -92,9 +113,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -118,48 +137,7 @@ IL_001d: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.1 - IL_0008: ldarg.0 - IL_0009: ldfld valuetype [runtime]System.DateTime assembly/C::s - IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add - IL_001a: add - IL_001b: add - IL_001c: stloc.0 - IL_001d: ldloc.0 - IL_001e: 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: call instance int32 assembly/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(valuetype assembly/C obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(valuetype assembly/C obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -179,9 +157,7 @@ IL_0016: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -210,40 +186,6 @@ IL_001e: ret } - .method public specialname rtspecialname instance void .ctor(valuetype [runtime]System.DateTime s) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld valuetype [runtime]System.DateTime assembly/C::s - IL_0007: ret - } - - .method assembly static int32 f() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: nop - IL_0001: volatile. - IL_0003: ldsfld int32 assembly/C::init@4 - IL_0008: ldc.i4.1 - IL_0009: bge.s IL_0014 - - IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() - IL_0010: nop - IL_0011: nop - IL_0012: br.s IL_0015 - - IL_0014: nop - IL_0015: ldsfld int32 assembly/C::x - IL_001a: ldstr "2" - IL_001f: callvirt instance int32 [runtime]System.String::get_Length() - IL_0024: add - IL_0025: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -288,15 +230,67 @@ IL_001d: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .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 8 + .maxstack 7 + .locals init (int32 V_0) IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.1 + IL_0008: ldarg.0 + IL_0009: ldfld valuetype [runtime]System.DateTime assembly/C::s + IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0013: ldloc.0 + IL_0014: ldc.i4.6 + IL_0015: shl + IL_0016: ldloc.0 + IL_0017: ldc.i4.2 + IL_0018: shr + IL_0019: add + IL_001a: add + IL_001b: add + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: 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: call instance int32 assembly/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method assembly static int32 f() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: nop + IL_0001: volatile. + IL_0003: ldsfld int32 assembly/C::init@4 + IL_0008: ldc.i4.1 + IL_0009: bge.s IL_0014 + + IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() + IL_0010: nop + IL_0011: nop + IL_0012: br.s IL_0015 + + IL_0014: nop + IL_0015: ldsfld int32 assembly/C::x + IL_001a: ldstr "2" + IL_001f: callvirt instance int32 [runtime]System.String::get_Length() + IL_0024: add + IL_0025: ret } .method assembly static void staticInitialization@() cil managed @@ -357,4 +351,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..3c36aff3866 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 @@ -50,6 +50,27 @@ .field static assembly int32 x .field static assembly int32 init@4 .field assembly valuetype [runtime]System.DateTime s + .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 public specialname rtspecialname instance void .ctor(valuetype [runtime]System.DateTime s) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld valuetype [runtime]System.DateTime assembly/C::s + IL_0007: ret + } + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -106,45 +127,6 @@ IL_001d: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.1 - IL_0008: ldarg.0 - IL_0009: ldfld valuetype [runtime]System.DateTime assembly/C::s - IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add - IL_001a: add - IL_001b: add - IL_001c: stloc.0 - IL_001d: ldloc.0 - IL_001e: 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: call instance int32 assembly/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype assembly/C obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -194,40 +176,6 @@ IL_001e: ret } - .method public specialname rtspecialname instance void .ctor(valuetype [runtime]System.DateTime s) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld valuetype [runtime]System.DateTime assembly/C::s - IL_0007: ret - } - - .method assembly static int32 f() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: nop - IL_0001: volatile. - IL_0003: ldsfld int32 assembly/C::init@4 - IL_0008: ldc.i4.1 - IL_0009: bge.s IL_0014 - - IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() - IL_0010: nop - IL_0011: nop - IL_0012: br.s IL_0015 - - IL_0014: nop - IL_0015: ldsfld int32 assembly/C::x - IL_001a: ldstr "2" - IL_001f: callvirt instance int32 [runtime]System.String::get_Length() - IL_0024: add - IL_0025: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype assembly/C obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -272,15 +220,67 @@ IL_001d: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .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 8 + .maxstack 7 + .locals init (int32 V_0) IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.1 + IL_0008: ldarg.0 + IL_0009: ldfld valuetype [runtime]System.DateTime assembly/C::s + IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0013: ldloc.0 + IL_0014: ldc.i4.6 + IL_0015: shl + IL_0016: ldloc.0 + IL_0017: ldc.i4.2 + IL_0018: shr + IL_0019: add + IL_001a: add + IL_001b: add + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: 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: call instance int32 assembly/C::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method assembly static int32 f() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: nop + IL_0001: volatile. + IL_0003: ldsfld int32 assembly/C::init@4 + IL_0008: ldc.i4.1 + IL_0009: bge.s IL_0014 + + IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() + IL_0010: nop + IL_0011: nop + IL_0012: br.s IL_0015 + + IL_0014: nop + IL_0015: ldsfld int32 assembly/C::x + IL_001a: ldstr "2" + IL_001f: callvirt instance int32 [runtime]System.String::get_Length() + IL_0024: add + IL_0025: ret } .method assembly static void staticInitialization@() cil managed @@ -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..9a6fe8794e9 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 @@ -114,121 +114,64 @@ .field public static literal valuetype assembly/String/UInt64Enum UInt64 = uint64(0x1) } - .method public static string 'string'(valuetype assembly/String/CharEnum 'enum') cil managed + .method public static string 'string Unchecked.defaultof'() cil managed { - .maxstack 3 - .locals init (valuetype assembly/String/CharEnum V_0) - IL_0000: ldarg.0 + .maxstack 5 + .locals init (class [runtime]System.Enum V_0, + object V_1, + class [runtime]System.IFormattable V_2, + string V_3, + class [runtime]System.Enum V_4) + IL_0000: ldnull IL_0001: stloc.0 - IL_0002: ldloca.s V_0 - IL_0004: constrained. assembly/String/CharEnum - IL_000a: callvirt instance string [netstandard]System.Object::ToString() - IL_000f: ret - } + IL_0002: ldloc.0 + IL_0003: box [runtime]System.Enum + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: isinst [runtime]System.IFormattable + IL_000f: brtrue.s IL_0016 - .method public static string 'string'(valuetype assembly/String/SByteEnum 'enum') cil managed - { - - .maxstack 3 - .locals init (valuetype assembly/String/SByteEnum V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloca.s V_0 - IL_0004: constrained. assembly/String/SByteEnum - IL_000a: callvirt instance string [netstandard]System.Object::ToString() - IL_000f: ret - } + IL_0011: ldloc.1 + IL_0012: brfalse.s IL_0035 - .method public static string 'string'(valuetype assembly/String/Int16Enum 'enum') cil managed - { - - .maxstack 3 - .locals init (valuetype assembly/String/Int16Enum V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloca.s V_0 - IL_0004: constrained. assembly/String/Int16Enum - IL_000a: callvirt instance string [netstandard]System.Object::ToString() - IL_000f: ret - } + IL_0014: br.s IL_003b - .method public static string 'string'(valuetype assembly/String/Int32Enum 'enum') cil managed - { - - .maxstack 3 - .locals init (valuetype assembly/String/Int32Enum V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloca.s V_0 - IL_0004: constrained. assembly/String/Int32Enum - IL_000a: callvirt instance string [netstandard]System.Object::ToString() - IL_000f: ret - } + IL_0016: ldloc.1 + IL_0017: unbox.any [runtime]System.IFormattable + IL_001c: stloc.2 + IL_001d: ldloc.2 + IL_001e: ldnull + IL_001f: call class [netstandard]System.Globalization.CultureInfo [netstandard]System.Globalization.CultureInfo::get_InvariantCulture() + IL_0024: callvirt instance string [netstandard]System.IFormattable::ToString(string, + class [netstandard]System.IFormatProvider) + IL_0029: stloc.3 + IL_002a: ldloc.3 + IL_002b: brtrue.s IL_0033 - .method public static string 'string'(valuetype assembly/String/Int64Enum 'enum') cil managed - { - - .maxstack 3 - .locals init (valuetype assembly/String/Int64Enum V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloca.s V_0 - IL_0004: constrained. assembly/String/Int64Enum - IL_000a: callvirt instance string [netstandard]System.Object::ToString() - IL_000f: ret - } + IL_002d: ldstr "" + IL_0032: ret - .method public static string 'string'(valuetype assembly/String/ByteEnum 'enum') cil managed - { - - .maxstack 3 - .locals init (valuetype assembly/String/ByteEnum V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloca.s V_0 - IL_0004: constrained. assembly/String/ByteEnum - IL_000a: callvirt instance string [netstandard]System.Object::ToString() - IL_000f: ret - } + IL_0033: ldloc.3 + IL_0034: ret - .method public static string 'string'(valuetype assembly/String/UInt16Enum 'enum') cil managed - { - - .maxstack 3 - .locals init (valuetype assembly/String/UInt16Enum V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloca.s V_0 - IL_0004: constrained. assembly/String/UInt16Enum - IL_000a: callvirt instance string [netstandard]System.Object::ToString() - IL_000f: ret - } + IL_0035: ldstr "" + IL_003a: ret - .method public static string 'string'(valuetype assembly/String/UInt32Enum 'enum') cil managed - { - - .maxstack 3 - .locals init (valuetype assembly/String/UInt32Enum V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloca.s V_0 - IL_0004: constrained. assembly/String/UInt32Enum - IL_000a: callvirt instance string [netstandard]System.Object::ToString() - IL_000f: ret - } + IL_003b: ldloc.0 + IL_003c: stloc.s V_4 + IL_003e: ldloca.s V_4 + IL_0040: constrained. [runtime]System.Enum + IL_0046: callvirt instance string [netstandard]System.Object::ToString() + IL_004b: stloc.3 + IL_004c: ldloc.3 + IL_004d: brtrue.s IL_0055 - .method public static string 'string'(valuetype assembly/String/UInt64Enum 'enum') cil managed - { - - .maxstack 3 - .locals init (valuetype assembly/String/UInt64Enum V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloca.s V_0 - IL_0004: constrained. assembly/String/UInt64Enum - IL_000a: callvirt instance string [netstandard]System.Object::ToString() - IL_000f: ret + IL_004f: ldstr "" + IL_0054: ret + + IL_0055: ldloc.3 + IL_0056: ret } .method public static string 'string<#Enum>'<([runtime]System.Enum) a>(!!a 'enum') cil managed @@ -459,64 +402,121 @@ IL_0053: ret } - .method public static string 'string Unchecked.defaultof'() cil managed + .method public static string 'string'(valuetype assembly/String/ByteEnum 'enum') cil managed { - .maxstack 5 - .locals init (class [runtime]System.Enum V_0, - object V_1, - class [runtime]System.IFormattable V_2, - string V_3, - class [runtime]System.Enum V_4) - IL_0000: ldnull + .maxstack 3 + .locals init (valuetype assembly/String/ByteEnum V_0) + IL_0000: ldarg.0 IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: box [runtime]System.Enum - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: isinst [runtime]System.IFormattable - IL_000f: brtrue.s IL_0016 - - IL_0011: ldloc.1 - IL_0012: brfalse.s IL_0035 + IL_0002: ldloca.s V_0 + IL_0004: constrained. assembly/String/ByteEnum + IL_000a: callvirt instance string [netstandard]System.Object::ToString() + IL_000f: ret + } - IL_0014: br.s IL_003b + .method public static string 'string'(valuetype assembly/String/CharEnum 'enum') cil managed + { + + .maxstack 3 + .locals init (valuetype assembly/String/CharEnum V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloca.s V_0 + IL_0004: constrained. assembly/String/CharEnum + IL_000a: callvirt instance string [netstandard]System.Object::ToString() + IL_000f: ret + } - IL_0016: ldloc.1 - IL_0017: unbox.any [runtime]System.IFormattable - IL_001c: stloc.2 - IL_001d: ldloc.2 - IL_001e: ldnull - IL_001f: call class [netstandard]System.Globalization.CultureInfo [netstandard]System.Globalization.CultureInfo::get_InvariantCulture() - IL_0024: callvirt instance string [netstandard]System.IFormattable::ToString(string, - class [netstandard]System.IFormatProvider) - IL_0029: stloc.3 - IL_002a: ldloc.3 - IL_002b: brtrue.s IL_0033 + .method public static string 'string'(valuetype assembly/String/Int16Enum 'enum') cil managed + { + + .maxstack 3 + .locals init (valuetype assembly/String/Int16Enum V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloca.s V_0 + IL_0004: constrained. assembly/String/Int16Enum + IL_000a: callvirt instance string [netstandard]System.Object::ToString() + IL_000f: ret + } - IL_002d: ldstr "" - IL_0032: ret + .method public static string 'string'(valuetype assembly/String/Int32Enum 'enum') cil managed + { + + .maxstack 3 + .locals init (valuetype assembly/String/Int32Enum V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloca.s V_0 + IL_0004: constrained. assembly/String/Int32Enum + IL_000a: callvirt instance string [netstandard]System.Object::ToString() + IL_000f: ret + } - IL_0033: ldloc.3 - IL_0034: ret + .method public static string 'string'(valuetype assembly/String/Int64Enum 'enum') cil managed + { + + .maxstack 3 + .locals init (valuetype assembly/String/Int64Enum V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloca.s V_0 + IL_0004: constrained. assembly/String/Int64Enum + IL_000a: callvirt instance string [netstandard]System.Object::ToString() + IL_000f: ret + } - IL_0035: ldstr "" - IL_003a: ret + .method public static string 'string'(valuetype assembly/String/SByteEnum 'enum') cil managed + { + + .maxstack 3 + .locals init (valuetype assembly/String/SByteEnum V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloca.s V_0 + IL_0004: constrained. assembly/String/SByteEnum + IL_000a: callvirt instance string [netstandard]System.Object::ToString() + IL_000f: ret + } - IL_003b: ldloc.0 - IL_003c: stloc.s V_4 - IL_003e: ldloca.s V_4 - IL_0040: constrained. [runtime]System.Enum - IL_0046: callvirt instance string [netstandard]System.Object::ToString() - IL_004b: stloc.3 - IL_004c: ldloc.3 - IL_004d: brtrue.s IL_0055 + .method public static string 'string'(valuetype assembly/String/UInt16Enum 'enum') cil managed + { + + .maxstack 3 + .locals init (valuetype assembly/String/UInt16Enum V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloca.s V_0 + IL_0004: constrained. assembly/String/UInt16Enum + IL_000a: callvirt instance string [netstandard]System.Object::ToString() + IL_000f: ret + } - IL_004f: ldstr "" - IL_0054: ret + .method public static string 'string'(valuetype assembly/String/UInt32Enum 'enum') cil managed + { + + .maxstack 3 + .locals init (valuetype assembly/String/UInt32Enum V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloca.s V_0 + IL_0004: constrained. assembly/String/UInt32Enum + IL_000a: callvirt instance string [netstandard]System.Object::ToString() + IL_000f: ret + } - IL_0055: ldloc.3 - IL_0056: ret + .method public static string 'string'(valuetype assembly/String/UInt64Enum 'enum') cil managed + { + + .maxstack 3 + .locals init (valuetype assembly/String/UInt64Enum V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloca.s V_0 + IL_0004: constrained. assembly/String/UInt64Enum + IL_000a: callvirt instance string [netstandard]System.Object::ToString() + IL_000f: ret } } @@ -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..1a332baa46f 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 @@ -42,50 +42,50 @@ 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 public static string 'string sbyte'(int8 'value') cil managed + .method public static string 'string int16'(int16 'value') cil managed { .maxstack 8 IL_0000: ldarga.s 'value' IL_0002: ldnull IL_0003: call class [netstandard]System.Globalization.CultureInfo [netstandard]System.Globalization.CultureInfo::get_InvariantCulture() - IL_0008: call instance string [netstandard]System.SByte::ToString(string, + IL_0008: call instance string [netstandard]System.Int16::ToString(string, class [netstandard]System.IFormatProvider) IL_000d: ret } - .method public static string 'string int16'(int16 'value') cil managed + .method public static string 'string int32'(int32 'value') cil managed { .maxstack 8 IL_0000: ldarga.s 'value' IL_0002: ldnull IL_0003: call class [netstandard]System.Globalization.CultureInfo [netstandard]System.Globalization.CultureInfo::get_InvariantCulture() - IL_0008: call instance string [netstandard]System.Int16::ToString(string, + IL_0008: call instance string [netstandard]System.Int32::ToString(string, class [netstandard]System.IFormatProvider) IL_000d: ret } - .method public static string 'string int32'(int32 'value') cil managed + .method public static string 'string int64'(int64 'value') cil managed { .maxstack 8 IL_0000: ldarga.s 'value' IL_0002: ldnull IL_0003: call class [netstandard]System.Globalization.CultureInfo [netstandard]System.Globalization.CultureInfo::get_InvariantCulture() - IL_0008: call instance string [netstandard]System.Int32::ToString(string, + IL_0008: call instance string [netstandard]System.Int64::ToString(string, class [netstandard]System.IFormatProvider) IL_000d: ret } - .method public static string 'string int64'(int64 'value') cil managed + .method public static string 'string sbyte'(int8 'value') cil managed { .maxstack 8 IL_0000: ldarga.s 'value' IL_0002: ldnull IL_0003: call class [netstandard]System.Globalization.CultureInfo [netstandard]System.Globalization.CultureInfo::get_InvariantCulture() - IL_0008: call instance string [netstandard]System.Int64::ToString(string, + IL_0008: call instance string [netstandard]System.SByte::ToString(string, class [netstandard]System.IFormatProvider) IL_000d: ret } @@ -111,4 +111,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch06.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch06.fs.il.net472.bsl index 9995902f04b..e7232f0c2c2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch06.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch06.fs.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -42,7 +43,7 @@ [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 ) + 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 @@ -78,9 +79,9 @@ .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype 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 ) + .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 ) .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 ) @@ -93,94 +94,6 @@ IL_000d: ret } - .method public static class assembly/Discr get_CaseA() 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 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 - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ) @@ -287,36 +200,6 @@ 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 - IL_0001: brfalse.s IL_000c - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: ldfld int32 assembly/Discr::_tag - IL_000b: ret - - 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 ) @@ -434,6 +317,124 @@ IL_0013: 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 + IL_0001: brfalse.s IL_000c + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 assembly/Discr::_tag + IL_000b: ret + + 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 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/Discr get_CaseA() 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 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 static class assembly/Discr get_CaseB() 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 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_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 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 + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -509,97 +510,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..e7232f0c2c2 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,100 +92,12 @@ IL_0007: ldarg.1 IL_0008: stfld int32 assembly/Discr::_tag IL_000d: ret - } - - .method public static class assembly/Discr get_CaseA() 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 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 - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 +136,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,42 +198,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 - IL_0001: brfalse.s IL_000c - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: ldfld int32 assembly/Discr::_tag - IL_000b: ret - - 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 +236,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 +259,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 +294,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 +315,125 @@ IL_0012: ldc.i4.0 IL_0013: 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 + IL_0001: brfalse.s IL_000c + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 assembly/Discr::_tag + IL_000b: ret + + 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 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/Discr get_CaseA() 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 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 static class assembly/Discr get_CaseB() 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 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_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 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 + } .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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch07.fs.il.net472.bsl index b5e1a0e3c10..bd31b09b83f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch07.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch07.fs.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -42,7 +43,7 @@ [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 ) + 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 @@ -78,9 +79,9 @@ .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype 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 ) + .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 ) .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 ) @@ -93,94 +94,6 @@ IL_000d: ret } - .method public static class assembly/Discr get_CaseA() 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 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 - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 ) @@ -287,36 +200,6 @@ 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 - IL_0001: brfalse.s IL_000c - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: ldfld int32 assembly/Discr::_tag - IL_000b: ret - - 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 ) @@ -434,6 +317,124 @@ IL_0013: 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 + IL_0001: brfalse.s IL_000c + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 assembly/Discr::_tag + IL_000b: ret + + 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 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/Discr get_CaseA() 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 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 static class assembly/Discr get_CaseB() 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 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_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 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 + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -509,97 +510,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..bd31b09b83f 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,100 +92,12 @@ IL_0007: ldarg.1 IL_0008: stfld int32 assembly/Discr::_tag IL_000d: ret - } - - .method public static class assembly/Discr get_CaseA() 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 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 - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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 +136,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,42 +198,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 - IL_0001: brfalse.s IL_000c - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: ldfld int32 assembly/Discr::_tag - IL_000b: ret - - 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 +236,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 +259,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 +294,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 +315,125 @@ IL_0012: ldc.i4.0 IL_0013: 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 + IL_0001: brfalse.s IL_000c + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 assembly/Discr::_tag + IL_000b: ret + + 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 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .method public static class assembly/Discr get_CaseA() 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 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 static class assembly/Discr get_CaseB() 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 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_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 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 + } .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..9ca7ec37d11 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch09.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch09.fs.il.bsl @@ -37,6 +37,17 @@ extends [FSharp.Core]Microsoft.FSharp.Core.FSharpTypeFunc { .field static assembly initonly class assembly/GenericInner@15 @_instance + .method private specialname rtspecialname static void .cctor() 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 10 + IL_0000: newobj instance void assembly/GenericInner@15::.ctor() + IL_0005: stsfld class assembly/GenericInner@15 assembly/GenericInner@15::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -62,17 +73,6 @@ IL_000b: ret } - .method private specialname rtspecialname static void .cctor() 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 10 - IL_0000: newobj instance void assembly/GenericInner@15::.ctor() - IL_0005: stsfld class assembly/GenericInner@15 assembly/GenericInner@15::@_instance - IL_000a: ret - } - } .class auto ansi serializable sealed nested assembly beforefieldinit GenericInner@15T @@ -122,6 +122,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32> { .field static assembly initonly class assembly/NonGenericInner@25 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/NonGenericInner@25::.ctor() + IL_0005: stsfld class assembly/NonGenericInner@25 assembly/NonGenericInner@25::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -149,15 +158,6 @@ IL_000c: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/NonGenericInner@25::.ctor() - IL_0005: stsfld class assembly/NonGenericInner@25 assembly/NonGenericInner@25::@_instance - IL_000a: ret - } - } .class auto ansi serializable sealed nested assembly beforefieldinit NonGenericInnerWithCapture@34 @@ -197,31 +197,6 @@ } - .method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 funcA(int32 n) cil managed - { - - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: sub - IL_0004: switch ( - IL_0013, - IL_001b) - IL_0011: br.s IL_001d - - IL_0013: ldc.i4.s 10 - IL_0015: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::Some(!0) - IL_001a: ret - - IL_001b: ldnull - IL_001c: ret - - IL_001d: ldc.i4.s 22 - IL_001f: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::Some(!0) - IL_0024: ret - } - .method public static int32 OuterWithGenericInner(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { @@ -272,6 +247,31 @@ IL_0010: ret } + .method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 funcA(int32 n) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldc.i4.1 + IL_0003: sub + IL_0004: switch ( + IL_0013, + IL_001b) + IL_0011: br.s IL_001d + + IL_0013: ldc.i4.s 10 + IL_0015: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::Some(!0) + IL_001a: ret + + IL_001b: ldnull + IL_001c: ret + + IL_001d: ldc.i4.s 22 + IL_001f: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::Some(!0) + IL_0024: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -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..1ad39ec0ce8 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 @@ -43,16 +43,14 @@ { .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 assembly float64 F@ - .method public hidebysig specialname instance float64 get_F() cil managed + .method public specialname rtspecialname instance void .ctor(float64 f) cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld float64 floatsanddoubles/Float::F@ - IL_0006: ret + IL_0001: ldarg.1 + IL_0002: stfld float64 floatsanddoubles/Float::F@ + IL_0007: ret } .method public hidebysig virtual final instance int32 CompareTo(valuetype floatsanddoubles/Float obj) cil managed @@ -177,45 +175,6 @@ IL_0041: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.1 - IL_0008: ldarg.0 - IL_0009: ldfld float64 floatsanddoubles/Float::F@ - IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add - IL_001a: add - IL_001b: add - IL_001c: stloc.0 - IL_001d: ldloc.0 - IL_001e: 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: call instance int32 floatsanddoubles/Float::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype floatsanddoubles/Float obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -264,16 +223,6 @@ IL_001e: ret } - .method public specialname rtspecialname instance void .ctor(float64 f) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld float64 floatsanddoubles/Float::F@ - IL_0007: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype floatsanddoubles/Float obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -340,6 +289,57 @@ IL_001d: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.1 + IL_0008: ldarg.0 + IL_0009: ldfld float64 floatsanddoubles/Float::F@ + IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0013: ldloc.0 + IL_0014: ldc.i4.6 + IL_0015: shl + IL_0016: ldloc.0 + IL_0017: ldc.i4.2 + IL_0018: shr + IL_0019: add + IL_001a: add + IL_001b: add + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: 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: call instance int32 floatsanddoubles/Float::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance float64 get_F() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld float64 floatsanddoubles/Float::F@ + IL_0006: ret + } + .property instance float64 F() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -358,16 +358,14 @@ { .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 assembly float64 D@ - .method public hidebysig specialname instance float64 get_D() cil managed + .method public specialname rtspecialname instance void .ctor(float64 d) cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld float64 floatsanddoubles/Double::D@ - IL_0006: ret + IL_0001: ldarg.1 + IL_0002: stfld float64 floatsanddoubles/Double::D@ + IL_0007: ret } .method public hidebysig virtual final instance int32 CompareTo(valuetype floatsanddoubles/Double obj) cil managed @@ -492,45 +490,6 @@ IL_0041: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.1 - IL_0008: ldarg.0 - IL_0009: ldfld float64 floatsanddoubles/Double::D@ - IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add - IL_001a: add - IL_001b: add - IL_001c: stloc.0 - IL_001d: ldloc.0 - IL_001e: 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: call instance int32 floatsanddoubles/Double::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype floatsanddoubles/Double obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -579,16 +538,6 @@ IL_001e: ret } - .method public specialname rtspecialname instance void .ctor(float64 d) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld float64 floatsanddoubles/Double::D@ - IL_0007: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype floatsanddoubles/Double obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -655,6 +604,57 @@ IL_001d: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.1 + IL_0008: ldarg.0 + IL_0009: ldfld float64 floatsanddoubles/Double::D@ + IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0013: ldloc.0 + IL_0014: ldc.i4.6 + IL_0015: shl + IL_0016: ldloc.0 + IL_0017: ldc.i4.2 + IL_0018: shr + IL_0019: add + IL_001a: add + IL_001b: add + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: 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: call instance int32 floatsanddoubles/Double::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance float64 get_D() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld float64 floatsanddoubles/Double::D@ + IL_0006: ret + } + .property instance float64 D() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -1037,12 +1037,15 @@ } - .method public specialname static valuetype floatsanddoubles/Float[] get_floats() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld valuetype floatsanddoubles/Float[] ''.$floatsanddoubles::floats@22 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$floatsanddoubles::init@ + IL_0006: ldsfld int32 ''.$floatsanddoubles::init@ + IL_000b: pop + IL_000c: ret } .method public specialname static valuetype floatsanddoubles/Double[] get_doubles() cil managed @@ -1053,6 +1056,14 @@ IL_0005: ret } + .method public specialname static valuetype floatsanddoubles/Float[] get_floats() cil managed + { + + .maxstack 8 + IL_0000: ldsfld valuetype floatsanddoubles/Float[] ''.$floatsanddoubles::floats@22 + IL_0005: ret + } + .method public specialname static string[] get_names() cil managed { @@ -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..daff4197602 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 @@ -43,16 +43,14 @@ { .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 assembly float64 F@ - .method public hidebysig specialname instance float64 get_F() cil managed + .method public specialname rtspecialname instance void .ctor(float64 f) cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld float64 floatsanddoubles/Float::F@ - IL_0006: ret + IL_0001: ldarg.1 + IL_0002: stfld float64 floatsanddoubles/Float::F@ + IL_0007: ret } .method public hidebysig virtual final instance int32 CompareTo(valuetype floatsanddoubles/Float obj) cil managed @@ -177,45 +175,6 @@ IL_0041: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.1 - IL_0008: ldarg.0 - IL_0009: ldfld float64 floatsanddoubles/Float::F@ - IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add - IL_001a: add - IL_001b: add - IL_001c: stloc.0 - IL_001d: ldloc.0 - IL_001e: 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: call instance int32 floatsanddoubles/Float::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype floatsanddoubles/Float obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -264,16 +223,6 @@ IL_001e: ret } - .method public specialname rtspecialname instance void .ctor(float64 f) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld float64 floatsanddoubles/Float::F@ - IL_0007: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype floatsanddoubles/Float obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -340,6 +289,57 @@ IL_001d: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.1 + IL_0008: ldarg.0 + IL_0009: ldfld float64 floatsanddoubles/Float::F@ + IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0013: ldloc.0 + IL_0014: ldc.i4.6 + IL_0015: shl + IL_0016: ldloc.0 + IL_0017: ldc.i4.2 + IL_0018: shr + IL_0019: add + IL_001a: add + IL_001b: add + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: 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: call instance int32 floatsanddoubles/Float::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance float64 get_F() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld float64 floatsanddoubles/Float::F@ + IL_0006: ret + } + .property instance float64 F() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -358,16 +358,14 @@ { .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 assembly float64 D@ - .method public hidebysig specialname instance float64 get_D() cil managed + .method public specialname rtspecialname instance void .ctor(float64 d) cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 - IL_0001: ldfld float64 floatsanddoubles/Double::D@ - IL_0006: ret + IL_0001: ldarg.1 + IL_0002: stfld float64 floatsanddoubles/Double::D@ + IL_0007: ret } .method public hidebysig virtual final instance int32 CompareTo(valuetype floatsanddoubles/Double obj) cil managed @@ -492,45 +490,6 @@ IL_0041: 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 7 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4 0x9e3779b9 - IL_0007: ldarg.1 - IL_0008: ldarg.0 - IL_0009: ldfld float64 floatsanddoubles/Double::D@ - IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, - !!0) - IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add - IL_001a: add - IL_001b: add - IL_001c: stloc.0 - IL_001d: ldloc.0 - IL_001e: 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: call instance int32 floatsanddoubles/Double::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(valuetype floatsanddoubles/Double obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -579,16 +538,6 @@ IL_001e: ret } - .method public specialname rtspecialname instance void .ctor(float64 d) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld float64 floatsanddoubles/Double::D@ - IL_0007: ret - } - .method public hidebysig virtual final instance bool Equals(valuetype floatsanddoubles/Double obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -655,6 +604,57 @@ IL_001d: 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 7 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.1 + IL_0008: ldarg.0 + IL_0009: ldfld float64 floatsanddoubles/Double::D@ + IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0013: ldloc.0 + IL_0014: ldc.i4.6 + IL_0015: shl + IL_0016: ldloc.0 + IL_0017: ldc.i4.2 + IL_0018: shr + IL_0019: add + IL_001a: add + IL_001b: add + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: 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: call instance int32 floatsanddoubles/Double::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig specialname instance float64 get_D() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 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: ldarg.0 + IL_0001: ldfld float64 floatsanddoubles/Double::D@ + IL_0006: ret + } + .property instance float64 D() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -1043,12 +1043,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 string[] names@24 .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 valuetype floatsanddoubles/Float[] get_floats() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld valuetype floatsanddoubles/Float[] floatsanddoubles::floats@22 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$floatsanddoubles::init@ + IL_0006: ldsfld int32 ''.$floatsanddoubles::init@ + IL_000b: pop + IL_000c: ret } .method public specialname static valuetype floatsanddoubles/Double[] get_doubles() cil managed @@ -1059,6 +1062,14 @@ IL_0005: ret } + .method public specialname static valuetype floatsanddoubles/Float[] get_floats() cil managed + { + + .maxstack 8 + IL_0000: ldsfld valuetype floatsanddoubles/Float[] floatsanddoubles::floats@22 + IL_0005: ret + } + .method public specialname static string[] get_names() cil managed { @@ -1223,17 +1234,6 @@ 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 - } - .method assembly static void staticInitialization@() cil managed { @@ -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..bd5968a1fc9 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 @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/f@11 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/f@11::.ctor() + IL_0005: stsfld class assembly/f@11 assembly/f@11::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -65,15 +74,6 @@ IL_0019: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/f@11::.ctor() - IL_0005: stsfld class assembly/f@11 assembly/f@11::@_instance - IL_000a: ret - } - } .method public static int32 TestFunction1() cil managed @@ -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..bd5968a1fc9 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 @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/f@11 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/f@11::.ctor() + IL_0005: stsfld class assembly/f@11 assembly/f@11::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -65,15 +74,6 @@ IL_0019: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/f@11::.ctor() - IL_0005: stsfld class assembly/f@11 assembly/f@11::@_instance - IL_000a: ret - } - } .method public static int32 TestFunction1() cil managed @@ -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..0bd1d2cd4bf 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 @@ -42,6 +42,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/f@11 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/f@11::.ctor() + IL_0005: stsfld class assembly/f@11 assembly/f@11::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -75,15 +84,6 @@ IL_0020: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/f@11::.ctor() - IL_0005: stsfld class assembly/f@11 assembly/f@11::@_instance - IL_000a: ret - } - } .method public static int32 TestFunction1() cil managed @@ -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..3c8cc92fbeb 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 @@ -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 + } + .method public static !!a Null() cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 ) 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..b8b706e5a95 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 @@ -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 + } + .method public static !!a Null() cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 ) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index ba96754e3e6..62dc40d86c4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.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 + } + .method public static !!a Null() cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 ) @@ -54,17 +65,6 @@ 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 static void staticInitialization@() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 22cba60ff1f..0838bcd06f4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.OptimizeOn.il.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 + } + .method public static !!a Null() cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 ) @@ -59,17 +70,6 @@ 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 static void staticInitialization@() cil managed { 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..eb021074d71 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction14.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction14.fs.il.bsl @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32> { .field static assembly initonly class assembly/assembly@5 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly@5::.ctor() + IL_0005: stsfld class assembly/assembly@5 assembly/assembly@5::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -59,21 +68,21 @@ IL_0009: ret } + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'assembly@5-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/'assembly@5-1' @_instance .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/assembly@5::.ctor() - IL_0005: stsfld class assembly/assembly@5 assembly/assembly@5::@_instance + IL_0000: newobj instance void assembly/'assembly@5-1'::.ctor() + IL_0005: stsfld class assembly/'assembly@5-1' assembly/'assembly@5-1'::@_instance IL_000a: ret } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'assembly@5-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/'assembly@5-1' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -95,15 +104,6 @@ IL_0003: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/'assembly@5-1'::.ctor() - IL_0005: stsfld class assembly/'assembly@5-1' assembly/'assembly@5-1'::@_instance - IL_000a: ret - } - } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly() cil managed @@ -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..69fbfccab28 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 @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/assembly@6 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly@6::.ctor() + IL_0005: stsfld class assembly/assembly@6 assembly/assembly@6::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -58,15 +67,6 @@ IL_0003: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/assembly@6::.ctor() - IL_0005: stsfld class assembly/assembly@6 assembly/assembly@6::@_instance - IL_000a: ret - } - } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly(int32 inp) cil managed @@ -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..0e7671420a7 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 @@ -37,6 +37,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/assembly@6 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly@6::.ctor() + IL_0005: stsfld class assembly/assembly@6 assembly/assembly@6::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -58,15 +67,6 @@ IL_0003: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/assembly@6::.ctor() - IL_0005: stsfld class assembly/assembly@6 assembly/assembly@6::@_instance - IL_000a: ret - } - } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly(int32 inp) cil managed @@ -110,4 +110,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.net472.bsl index 947a4476e08..0373dcecdfb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.net472.bsl @@ -42,7 +42,7 @@ [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 ) + 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 ) .field assembly initonly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -52,26 +52,11 @@ .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 public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/U::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 - 69 6F 6E 31 36 2B 55 00 00 ) + .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 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 36 2B 55 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 ) @@ -87,67 +72,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/U::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/U::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -338,74 +262,6 @@ IL_0073: 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 7 - .locals init (int32 V_0, - class assembly/U V_1, - class [runtime]System.Collections.IEqualityComparer V_2, - class [runtime]System.Collections.IEqualityComparer V_3) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_003b - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 assembly/U::item2 - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldc.i4 0x9e3779b9 - IL_0027: ldarg.1 - IL_0028: stloc.3 - IL_0029: ldloc.1 - IL_002a: ldfld int32 assembly/U::item1 - IL_002f: ldloc.0 - IL_0030: ldc.i4.6 - IL_0031: shl - IL_0032: ldloc.0 - IL_0033: ldc.i4.2 - IL_0034: shr - IL_0035: add - IL_0036: add - IL_0037: add - IL_0038: stloc.0 - IL_0039: ldloc.0 - IL_003a: ret - - IL_003b: ldc.i4.0 - IL_003c: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -552,6 +408,150 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/U V_1, + class [runtime]System.Collections.IEqualityComparer V_2, + class [runtime]System.Collections.IEqualityComparer V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003b + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item2 + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldc.i4 0x9e3779b9 + IL_0027: ldarg.1 + IL_0028: stloc.3 + IL_0029: ldloc.1 + IL_002a: ldfld int32 assembly/U::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl + IL_0032: ldloc.0 + IL_0033: ldc.i4.2 + IL_0034: shr + IL_0035: add + IL_0036: add + IL_0037: add + IL_0038: stloc.0 + IL_0039: ldloc.0 + IL_003a: ret + + IL_003b: ldc.i4.0 + IL_003c: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: 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/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/U::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -592,7 +592,7 @@ IL_0008: ldloc.0 IL_0009: ldloc.0 IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_000f: ret } @@ -611,97 +611,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..0373dcecdfb 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 @@ -52,21 +52,6 @@ .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 public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/U::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -87,67 +72,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/U::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/U::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -338,74 +262,6 @@ IL_0073: 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 7 - .locals init (int32 V_0, - class assembly/U V_1, - class [runtime]System.Collections.IEqualityComparer V_2, - class [runtime]System.Collections.IEqualityComparer V_3) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_003b - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 assembly/U::item2 - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldc.i4 0x9e3779b9 - IL_0027: ldarg.1 - IL_0028: stloc.3 - IL_0029: ldloc.1 - IL_002a: ldfld int32 assembly/U::item1 - IL_002f: ldloc.0 - IL_0030: ldc.i4.6 - IL_0031: shl - IL_0032: ldloc.0 - IL_0033: ldc.i4.2 - IL_0034: shr - IL_0035: add - IL_0036: add - IL_0037: add - IL_0038: stloc.0 - IL_0039: ldloc.0 - IL_003a: ret - - IL_003b: ldc.i4.0 - IL_003c: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -552,6 +408,150 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/U V_1, + class [runtime]System.Collections.IEqualityComparer V_2, + class [runtime]System.Collections.IEqualityComparer V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003b + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item2 + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldc.i4 0x9e3779b9 + IL_0027: ldarg.1 + IL_0028: stloc.3 + IL_0029: ldloc.1 + IL_002a: ldfld int32 assembly/U::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl + IL_0032: ldloc.0 + IL_0033: ldc.i4.2 + IL_0034: shr + IL_0035: add + IL_0036: add + IL_0037: add + IL_0038: stloc.0 + IL_0039: ldloc.0 + IL_003a: ret + + IL_003b: ldc.i4.0 + IL_003c: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: 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/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/U::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -615,4 +615,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.net472.bsl index 6184cdff6e8..b1aadc7add4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.net472.bsl @@ -42,7 +42,7 @@ [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 ) + 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 ) .field assembly initonly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -52,26 +52,11 @@ .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 public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/U::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 - 69 6F 6E 31 36 2B 55 00 00 ) + .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 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 36 2B 55 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 ) @@ -87,67 +72,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/U::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/U::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -327,68 +251,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/U V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/U::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/U::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -525,6 +387,144 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/U::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/U::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: 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/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/U::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -565,7 +565,7 @@ IL_0008: ldloc.0 IL_0009: ldloc.0 IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_000f: ret } @@ -584,97 +584,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..b1aadc7add4 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 @@ -52,21 +52,6 @@ .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 public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/U::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -87,67 +72,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/U::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/U::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -327,68 +251,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/U V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/U::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/U::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -525,6 +387,144 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/U::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/U::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: 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/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/U::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -588,4 +588,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.net472.bsl index 0ac93212d8e..7e877213e36 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.net472.bsl @@ -58,35 +58,11 @@ .field assembly int32 y@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/R::x@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/R::y@ - IL_0006: ret - } - - .method public specialname rtspecialname - instance void .ctor(int32 x, - int32 y) cil managed + .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 - 69 6F 6E 31 37 2B 52 00 00 ) + .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 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 37 2B 52 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -100,19 +76,6 @@ IL_0014: 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/R>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/R obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -203,9 +166,7 @@ IL_000c: ret } - .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + .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 ) @@ -292,70 +253,7 @@ IL_006e: 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0035 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/R::y@ - IL_0012: ldloc.0 - IL_0013: ldc.i4.6 - IL_0014: shl - IL_0015: ldloc.0 - IL_0016: ldc.i4.2 - IL_0017: shr - IL_0018: add - IL_0019: add - IL_001a: add - IL_001b: stloc.0 - IL_001c: ldc.i4 0x9e3779b9 - IL_0021: ldarg.1 - IL_0022: stloc.2 - IL_0023: ldarg.0 - IL_0024: ldfld int32 assembly/R::x@ - IL_0029: ldloc.0 - IL_002a: ldc.i4.6 - IL_002b: shl - IL_002c: ldloc.0 - IL_002d: ldc.i4.2 - IL_002e: shr - IL_002f: add - IL_0030: add - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ret - - IL_0035: ldc.i4.0 - IL_0036: 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/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool - Equals(class assembly/R obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .method public hidebysig instance bool Equals(class assembly/R obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -403,9 +301,7 @@ IL_0036: ret } - .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + .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 ) @@ -487,6 +383,102 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/R::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl + IL_0015: ldloc.0 + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/R::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: 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/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/R>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_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: ldfld int32 assembly/R::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/R::y@ + IL_0006: ret + } + .property instance int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -514,7 +506,7 @@ IL_0008: ldloc.0 IL_0009: ldloc.0 IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_000f: ret } @@ -533,99 +525,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname - instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, - class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..b998f45d753 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 @@ -48,28 +48,6 @@ .field assembly int32 y@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/R::x@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/R::y@ - IL_0006: ret - } - .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -88,19 +66,6 @@ IL_0014: 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/R>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/R obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -278,67 +243,6 @@ IL_006e: 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0035 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/R::y@ - IL_0012: ldloc.0 - IL_0013: ldc.i4.6 - IL_0014: shl - IL_0015: ldloc.0 - IL_0016: ldc.i4.2 - IL_0017: shr - IL_0018: add - IL_0019: add - IL_001a: add - IL_001b: stloc.0 - IL_001c: ldc.i4 0x9e3779b9 - IL_0021: ldarg.1 - IL_0022: stloc.2 - IL_0023: ldarg.0 - IL_0024: ldfld int32 assembly/R::x@ - IL_0029: ldloc.0 - IL_002a: ldc.i4.6 - IL_002b: shl - IL_002c: ldloc.0 - IL_002d: ldc.i4.2 - IL_002e: shr - IL_002f: add - IL_0030: add - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ret - - IL_0035: ldc.i4.0 - IL_0036: 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/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/R obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -469,6 +373,102 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/R::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl + IL_0015: ldloc.0 + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/R::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: 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/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/R>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_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: ldfld int32 assembly/R::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/R::y@ + IL_0006: ret + } + .property instance int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -519,4 +519,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.net472.bsl index 4f3b183612d..05d8012d529 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.net472.bsl @@ -48,33 +48,11 @@ .field assembly int32 y@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/R::x@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/R::y@ - IL_0006: ret - } - .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 - 69 6F 6E 31 37 2B 52 00 00 ) + .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 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 37 2B 52 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -88,19 +66,6 @@ IL_0014: 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/R>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/R obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -264,61 +229,6 @@ IL_005b: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/R::y@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/R::x@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/R obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -439,6 +349,96 @@ IL_0013: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/R::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/R::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/R>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_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: ldfld int32 assembly/R::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/R::y@ + IL_0006: ret + } + .property instance int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -466,7 +466,7 @@ IL_0008: ldloc.0 IL_0009: ldloc.0 IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_000f: ret } @@ -485,97 +485,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..05d8012d529 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 @@ -48,28 +48,6 @@ .field assembly int32 y@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/R::x@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/R::y@ - IL_0006: ret - } - .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -88,19 +66,6 @@ IL_0014: 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/R>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/R obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -264,61 +229,6 @@ IL_005b: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/R::y@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/R::x@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/R obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -439,6 +349,96 @@ IL_0013: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/R::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/R::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/R>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_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: ldfld int32 assembly/R::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/R::y@ + IL_0006: ret + } + .property instance int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -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..eaea87f8335 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 @@ -70,34 +70,34 @@ IL_002e: ret } - .method public hidebysig specialname instance int32 get_X() cil managed + .method assembly hidebysig instance int32 f(int32 a) cil managed { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld int32 assembly/D::x - IL_0006: ret + IL_0006: ldarg.1 + IL_0007: add + IL_0008: ret } - .method public hidebysig specialname instance int32 get_Y() cil managed + .method public hidebysig specialname instance int32 get_X() cil managed { .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/D::y + IL_0001: ldfld int32 assembly/D::x IL_0006: ret } - .method assembly hidebysig instance int32 f(int32 a) cil managed + .method public hidebysig specialname instance int32 get_Y() cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/D::x - IL_0006: ldarg.1 - IL_0007: add - IL_0008: ret + IL_0001: ldfld int32 assembly/D::y + IL_0006: ret } .property instance int32 X() @@ -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..b999703f6bf 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 @@ -75,34 +75,34 @@ IL_002e: ret } - .method public hidebysig specialname instance int32 get_X() cil managed + .method assembly hidebysig instance int32 f(int32 a) cil managed { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld int32 assembly/D::x - IL_0006: ret + IL_0006: ldarg.1 + IL_0007: add + IL_0008: ret } - .method public hidebysig specialname instance int32 get_Y() cil managed + .method public hidebysig specialname instance int32 get_X() cil managed { .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/D::y + IL_0001: ldfld int32 assembly/D::x IL_0006: ret } - .method assembly hidebysig instance int32 f(int32 a) cil managed + .method public hidebysig specialname instance int32 get_Y() cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/D::x - IL_0006: ldarg.1 - IL_0007: add - IL_0008: ret + IL_0001: ldfld int32 assembly/D::y + IL_0006: ret } .property instance int32 X() @@ -244,4 +244,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.net472.bsl index 158b2324c98..7a0ab35faa8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.net472.bsl @@ -42,7 +42,7 @@ [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 ) + 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 ) .field assembly initonly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -52,26 +52,11 @@ .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 public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/U::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 - 69 6F 6E 32 31 2B 55 00 00 ) + .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 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 31 2B 55 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 ) @@ -87,67 +72,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/U::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/U::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -338,74 +262,6 @@ IL_0073: 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 7 - .locals init (int32 V_0, - class assembly/U V_1, - class [runtime]System.Collections.IEqualityComparer V_2, - class [runtime]System.Collections.IEqualityComparer V_3) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_003b - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 assembly/U::item2 - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldc.i4 0x9e3779b9 - IL_0027: ldarg.1 - IL_0028: stloc.3 - IL_0029: ldloc.1 - IL_002a: ldfld int32 assembly/U::item1 - IL_002f: ldloc.0 - IL_0030: ldc.i4.6 - IL_0031: shl - IL_0032: ldloc.0 - IL_0033: ldc.i4.2 - IL_0034: shr - IL_0035: add - IL_0036: add - IL_0037: add - IL_0038: stloc.0 - IL_0039: ldloc.0 - IL_003a: ret - - IL_003b: ldc.i4.0 - IL_003c: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -552,6 +408,150 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/U V_1, + class [runtime]System.Collections.IEqualityComparer V_2, + class [runtime]System.Collections.IEqualityComparer V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003b + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item2 + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldc.i4 0x9e3779b9 + IL_0027: ldarg.1 + IL_0028: stloc.3 + IL_0029: ldloc.1 + IL_002a: ldfld int32 assembly/U::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl + IL_0032: ldloc.0 + IL_0033: ldc.i4.2 + IL_0034: shr + IL_0035: add + IL_0036: add + IL_0037: add + IL_0038: stloc.0 + IL_0039: ldloc.0 + IL_003a: ret + + IL_003b: ldc.i4.0 + IL_003c: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: 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/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/U::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -698,97 +698,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..7a0ab35faa8 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 @@ -52,21 +52,6 @@ .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 public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/U::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -87,67 +72,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/U::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/U::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -338,74 +262,6 @@ IL_0073: 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 7 - .locals init (int32 V_0, - class assembly/U V_1, - class [runtime]System.Collections.IEqualityComparer V_2, - class [runtime]System.Collections.IEqualityComparer V_3) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_003b - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldarg.1 - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: ldfld int32 assembly/U::item2 - IL_0018: ldloc.0 - IL_0019: ldc.i4.6 - IL_001a: shl - IL_001b: ldloc.0 - IL_001c: ldc.i4.2 - IL_001d: shr - IL_001e: add - IL_001f: add - IL_0020: add - IL_0021: stloc.0 - IL_0022: ldc.i4 0x9e3779b9 - IL_0027: ldarg.1 - IL_0028: stloc.3 - IL_0029: ldloc.1 - IL_002a: ldfld int32 assembly/U::item1 - IL_002f: ldloc.0 - IL_0030: ldc.i4.6 - IL_0031: shl - IL_0032: ldloc.0 - IL_0033: ldc.i4.2 - IL_0034: shr - IL_0035: add - IL_0036: add - IL_0037: add - IL_0038: stloc.0 - IL_0039: ldloc.0 - IL_003a: ret - - IL_003b: ldc.i4.0 - IL_003c: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -552,6 +408,150 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/U V_1, + class [runtime]System.Collections.IEqualityComparer V_2, + class [runtime]System.Collections.IEqualityComparer V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003b + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 assembly/U::item2 + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl + IL_001b: ldloc.0 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldc.i4 0x9e3779b9 + IL_0027: ldarg.1 + IL_0028: stloc.3 + IL_0029: ldloc.1 + IL_002a: ldfld int32 assembly/U::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl + IL_0032: ldloc.0 + IL_0033: ldc.i4.2 + IL_0034: shr + IL_0035: add + IL_0036: add + IL_0037: add + IL_0038: stloc.0 + IL_0039: ldloc.0 + IL_003a: ret + + IL_003b: ldc.i4.0 + IL_003c: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: 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/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/U::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -702,4 +702,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.net472.bsl index bc06902d8e3..defc927b6a2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.net472.bsl @@ -8,7 +8,7 @@ .assembly extern netstandard { .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) - .ver 2:1:0:0 + .ver 2:0:0:0 } .assembly assembly { @@ -47,7 +47,7 @@ [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 ) + 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 ) .field assembly initonly int32 item1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -57,26 +57,11 @@ .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 public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/U::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 - 69 6F 6E 32 31 2B 55 00 00 ) + .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 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 31 2B 55 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 ) @@ -92,67 +77,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/U::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/U::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -332,68 +256,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/U V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/U::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/U::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -530,6 +392,144 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/U::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/U::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: 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/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/U::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -678,97 +678,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..f1c64fafc7e 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 @@ -57,21 +57,6 @@ .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 public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void assembly/U::.ctor(int32, - int32) - IL_0007: ret - } - .method assembly specialname rtspecialname instance void .ctor(int32 item1, int32 item2) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -92,67 +77,6 @@ IL_0014: ret } - .method public hidebysig instance int32 get_Item1() 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/U::item1 - IL_0006: ret - } - - .method public hidebysig instance int32 get_Item2() 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/U::item2 - IL_0006: 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: pop - IL_0002: ldc.i4.0 - IL_0003: 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) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/U obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -332,68 +256,6 @@ IL_006d: 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 7 - .locals init (int32 V_0, - class assembly/U V_1) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0037 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: pop - IL_0007: ldarg.0 - IL_0008: stloc.1 - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldc.i4 0x9e3779b9 - IL_0010: ldloc.1 - IL_0011: ldfld int32 assembly/U::item2 - IL_0016: ldloc.0 - IL_0017: ldc.i4.6 - IL_0018: shl - IL_0019: ldloc.0 - IL_001a: ldc.i4.2 - IL_001b: shr - IL_001c: add - IL_001d: add - IL_001e: add - IL_001f: stloc.0 - IL_0020: ldc.i4 0x9e3779b9 - IL_0025: ldloc.1 - IL_0026: ldfld int32 assembly/U::item1 - IL_002b: ldloc.0 - IL_002c: ldc.i4.6 - IL_002d: shl - IL_002e: ldloc.0 - IL_002f: ldc.i4.2 - IL_0030: shr - IL_0031: add - IL_0032: add - IL_0033: add - IL_0034: stloc.0 - IL_0035: ldloc.0 - IL_0036: ret - - IL_0037: ldc.i4.0 - IL_0038: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/U obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -530,6 +392,144 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class assembly/U V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0037 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 assembly/U::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 assembly/U::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl + IL_002e: ldloc.0 + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldc.i4.0 + IL_0038: 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/U::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public static class assembly/U NewU(int32 item1, int32 item2) 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 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: ldarg.0 + IL_0001: ldarg.1 + IL_0002: newobj instance void assembly/U::.ctor(int32, + int32) + IL_0007: 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/U>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: 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) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 instance int32 get_Item1() 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/U::item1 + IL_0006: ret + } + + .method public hidebysig instance int32 get_Item2() 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/U::item2 + IL_0006: 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: pop + IL_0002: ldc.i4.0 + IL_0003: ret + } + .property instance int32 Tag() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -682,4 +682,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.net472.bsl index b2910df4262..bbdba156a09 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -43,6 +44,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 +79,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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.net472.bsl index b2910df4262..bbdba156a09 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -43,6 +44,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 +79,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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.net472.bsl index b2910df4262..bbdba156a09 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -43,6 +44,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 +79,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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.net472.bsl index b2910df4262..bbdba156a09 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -43,6 +44,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 +79,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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.net472.bsl index f8c01645b6c..7243980df48 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -43,6 +44,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 @@ -72,4 +84,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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl index 464ddb746fa..3c21f2552e1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl @@ -10,6 +10,7 @@ .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) .ver 2:0:0:0 } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -48,6 +49,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 @@ -86,4 +98,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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl index 74cb3fb32ef..6694beaaded 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl @@ -8,8 +8,9 @@ .assembly extern netstandard { .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) - .ver 2:1:0:0 + .ver 2:0:0:0 } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -38,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 @@ -74,4 +86,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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl index b5d6157072c..778286772f0 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -43,6 +44,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 @@ -76,4 +88,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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl index 24ef383498f..35dfc6ff4f2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -33,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 +70,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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl index 879f6b4e90f..58c95d08f1b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -68,7 +69,7 @@ IL_0008: ldarg.0 IL_0009: callvirt instance string assembly/C::g() IL_000e: call string [runtime]System.String::Concat(string, - string) + string) IL_0013: ret } @@ -88,6 +89,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/g@13 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/g@13::.ctor() + IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -114,15 +124,6 @@ IL_0021: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/g@13::.ctor() - IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance - IL_000a: ret - } - } .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed @@ -139,7 +140,7 @@ IL_000e: ldnull IL_000f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0014: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_0019: ret } @@ -162,4 +163,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..58c95d08f1b 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 @@ -89,6 +89,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/g@13 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/g@13::.ctor() + IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -115,15 +124,6 @@ IL_0021: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/g@13::.ctor() - IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance - IL_000a: ret - } - } .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed @@ -163,4 +163,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl index 879f6b4e90f..58c95d08f1b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl @@ -5,6 +5,7 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -68,7 +69,7 @@ IL_0008: ldarg.0 IL_0009: callvirt instance string assembly/C::g() IL_000e: call string [runtime]System.String::Concat(string, - string) + string) IL_0013: ret } @@ -88,6 +89,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/g@13 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/g@13::.ctor() + IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -114,15 +124,6 @@ IL_0021: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/g@13::.ctor() - IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance - IL_000a: ret - } - } .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed @@ -139,7 +140,7 @@ IL_000e: ldnull IL_000f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0014: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_0019: ret } @@ -162,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..58c95d08f1b 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 @@ -89,6 +89,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/g@13 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/g@13::.ctor() + IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -115,15 +124,6 @@ IL_0021: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/g@13::.ctor() - IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance - IL_000a: ret - } - } .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed @@ -163,4 +163,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl index f4f126bbc5b..20712485e65 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl @@ -5,10 +5,11 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } +.assembly extern runtime { } .assembly extern netstandard { .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) - .ver 2:1:0:0 + .ver 2:0:0:0 } .assembly assembly { @@ -70,7 +71,7 @@ IL_0006: ldarg.0 IL_0007: callvirt instance string assembly/C::g() IL_000c: call string [runtime]System.String::Concat(string, - string) + string) IL_0011: ret } @@ -90,6 +91,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/g@13 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/g@13::.ctor() + IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -125,15 +135,6 @@ IL_002f: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/g@13::.ctor() - IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance - IL_000a: ret - } - } .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed @@ -150,7 +151,7 @@ IL_000e: ldnull IL_000f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0014: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_0019: ret } @@ -173,4 +174,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..daae0e57499 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 @@ -91,6 +91,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/g@13 @_instance + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/g@13::.ctor() + IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -126,15 +135,6 @@ IL_002f: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/g@13::.ctor() - IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance - IL_000a: ret - } - } .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed @@ -174,4 +174,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl index 01a58c52c7d..485e4611b10 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl @@ -48,57 +48,11 @@ .field public int32 y@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::x@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ - IL_0006: ret - } - - .method public hidebysig specialname instance void set_x(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::x@ - IL_0007: ret - } - - .method public hidebysig specialname instance void set_y(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::y@ - IL_0007: ret - } - .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 - 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + .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 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -112,19 +66,6 @@ IL_0014: 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/Point>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Point obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -302,67 +243,6 @@ IL_006e: 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0035 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/Point::y@ - IL_0012: ldloc.0 - IL_0013: ldc.i4.6 - IL_0014: shl - IL_0015: ldloc.0 - IL_0016: ldc.i4.2 - IL_0017: shr - IL_0018: add - IL_0019: add - IL_001a: add - IL_001b: stloc.0 - IL_001c: ldc.i4 0x9e3779b9 - IL_0021: ldarg.1 - IL_0022: stloc.2 - IL_0023: ldarg.0 - IL_0024: ldfld int32 assembly/Point::x@ - IL_0029: ldloc.0 - IL_002a: ldc.i4.6 - IL_002b: shl - IL_002c: ldloc.0 - IL_002d: ldc.i4.2 - IL_002e: shr - IL_002f: add - IL_0030: add - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ret - - IL_0035: ldc.i4.0 - IL_0036: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -493,6 +373,126 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl + IL_0015: ldloc.0 + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/Point::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Point>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + .property instance int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -509,78 +509,6 @@ } } - .method public static int32 pinObject() cil managed - { - - .maxstack 6 - .locals init (class assembly/Point V_0, - native int V_1, - int32& pinned V_2, - native int V_3, - int32 V_4, - native int V_5, - int32 V_6) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.2 - IL_0002: newobj instance void assembly/Point::.ctor(int32, - int32) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda int32 assembly/Point::x@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: stloc.3 - IL_0014: ldc.i4.0 - IL_0015: stloc.s V_4 - IL_0017: ldloc.3 - IL_0018: ldloc.s V_4 - IL_001a: conv.i - IL_001b: sizeof [runtime]System.Int32 - IL_0021: mul - IL_0022: add - IL_0023: ldobj [runtime]System.Int32 - IL_0028: ldloc.1 - IL_0029: stloc.s V_5 - IL_002b: ldc.i4.1 - IL_002c: stloc.s V_6 - IL_002e: ldloc.s V_5 - IL_0030: ldloc.s V_6 - IL_0032: conv.i - IL_0033: sizeof [runtime]System.Int32 - IL_0039: mul - IL_003a: add - IL_003b: ldobj [runtime]System.Int32 - IL_0040: add - IL_0041: ret - } - - .method public static int32 pinRef() cil managed - { - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - native int V_1, - int32& pinned V_2) - IL_0000: ldc.i4.s 17 - IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: ldobj [runtime]System.Int32 - IL_0018: ldloc.1 - IL_0019: ldobj [runtime]System.Int32 - IL_001e: add - IL_001f: ret - } - .method public static float64 pinArray1() cil managed { @@ -744,32 +672,104 @@ IL_0089: ret } + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: stloc.3 + IL_0014: ldc.i4.0 + IL_0015: stloc.s V_4 + IL_0017: ldloc.3 + IL_0018: ldloc.s V_4 + IL_001a: conv.i + IL_001b: sizeof [runtime]System.Int32 + IL_0021: mul + IL_0022: add + IL_0023: ldobj [runtime]System.Int32 + IL_0028: ldloc.1 + IL_0029: stloc.s V_5 + IL_002b: ldc.i4.1 + IL_002c: stloc.s V_6 + IL_002e: ldloc.s V_5 + IL_0030: ldloc.s V_6 + IL_0032: conv.i + IL_0033: sizeof [runtime]System.Int32 + IL_0039: mul + IL_003a: add + IL_003b: ldobj [runtime]System.Int32 + IL_0040: add + IL_0041: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + .method public static class [runtime]System.Tuple`2 pinString() cil managed { .maxstack 6 .locals init (string V_0, native int V_1, - string pinned V_2, + char& pinned V_2, native int V_3, int32 V_4, native int V_5, int32 V_6) IL_0000: ldstr "Hello World" IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: stloc.2 - IL_0008: ldloc.2 - IL_0009: brfalse.s IL_0016 - - IL_000b: ldloc.2 - IL_000c: conv.i - IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() - IL_0012: add + IL_0006: nop + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0016 + + IL_000a: ldloc.0 + IL_000b: callvirt instance char& modreq([runtime]System.Runtime.InteropServices.InAttribute) [runtime]System.String::GetPinnableReference() + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: conv.i IL_0013: nop IL_0014: br.s IL_0018 - IL_0016: ldloc.2 + IL_0016: ldloc.0 IL_0017: nop IL_0018: stloc.1 IL_0019: ldloc.1 @@ -795,7 +795,7 @@ IL_0041: add IL_0042: ldobj [runtime]System.Char IL_0047: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_004c: ret } @@ -814,97 +814,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..485e4611b10 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 @@ -48,52 +48,6 @@ .field public int32 y@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::x@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ - IL_0006: ret - } - - .method public hidebysig specialname instance void set_x(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::x@ - IL_0007: ret - } - - .method public hidebysig specialname instance void set_y(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::y@ - IL_0007: ret - } - .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -112,19 +66,6 @@ IL_0014: 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/Point>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Point obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -302,67 +243,6 @@ IL_006e: 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0035 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/Point::y@ - IL_0012: ldloc.0 - IL_0013: ldc.i4.6 - IL_0014: shl - IL_0015: ldloc.0 - IL_0016: ldc.i4.2 - IL_0017: shr - IL_0018: add - IL_0019: add - IL_001a: add - IL_001b: stloc.0 - IL_001c: ldc.i4 0x9e3779b9 - IL_0021: ldarg.1 - IL_0022: stloc.2 - IL_0023: ldarg.0 - IL_0024: ldfld int32 assembly/Point::x@ - IL_0029: ldloc.0 - IL_002a: ldc.i4.6 - IL_002b: shl - IL_002c: ldloc.0 - IL_002d: ldc.i4.2 - IL_002e: shr - IL_002f: add - IL_0030: add - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ret - - IL_0035: ldc.i4.0 - IL_0036: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -493,6 +373,126 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl + IL_0015: ldloc.0 + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/Point::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Point>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + .property instance int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -509,78 +509,6 @@ } } - .method public static int32 pinObject() cil managed - { - - .maxstack 6 - .locals init (class assembly/Point V_0, - native int V_1, - int32& pinned V_2, - native int V_3, - int32 V_4, - native int V_5, - int32 V_6) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.2 - IL_0002: newobj instance void assembly/Point::.ctor(int32, - int32) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda int32 assembly/Point::x@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: stloc.3 - IL_0014: ldc.i4.0 - IL_0015: stloc.s V_4 - IL_0017: ldloc.3 - IL_0018: ldloc.s V_4 - IL_001a: conv.i - IL_001b: sizeof [runtime]System.Int32 - IL_0021: mul - IL_0022: add - IL_0023: ldobj [runtime]System.Int32 - IL_0028: ldloc.1 - IL_0029: stloc.s V_5 - IL_002b: ldc.i4.1 - IL_002c: stloc.s V_6 - IL_002e: ldloc.s V_5 - IL_0030: ldloc.s V_6 - IL_0032: conv.i - IL_0033: sizeof [runtime]System.Int32 - IL_0039: mul - IL_003a: add - IL_003b: ldobj [runtime]System.Int32 - IL_0040: add - IL_0041: ret - } - - .method public static int32 pinRef() cil managed - { - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - native int V_1, - int32& pinned V_2) - IL_0000: ldc.i4.s 17 - IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: ldobj [runtime]System.Int32 - IL_0018: ldloc.1 - IL_0019: ldobj [runtime]System.Int32 - IL_001e: add - IL_001f: ret - } - .method public static float64 pinArray1() cil managed { @@ -744,6 +672,78 @@ IL_0089: ret } + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: stloc.3 + IL_0014: ldc.i4.0 + IL_0015: stloc.s V_4 + IL_0017: ldloc.3 + IL_0018: ldloc.s V_4 + IL_001a: conv.i + IL_001b: sizeof [runtime]System.Int32 + IL_0021: mul + IL_0022: add + IL_0023: ldobj [runtime]System.Int32 + IL_0028: ldloc.1 + IL_0029: stloc.s V_5 + IL_002b: ldc.i4.1 + IL_002c: stloc.s V_6 + IL_002e: ldloc.s V_5 + IL_0030: ldloc.s V_6 + IL_0032: conv.i + IL_0033: sizeof [runtime]System.Int32 + IL_0039: mul + IL_003a: add + IL_003b: ldobj [runtime]System.Int32 + IL_0040: add + IL_0041: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + .method public static class [runtime]System.Tuple`2 pinString() cil managed { @@ -818,4 +818,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl index a87cc818438..4f5faf9b9c4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.net472.bsl @@ -48,57 +48,11 @@ .field public int32 y@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::x@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ - IL_0006: ret - } - - .method public hidebysig specialname instance void set_x(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::x@ - IL_0007: ret - } - - .method public hidebysig specialname instance void set_y(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::y@ - IL_0007: ret - } - .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 - 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + .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 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -112,19 +66,6 @@ IL_0014: 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/Point>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Point obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -288,61 +229,6 @@ IL_005b: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/Point::y@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/Point::x@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -463,6 +349,120 @@ IL_0013: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/Point::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Point>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + .property instance int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -479,66 +479,6 @@ } } - .method public static int32 pinObject() cil managed - { - - .maxstack 6 - .locals init (class assembly/Point V_0, - native int V_1, - int32& pinned V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.2 - IL_0002: newobj instance void assembly/Point::.ctor(int32, - int32) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda int32 assembly/Point::x@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: ldc.i4.0 - IL_0014: conv.i - IL_0015: sizeof [runtime]System.Int32 - IL_001b: mul - IL_001c: add - IL_001d: ldobj [runtime]System.Int32 - IL_0022: ldloc.1 - IL_0023: ldc.i4.1 - IL_0024: conv.i - IL_0025: sizeof [runtime]System.Int32 - IL_002b: mul - IL_002c: add - IL_002d: ldobj [runtime]System.Int32 - IL_0032: add - IL_0033: ret - } - - .method public static int32 pinRef() cil managed - { - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - native int V_1, - int32& pinned V_2) - IL_0000: ldc.i4.s 17 - IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: ldobj [runtime]System.Int32 - IL_0018: ldloc.1 - IL_0019: ldobj [runtime]System.Int32 - IL_001e: add - IL_001f: ret - } - .method public static float64 pinArray1() cil managed { @@ -676,37 +616,96 @@ IL_007b: ret } + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldc.i4.0 + IL_0014: conv.i + IL_0015: sizeof [runtime]System.Int32 + IL_001b: mul + IL_001c: add + IL_001d: ldobj [runtime]System.Int32 + IL_0022: ldloc.1 + IL_0023: ldc.i4.1 + IL_0024: conv.i + IL_0025: sizeof [runtime]System.Int32 + IL_002b: mul + IL_002c: add + IL_002d: ldobj [runtime]System.Int32 + IL_0032: add + IL_0033: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + .method public static class [runtime]System.Tuple`2 pinString() cil managed { .maxstack 6 .locals init (native int V_0, - string pinned V_1) + char& pinned V_1) IL_0000: nop IL_0001: ldstr "Hello World" - IL_0006: stloc.1 - IL_0007: ldstr "Hello World" - IL_000c: conv.i - IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() - IL_0012: add - IL_0013: stloc.0 - IL_0014: ldloc.0 - IL_0015: ldc.i4.0 - IL_0016: conv.i - IL_0017: sizeof [runtime]System.Char - IL_001d: mul - IL_001e: add - IL_001f: ldobj [runtime]System.Char - IL_0024: ldloc.0 - IL_0025: ldc.i4.1 - IL_0026: conv.i - IL_0027: sizeof [runtime]System.Char - IL_002d: mul - IL_002e: add - IL_002f: ldobj [runtime]System.Char - IL_0034: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_0039: ret + IL_0006: callvirt instance char& modreq([runtime]System.Runtime.InteropServices.InAttribute) [runtime]System.String::GetPinnableReference() + IL_000b: stloc.1 + IL_000c: ldloc.1 + IL_000d: conv.i + IL_000e: stloc.0 + IL_000f: ldloc.0 + IL_0010: ldc.i4.0 + IL_0011: conv.i + IL_0012: sizeof [runtime]System.Char + IL_0018: mul + IL_0019: add + IL_001a: ldobj [runtime]System.Char + IL_001f: ldloc.0 + IL_0020: ldc.i4.1 + IL_0021: conv.i + IL_0022: sizeof [runtime]System.Char + IL_0028: mul + IL_0029: add + IL_002a: ldobj [runtime]System.Char + IL_002f: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0034: ret } } @@ -724,97 +723,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..4f5faf9b9c4 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 @@ -48,52 +48,6 @@ .field public int32 y@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::x@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ - IL_0006: ret - } - - .method public hidebysig specialname instance void set_x(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::x@ - IL_0007: ret - } - - .method public hidebysig specialname instance void set_y(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::y@ - IL_0007: ret - } - .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -112,19 +66,6 @@ IL_0014: 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/Point>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Point obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -288,61 +229,6 @@ IL_005b: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/Point::y@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/Point::x@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -463,6 +349,120 @@ IL_0013: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/Point::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Point>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + .property instance int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -479,66 +479,6 @@ } } - .method public static int32 pinObject() cil managed - { - - .maxstack 6 - .locals init (class assembly/Point V_0, - native int V_1, - int32& pinned V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.2 - IL_0002: newobj instance void assembly/Point::.ctor(int32, - int32) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda int32 assembly/Point::x@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: ldc.i4.0 - IL_0014: conv.i - IL_0015: sizeof [runtime]System.Int32 - IL_001b: mul - IL_001c: add - IL_001d: ldobj [runtime]System.Int32 - IL_0022: ldloc.1 - IL_0023: ldc.i4.1 - IL_0024: conv.i - IL_0025: sizeof [runtime]System.Int32 - IL_002b: mul - IL_002c: add - IL_002d: ldobj [runtime]System.Int32 - IL_0032: add - IL_0033: ret - } - - .method public static int32 pinRef() cil managed - { - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - native int V_1, - int32& pinned V_2) - IL_0000: ldc.i4.s 17 - IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: ldobj [runtime]System.Int32 - IL_0018: ldloc.1 - IL_0019: ldobj [runtime]System.Int32 - IL_001e: add - IL_001f: ret - } - .method public static float64 pinArray1() cil managed { @@ -676,6 +616,66 @@ IL_007b: ret } + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldc.i4.0 + IL_0014: conv.i + IL_0015: sizeof [runtime]System.Int32 + IL_001b: mul + IL_001c: add + IL_001d: ldobj [runtime]System.Int32 + IL_0022: ldloc.1 + IL_0023: ldc.i4.1 + IL_0024: conv.i + IL_0025: sizeof [runtime]System.Int32 + IL_002b: mul + IL_002c: add + IL_002d: ldobj [runtime]System.Int32 + IL_0032: add + IL_0033: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + .method public static class [runtime]System.Tuple`2 pinString() cil managed { @@ -727,4 +727,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl index 01a58c52c7d..485e4611b10 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl @@ -48,57 +48,11 @@ .field public int32 y@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::x@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ - IL_0006: ret - } - - .method public hidebysig specialname instance void set_x(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::x@ - IL_0007: ret - } - - .method public hidebysig specialname instance void set_y(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::y@ - IL_0007: ret - } - .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 - 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + .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 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -112,19 +66,6 @@ IL_0014: 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/Point>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Point obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -302,67 +243,6 @@ IL_006e: 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0035 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/Point::y@ - IL_0012: ldloc.0 - IL_0013: ldc.i4.6 - IL_0014: shl - IL_0015: ldloc.0 - IL_0016: ldc.i4.2 - IL_0017: shr - IL_0018: add - IL_0019: add - IL_001a: add - IL_001b: stloc.0 - IL_001c: ldc.i4 0x9e3779b9 - IL_0021: ldarg.1 - IL_0022: stloc.2 - IL_0023: ldarg.0 - IL_0024: ldfld int32 assembly/Point::x@ - IL_0029: ldloc.0 - IL_002a: ldc.i4.6 - IL_002b: shl - IL_002c: ldloc.0 - IL_002d: ldc.i4.2 - IL_002e: shr - IL_002f: add - IL_0030: add - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ret - - IL_0035: ldc.i4.0 - IL_0036: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -493,6 +373,126 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl + IL_0015: ldloc.0 + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/Point::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Point>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + .property instance int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -509,78 +509,6 @@ } } - .method public static int32 pinObject() cil managed - { - - .maxstack 6 - .locals init (class assembly/Point V_0, - native int V_1, - int32& pinned V_2, - native int V_3, - int32 V_4, - native int V_5, - int32 V_6) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.2 - IL_0002: newobj instance void assembly/Point::.ctor(int32, - int32) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda int32 assembly/Point::x@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: stloc.3 - IL_0014: ldc.i4.0 - IL_0015: stloc.s V_4 - IL_0017: ldloc.3 - IL_0018: ldloc.s V_4 - IL_001a: conv.i - IL_001b: sizeof [runtime]System.Int32 - IL_0021: mul - IL_0022: add - IL_0023: ldobj [runtime]System.Int32 - IL_0028: ldloc.1 - IL_0029: stloc.s V_5 - IL_002b: ldc.i4.1 - IL_002c: stloc.s V_6 - IL_002e: ldloc.s V_5 - IL_0030: ldloc.s V_6 - IL_0032: conv.i - IL_0033: sizeof [runtime]System.Int32 - IL_0039: mul - IL_003a: add - IL_003b: ldobj [runtime]System.Int32 - IL_0040: add - IL_0041: ret - } - - .method public static int32 pinRef() cil managed - { - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - native int V_1, - int32& pinned V_2) - IL_0000: ldc.i4.s 17 - IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: ldobj [runtime]System.Int32 - IL_0018: ldloc.1 - IL_0019: ldobj [runtime]System.Int32 - IL_001e: add - IL_001f: ret - } - .method public static float64 pinArray1() cil managed { @@ -744,32 +672,104 @@ IL_0089: ret } + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: stloc.3 + IL_0014: ldc.i4.0 + IL_0015: stloc.s V_4 + IL_0017: ldloc.3 + IL_0018: ldloc.s V_4 + IL_001a: conv.i + IL_001b: sizeof [runtime]System.Int32 + IL_0021: mul + IL_0022: add + IL_0023: ldobj [runtime]System.Int32 + IL_0028: ldloc.1 + IL_0029: stloc.s V_5 + IL_002b: ldc.i4.1 + IL_002c: stloc.s V_6 + IL_002e: ldloc.s V_5 + IL_0030: ldloc.s V_6 + IL_0032: conv.i + IL_0033: sizeof [runtime]System.Int32 + IL_0039: mul + IL_003a: add + IL_003b: ldobj [runtime]System.Int32 + IL_0040: add + IL_0041: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + .method public static class [runtime]System.Tuple`2 pinString() cil managed { .maxstack 6 .locals init (string V_0, native int V_1, - string pinned V_2, + char& pinned V_2, native int V_3, int32 V_4, native int V_5, int32 V_6) IL_0000: ldstr "Hello World" IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: stloc.2 - IL_0008: ldloc.2 - IL_0009: brfalse.s IL_0016 - - IL_000b: ldloc.2 - IL_000c: conv.i - IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() - IL_0012: add + IL_0006: nop + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0016 + + IL_000a: ldloc.0 + IL_000b: callvirt instance char& modreq([runtime]System.Runtime.InteropServices.InAttribute) [runtime]System.String::GetPinnableReference() + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: conv.i IL_0013: nop IL_0014: br.s IL_0018 - IL_0016: ldloc.2 + IL_0016: ldloc.0 IL_0017: nop IL_0018: stloc.1 IL_0019: ldloc.1 @@ -795,7 +795,7 @@ IL_0041: add IL_0042: ldobj [runtime]System.Char IL_0047: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_004c: ret } @@ -814,97 +814,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..485e4611b10 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 @@ -48,52 +48,6 @@ .field public int32 y@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::x@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ - IL_0006: ret - } - - .method public hidebysig specialname instance void set_x(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::x@ - IL_0007: ret - } - - .method public hidebysig specialname instance void set_y(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::y@ - IL_0007: ret - } - .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -112,19 +66,6 @@ IL_0014: 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/Point>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Point obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -302,67 +243,6 @@ IL_006e: 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 7 - .locals init (int32 V_0, - class [runtime]System.Collections.IEqualityComparer V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0035 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/Point::y@ - IL_0012: ldloc.0 - IL_0013: ldc.i4.6 - IL_0014: shl - IL_0015: ldloc.0 - IL_0016: ldc.i4.2 - IL_0017: shr - IL_0018: add - IL_0019: add - IL_001a: add - IL_001b: stloc.0 - IL_001c: ldc.i4 0x9e3779b9 - IL_0021: ldarg.1 - IL_0022: stloc.2 - IL_0023: ldarg.0 - IL_0024: ldfld int32 assembly/Point::x@ - IL_0029: ldloc.0 - IL_002a: ldc.i4.6 - IL_002b: shl - IL_002c: ldloc.0 - IL_002d: ldc.i4.2 - IL_002e: shr - IL_002f: add - IL_0030: add - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ret - - IL_0035: ldc.i4.0 - IL_0036: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -493,6 +373,126 @@ IL_0013: 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 7 + .locals init (int32 V_0, + class [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl + IL_0015: ldloc.0 + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/Point::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Point>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + .property instance int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -509,78 +509,6 @@ } } - .method public static int32 pinObject() cil managed - { - - .maxstack 6 - .locals init (class assembly/Point V_0, - native int V_1, - int32& pinned V_2, - native int V_3, - int32 V_4, - native int V_5, - int32 V_6) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.2 - IL_0002: newobj instance void assembly/Point::.ctor(int32, - int32) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda int32 assembly/Point::x@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: stloc.3 - IL_0014: ldc.i4.0 - IL_0015: stloc.s V_4 - IL_0017: ldloc.3 - IL_0018: ldloc.s V_4 - IL_001a: conv.i - IL_001b: sizeof [runtime]System.Int32 - IL_0021: mul - IL_0022: add - IL_0023: ldobj [runtime]System.Int32 - IL_0028: ldloc.1 - IL_0029: stloc.s V_5 - IL_002b: ldc.i4.1 - IL_002c: stloc.s V_6 - IL_002e: ldloc.s V_5 - IL_0030: ldloc.s V_6 - IL_0032: conv.i - IL_0033: sizeof [runtime]System.Int32 - IL_0039: mul - IL_003a: add - IL_003b: ldobj [runtime]System.Int32 - IL_0040: add - IL_0041: ret - } - - .method public static int32 pinRef() cil managed - { - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - native int V_1, - int32& pinned V_2) - IL_0000: ldc.i4.s 17 - IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: ldobj [runtime]System.Int32 - IL_0018: ldloc.1 - IL_0019: ldobj [runtime]System.Int32 - IL_001e: add - IL_001f: ret - } - .method public static float64 pinArray1() cil managed { @@ -744,6 +672,78 @@ IL_0089: ret } + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: stloc.3 + IL_0014: ldc.i4.0 + IL_0015: stloc.s V_4 + IL_0017: ldloc.3 + IL_0018: ldloc.s V_4 + IL_001a: conv.i + IL_001b: sizeof [runtime]System.Int32 + IL_0021: mul + IL_0022: add + IL_0023: ldobj [runtime]System.Int32 + IL_0028: ldloc.1 + IL_0029: stloc.s V_5 + IL_002b: ldc.i4.1 + IL_002c: stloc.s V_6 + IL_002e: ldloc.s V_5 + IL_0030: ldloc.s V_6 + IL_0032: conv.i + IL_0033: sizeof [runtime]System.Int32 + IL_0039: mul + IL_003a: add + IL_003b: ldobj [runtime]System.Int32 + IL_0040: add + IL_0041: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + .method public static class [runtime]System.Tuple`2 pinString() cil managed { @@ -818,4 +818,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl index a87cc818438..4f5faf9b9c4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl @@ -48,57 +48,11 @@ .field public int32 y@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::x@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ - IL_0006: ret - } - - .method public hidebysig specialname instance void set_x(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::x@ - IL_0007: ret - } - - .method public hidebysig specialname instance void set_y(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::y@ - IL_0007: ret - } - .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 - 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) + .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 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) .maxstack 8 IL_0000: ldarg.0 @@ -112,19 +66,6 @@ IL_0014: 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/Point>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Point obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -288,61 +229,6 @@ IL_005b: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/Point::y@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/Point::x@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -463,6 +349,120 @@ IL_0013: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/Point::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Point>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + .property instance int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -479,66 +479,6 @@ } } - .method public static int32 pinObject() cil managed - { - - .maxstack 6 - .locals init (class assembly/Point V_0, - native int V_1, - int32& pinned V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.2 - IL_0002: newobj instance void assembly/Point::.ctor(int32, - int32) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda int32 assembly/Point::x@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: ldc.i4.0 - IL_0014: conv.i - IL_0015: sizeof [runtime]System.Int32 - IL_001b: mul - IL_001c: add - IL_001d: ldobj [runtime]System.Int32 - IL_0022: ldloc.1 - IL_0023: ldc.i4.1 - IL_0024: conv.i - IL_0025: sizeof [runtime]System.Int32 - IL_002b: mul - IL_002c: add - IL_002d: ldobj [runtime]System.Int32 - IL_0032: add - IL_0033: ret - } - - .method public static int32 pinRef() cil managed - { - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - native int V_1, - int32& pinned V_2) - IL_0000: ldc.i4.s 17 - IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: ldobj [runtime]System.Int32 - IL_0018: ldloc.1 - IL_0019: ldobj [runtime]System.Int32 - IL_001e: add - IL_001f: ret - } - .method public static float64 pinArray1() cil managed { @@ -676,37 +616,96 @@ IL_007b: ret } + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldc.i4.0 + IL_0014: conv.i + IL_0015: sizeof [runtime]System.Int32 + IL_001b: mul + IL_001c: add + IL_001d: ldobj [runtime]System.Int32 + IL_0022: ldloc.1 + IL_0023: ldc.i4.1 + IL_0024: conv.i + IL_0025: sizeof [runtime]System.Int32 + IL_002b: mul + IL_002c: add + IL_002d: ldobj [runtime]System.Int32 + IL_0032: add + IL_0033: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + .method public static class [runtime]System.Tuple`2 pinString() cil managed { .maxstack 6 .locals init (native int V_0, - string pinned V_1) + char& pinned V_1) IL_0000: nop IL_0001: ldstr "Hello World" - IL_0006: stloc.1 - IL_0007: ldstr "Hello World" - IL_000c: conv.i - IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() - IL_0012: add - IL_0013: stloc.0 - IL_0014: ldloc.0 - IL_0015: ldc.i4.0 - IL_0016: conv.i - IL_0017: sizeof [runtime]System.Char - IL_001d: mul - IL_001e: add - IL_001f: ldobj [runtime]System.Char - IL_0024: ldloc.0 - IL_0025: ldc.i4.1 - IL_0026: conv.i - IL_0027: sizeof [runtime]System.Char - IL_002d: mul - IL_002e: add - IL_002f: ldobj [runtime]System.Char - IL_0034: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_0039: ret + IL_0006: callvirt instance char& modreq([runtime]System.Runtime.InteropServices.InAttribute) [runtime]System.String::GetPinnableReference() + IL_000b: stloc.1 + IL_000c: ldloc.1 + IL_000d: conv.i + IL_000e: stloc.0 + IL_000f: ldloc.0 + IL_0010: ldc.i4.0 + IL_0011: conv.i + IL_0012: sizeof [runtime]System.Char + IL_0018: mul + IL_0019: add + IL_001a: ldobj [runtime]System.Char + IL_001f: ldloc.0 + IL_0020: ldc.i4.1 + IL_0021: conv.i + IL_0022: sizeof [runtime]System.Char + IL_0028: mul + IL_0029: add + IL_002a: ldobj [runtime]System.Char + IL_002f: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0034: ret } } @@ -724,97 +723,6 @@ } -.class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 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 specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) -} - -.class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .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 private class [runtime]System.Type Type@ - .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 public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) 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 [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() 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 class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() 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 valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .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 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .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 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } -} - - 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..4f5faf9b9c4 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 @@ -48,52 +48,6 @@ .field public int32 y@ .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::x@ - IL_0006: ret - } - - .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ - IL_0006: ret - } - - .method public hidebysig specialname instance void set_x(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::x@ - IL_0007: ret - } - - .method public hidebysig specialname instance void set_y(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: ldarg.1 - IL_0002: stfld int32 assembly/Point::y@ - IL_0007: ret - } - .method public specialname rtspecialname instance void .ctor(int32 x, int32 y) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, @@ -112,19 +66,6 @@ IL_0014: 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/Point>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - 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/Point obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -288,61 +229,6 @@ IL_005b: 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 7 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/Point::y@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/Point::x@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - .method public hidebysig instance bool Equals(class assembly/Point obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -463,6 +349,120 @@ IL_0013: 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 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/Point::y@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/Point::x@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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/Point>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + 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 specialname instance int32 get_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: ldfld int32 assembly/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_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: ldfld int32 assembly/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname instance void set_x(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname instance void set_y(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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + .property instance int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, @@ -479,66 +479,6 @@ } } - .method public static int32 pinObject() cil managed - { - - .maxstack 6 - .locals init (class assembly/Point V_0, - native int V_1, - int32& pinned V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.2 - IL_0002: newobj instance void assembly/Point::.ctor(int32, - int32) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda int32 assembly/Point::x@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: ldc.i4.0 - IL_0014: conv.i - IL_0015: sizeof [runtime]System.Int32 - IL_001b: mul - IL_001c: add - IL_001d: ldobj [runtime]System.Int32 - IL_0022: ldloc.1 - IL_0023: ldc.i4.1 - IL_0024: conv.i - IL_0025: sizeof [runtime]System.Int32 - IL_002b: mul - IL_002c: add - IL_002d: ldobj [runtime]System.Int32 - IL_0032: add - IL_0033: ret - } - - .method public static int32 pinRef() cil managed - { - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - native int V_1, - int32& pinned V_2) - IL_0000: ldc.i4.s 17 - IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: ldobj [runtime]System.Int32 - IL_0018: ldloc.1 - IL_0019: ldobj [runtime]System.Int32 - IL_001e: add - IL_001f: ret - } - .method public static float64 pinArray1() cil managed { @@ -676,6 +616,66 @@ IL_007b: ret } + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldc.i4.0 + IL_0014: conv.i + IL_0015: sizeof [runtime]System.Int32 + IL_001b: mul + IL_001c: add + IL_001d: ldobj [runtime]System.Int32 + IL_0022: ldloc.1 + IL_0023: ldc.i4.1 + IL_0024: conv.i + IL_0025: sizeof [runtime]System.Int32 + IL_002b: mul + IL_002c: add + IL_002d: ldobj [runtime]System.Int32 + IL_0032: add + IL_0033: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + .method public static class [runtime]System.Tuple`2 pinString() cil managed { @@ -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..2448794abf3 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,12 +163,85 @@ } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed + .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 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 + } + + .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 + } + + } + + .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 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 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 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 - 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 public static bool condition(int32 n) cil managed @@ -251,14 +254,14 @@ IL_0004: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) IL_0000: ldarg.0 - IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: ldarg.1 @@ -267,14 +270,14 @@ IL_0010: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) IL_0000: ldarg.0 - IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: ldarg.1 @@ -283,19 +286,27 @@ IL_0010: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() 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.Collections.FSharpList`1 ''.$assembly::matchResult@38 + 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 public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_0005: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 IL_0005: ret } @@ -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..d8c89d0fd8a 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 @@ -42,6 +42,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/matchResult@38 @_instance + .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 + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -63,21 +72,21 @@ IL_0004: 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 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_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 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 ) @@ -99,23 +108,17 @@ IL_0004: 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 + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 - 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 public static bool condition(int32 n) cil managed @@ -128,7 +131,7 @@ IL_0004: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -138,12 +141,12 @@ IL_0001: stloc.0 IL_0002: ldarg.0 IL_0003: ldarg.1 - IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0009: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -153,41 +156,76 @@ IL_0001: stloc.0 IL_0002: ldarg.0 IL_0003: ldarg.1 - IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0009: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() 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.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 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_list() 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::list@3 IL_0005: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 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-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..2448794abf3 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,12 +163,85 @@ } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed + .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 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 + } + + .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 + } + + } + + .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 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 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 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 - 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 public static bool condition(int32 n) cil managed @@ -251,14 +254,14 @@ IL_0004: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) IL_0000: ldarg.0 - IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: ldarg.1 @@ -267,14 +270,14 @@ IL_0010: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) IL_0000: ldarg.0 - IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: ldarg.1 @@ -283,19 +286,27 @@ IL_0010: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() 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.Collections.FSharpList`1 ''.$assembly::matchResult@38 + 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 public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_0005: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 IL_0005: ret } @@ -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..d8c89d0fd8a 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 @@ -42,6 +42,15 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field static assembly initonly class assembly/matchResult@38 @_instance + .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 + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -63,21 +72,21 @@ IL_0004: 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 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_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 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 ) @@ -99,23 +108,17 @@ IL_0004: 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 + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 - 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 public static bool condition(int32 n) cil managed @@ -128,7 +131,7 @@ IL_0004: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -138,12 +141,12 @@ IL_0001: stloc.0 IL_0002: ldarg.0 IL_0003: ldarg.1 - IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0009: ret } - .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -153,41 +156,76 @@ IL_0001: stloc.0 IL_0002: ldarg.0 IL_0003: ldarg.1 - IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0009: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() 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.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 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_list() 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::list@3 IL_0005: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 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-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..40da11113b6 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 @@ -26,30 +26,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 public specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1 '|RecoverableException|_|'(class [runtime]System.Exception exn) cil managed - { - .param [0] - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 3 - .locals init (class [runtime]System.Exception V_0, - class [runtime]System.OperationCanceledException V_1) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: isinst [runtime]System.OperationCanceledException - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: brfalse.s IL_0012 - - IL_000c: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1::get_ValueNone() - IL_0011: ret - - IL_0012: ldarg.0 - IL_0013: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1::NewValueSome(!0) - IL_0018: ret - } - .method public static int32 addWithActivePattern(int32 a, int32 b) cil managed { @@ -124,6 +100,30 @@ IL_0060: ret } + .method public specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1 '|RecoverableException|_|'(class [runtime]System.Exception exn) cil managed + { + .param [0] + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.OperationCanceledException V_1) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst [runtime]System.OperationCanceledException + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: brfalse.s IL_0012 + + IL_000c: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1::get_ValueNone() + IL_0011: ret + + IL_0012: ldarg.0 + IL_0013: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1::NewValueSome(!0) + IL_0018: ret + } + } .class private abstract auto ansi sealed ''.$ActivePatternTestCase @@ -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..7588d8d513f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/ActivePatternRecoverableException.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/ActivePatternRecoverableException.fs.il.bsl @@ -26,30 +26,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 public specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1 '|RecoverableException|_|'(class [runtime]System.Exception exn) cil managed - { - .param [0] - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 3 - .locals init (class [runtime]System.Exception V_0, - class [runtime]System.OperationCanceledException V_1) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: isinst [runtime]System.OperationCanceledException - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: brfalse.s IL_0012 - - IL_000c: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1::get_ValueNone() - IL_0011: ret - - IL_0012: ldarg.0 - IL_0013: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1::NewValueSome(!0) - IL_0018: ret - } - .method public static int32 addWithActivePattern(int32 a, int32 b) cil managed { @@ -101,6 +77,30 @@ IL_0037: ret } + .method public specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1 '|RecoverableException|_|'(class [runtime]System.Exception exn) cil managed + { + .param [0] + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (class [runtime]System.Exception V_0, + class [runtime]System.OperationCanceledException V_1) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst [runtime]System.OperationCanceledException + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: brfalse.s IL_0012 + + IL_000c: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1::get_ValueNone() + IL_0011: ret + + IL_0012: ldarg.0 + IL_0013: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpValueOption`1::NewValueSome(!0) + IL_0018: ret + } + } .class private abstract auto ansi sealed ''.$ActivePatternTestCase @@ -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/TupleElimination.fs.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleElimination.fs.OptimizeOff.il.net472.bsl index 64bd16e51fa..5462633c70f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleElimination.fs.OptimizeOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleElimination.fs.OptimizeOff.il.net472.bsl @@ -47,8 +47,18 @@ extends [FSharp.Core]Microsoft.FSharp.Core.FSharpTypeFunc { .field static assembly initonly class assembly/p@5 @_instance - .method assembly specialname rtspecialname - instance void .ctor() cil managed + .method private specialname rtspecialname static void .cctor() 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 10 + IL_0000: newobj instance void assembly/p@5::.ctor() + IL_0005: stsfld class assembly/p@5 assembly/p@5::@_instance + IL_000a: ret + } + + .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 ) @@ -61,8 +71,7 @@ IL_0006: ret } - .method public strict virtual instance object - Specialize() cil managed + .method public strict virtual instance object Specialize() 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 ) @@ -74,18 +83,6 @@ IL_000b: ret } - .method private specialname rtspecialname static - void .cctor() 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 10 - IL_0000: newobj instance void assembly/p@5::.ctor() - IL_0005: stsfld class assembly/p@5 assembly/p@5::@_instance - IL_000a: ret - } - } .class auto ansi serializable sealed nested assembly beforefieldinit p@5T @@ -95,8 +92,7 @@ .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 assembly/p@5 self0@) cil managed + .method assembly specialname rtspecialname instance void .ctor(class assembly/p@5 self0@) 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 ) @@ -110,8 +106,7 @@ IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit - Invoke(!a v) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(!a v) cil managed { .maxstack 7 @@ -160,10 +155,10 @@ IL_000d: ldc.i4.1 IL_000e: ldloca.s V_3 IL_0010: callvirt instance bool class [runtime]System.Collections.Generic.Dictionary`2::TryGetValue(!0, - !1&) + !1&) IL_0015: ldloc.3 IL_0016: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_001b: stloc.2 IL_001c: ldloc.2 IL_001d: call instance !1 class [runtime]System.Tuple`2::get_Item2() @@ -190,10 +185,10 @@ IL_005a: ldstr "123" IL_005f: ldloca.s V_9 IL_0061: call bool [runtime]System.Int64::TryParse(string, - int64&) + int64&) IL_0066: ldloc.s V_9 IL_0068: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_006d: stloc.s V_8 IL_006f: ldloc.s V_8 IL_0071: call instance !1 class [runtime]System.Tuple`2::get_Item2() @@ -242,4 +237,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleElimination.fs.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleElimination.fs.OptimizeOff.il.netcore.bsl index 303e362e1e7..148dc2a6fc9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleElimination.fs.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleElimination.fs.OptimizeOff.il.netcore.bsl @@ -37,6 +37,17 @@ extends [FSharp.Core]Microsoft.FSharp.Core.FSharpTypeFunc { .field static assembly initonly class assembly/p@5 @_instance + .method private specialname rtspecialname static void .cctor() 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 10 + IL_0000: newobj instance void assembly/p@5::.ctor() + IL_0005: stsfld class assembly/p@5 assembly/p@5::@_instance + IL_000a: ret + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -62,17 +73,6 @@ IL_000b: ret } - .method private specialname rtspecialname static void .cctor() 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 10 - IL_0000: newobj instance void assembly/p@5::.ctor() - IL_0005: stsfld class assembly/p@5 assembly/p@5::@_instance - IL_000a: ret - } - } .class auto ansi serializable sealed nested assembly beforefieldinit p@5T 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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/ValueTupleAliasConstructor.fs.RealInternalSignatureOff.il.net472.bsl index 29c78f33d95..4b8454d6860 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/ValueTupleAliasConstructor.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/ValueTupleAliasConstructor.fs.RealInternalSignatureOff.il.net472.bsl @@ -43,6 +43,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 @@ -60,7 +71,7 @@ IL_0000: ldc.i4.2 IL_0001: ldc.i4.2 IL_0002: newobj instance void valuetype [runtime]System.ValueTuple`2::.ctor(!0, - !1) + !1) IL_0007: pop IL_0008: ret } @@ -71,4 +82,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.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.net472.bsl index aeb6d4d902a..acf8d8e3c1d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.net472.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/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/Interop/StaticsInInterfaces.fs b/tests/FSharp.Compiler.ComponentTests/Interop/StaticsInInterfaces.fs index c752900f15b..b805e1ae8e5 100644 --- a/tests/FSharp.Compiler.ComponentTests/Interop/StaticsInInterfaces.fs +++ b/tests/FSharp.Compiler.ComponentTests/Interop/StaticsInInterfaces.fs @@ -408,16 +408,6 @@ module Test = IL_000f: ret } - .method public hidebysig specialname - instance int32 get_Value() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 Tests.Test/C::c - IL_0006: ret - } - .method public hidebysig static class Tests.Test/C 'Tests.Test.IAdditionOperator.op_Addition'(class Tests.Test/C x, class Tests.Test/C y) cil managed @@ -435,6 +425,16 @@ module Test = IL_0012: ret } + .method public hidebysig specialname + instance int32 get_Value() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Tests.Test/C::c + IL_0006: ret + } + .property instance int32 Value() { .get instance int32 Tests.Test/C::get_Value() diff --git a/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs index a9dcfe2fde4..fd1d9923942 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs @@ -34,6 +34,15 @@ let rec f () = seq { extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field static assembly initonly class Test/'f@3-1' @_instance + .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 + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOff.il.net472.bsl index f12788bef84..8d855e0c12a 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOff.il.net472.bsl @@ -5,10 +5,10 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } -.assembly extern System.Core +.assembly extern System.Linq { - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) - .ver 4:0:0:0 + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 10:0:0:0 } .assembly assembly { @@ -58,6 +58,17 @@ } + .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 [runtime]System.Collections.Generic.List`1 get_r() cil managed { @@ -96,8 +107,8 @@ IL_001a: ldnull IL_001b: ldftn bool assembly/clo@4::Invoke(int32) IL_0021: newobj instance void class [runtime]System.Func`2::.ctor(object, - native int) - IL_0026: call int32 [System.Core]System.Linq.Enumerable::Count(class [runtime]System.Collections.Generic.IEnumerable`1, + native int) + IL_0026: call int32 [System.Linq]System.Linq.Enumerable::Count(class [runtime]System.Collections.Generic.IEnumerable`1, class [runtime]System.Func`2) IL_002b: pop IL_002c: ret @@ -109,4 +120,3 @@ - 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..03456be1a1f 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 @@ -48,6 +48,17 @@ } + .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 [runtime]System.Collections.Generic.List`1 get_r() cil managed { @@ -99,4 +110,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOn.il.net472.bsl index 5780a97acc5..f4f1a653c11 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOn.il.net472.bsl @@ -5,10 +5,10 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } -.assembly extern System.Core +.assembly extern System.Linq { - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) - .ver 4:0:0:0 + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 10:0:0:0 } .assembly assembly { @@ -60,14 +60,6 @@ .field static assembly class [runtime]System.Collections.Generic.List`1 r@2 .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 [runtime]System.Collections.Generic.List`1 get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [runtime]System.Collections.Generic.List`1 assembly::r@2 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -79,6 +71,14 @@ IL_000c: ret } + .method public specialname static class [runtime]System.Collections.Generic.List`1 get_r() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Collections.Generic.List`1 assembly::r@2 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { @@ -92,8 +92,8 @@ IL_001a: ldnull IL_001b: ldftn bool assembly/clo@4::Invoke(int32) IL_0021: newobj instance void class [runtime]System.Func`2::.ctor(object, - native int) - IL_0026: call int32 [System.Core]System.Linq.Enumerable::Count(class [runtime]System.Collections.Generic.IEnumerable`1, + native int) + IL_0026: call int32 [System.Linq]System.Linq.Enumerable::Count(class [runtime]System.Collections.Generic.IEnumerable`1, class [runtime]System.Func`2) IL_002b: pop IL_002c: ret @@ -128,4 +128,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..902e788ce6d 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 @@ -50,14 +50,6 @@ .field static assembly class [runtime]System.Collections.Generic.List`1 r@2 .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 [runtime]System.Collections.Generic.List`1 get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [runtime]System.Collections.Generic.List`1 assembly::r@2 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -69,6 +61,14 @@ IL_000c: ret } + .method public specialname static class [runtime]System.Collections.Generic.List`1 get_r() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Collections.Generic.List`1 assembly::r@2 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { @@ -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..fe233f5de22 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 @@ -35,6 +35,17 @@ .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 .field static assembly int32 init@1 + .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 rtspecialname instance void .ctor() cil managed { @@ -79,17 +90,6 @@ IL_0017: 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 int32 X() { .set void assembly/Foo::set_X(int32) @@ -101,6 +101,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$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method public static void Foo.X.Static(int32 v) cil managed { @@ -118,6 +129,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$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method public static void Foo.X.Static(int32 v) cil managed { @@ -129,6 +151,17 @@ } + .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 private abstract auto ansi sealed ''.$assembly$fsx @@ -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..44f77d4d73e 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 @@ -35,6 +35,17 @@ .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 .field static assembly int32 init@1 + .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 instance void .ctor() cil managed { @@ -79,17 +90,6 @@ IL_0017: 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 { @@ -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..37c6346ecf5 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 @@ -97,6 +97,17 @@ } + .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 { @@ -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..49934212caf 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 @@ -103,6 +103,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 class assembly/Foo 'f@9-2' .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 public specialname static class assembly/Foo get_f() cil managed { @@ -127,17 +138,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 { @@ -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..c07360da247 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 @@ -35,6 +35,17 @@ .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 .field static assembly int32 init@4 + .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 rtspecialname instance void .ctor() cil managed { @@ -79,22 +90,67 @@ IL_0017: ret } + .property int32 X() + { + .set void assembly/Foo::set_X(int32) + .get int32 assembly/Foo::get_X() + } + } + + .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 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 + } + + .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: 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: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>::.ctor() + IL_0006: ret } - .property int32 X() + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - .set void assembly/Foo::set_X(int32) - .get int32 assembly/Foo::get_X() + + .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 } + } .class auto ansi serializable sealed nested assembly beforefieldinit 'todo1@20-1' @@ -169,10 +225,19 @@ } - .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 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 + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -189,17 +254,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,21 +273,12 @@ 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 } - .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 'todo2@39-1' @@ -297,66 +353,21 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit todo2@37 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> + .class abstract auto ansi sealed nested public Exts2 + extends [runtime]System.Object { - .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 - } - + .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 10 - IL_0000: newobj instance void assembly/todo2@37::.ctor() - IL_0005: stsfld class assembly/todo2@37 assembly/todo2@37::@_instance - IL_000a: ret + .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 Exts2 - 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 public static void Foo.X.Static(int32 v) cil managed { @@ -374,6 +385,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$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method public static void Foo.X.Static(int32 v) cil managed { @@ -385,6 +407,17 @@ } + .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,11 +426,11 @@ 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 } @@ -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..23782f97c43 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 @@ -35,6 +35,17 @@ .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 .field static assembly int32 init@4 + .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 instance void .ctor() cil managed { @@ -79,17 +90,6 @@ IL_0017: 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 { @@ -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 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 + } + + .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 + } + + } + .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,19 @@ } - .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 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 + } + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -201,17 +266,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,21 +285,12 @@ 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 } - .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 'todo2@39-1' @@ -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 { @@ -409,63 +409,63 @@ .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@44-1' .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.Control.FSharpAsync`1> get_todo1() 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::todo1@16 - 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 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_todo1() 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::todo1@16 IL_0005: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> get_computation@25() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> get_todo2() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::computation@25 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::todo2@35 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@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..da67aac8d51 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 @@ -82,6 +82,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$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method public static class assembly/Foo Foo.X(class assembly/Foo f, int32 i) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) @@ -96,6 +107,17 @@ } + .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 { @@ -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..dc7067b5729 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 @@ -102,6 +102,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 class assembly/Foo 'f@8-2' .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 public specialname static class assembly/Foo get_f() cil managed { @@ -126,17 +137,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 { @@ -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..6029514ba31 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 @@ -119,6 +119,17 @@ } + .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 { @@ -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..e73df02efa1 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 @@ -125,6 +125,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 class assembly/Foo 'f@10-2' .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 public specialname static class assembly/Foo get_f() cil managed { @@ -149,17 +160,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 { @@ -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 = """