diff --git a/src/fsharp/CompilerImports.fs b/src/fsharp/CompilerImports.fs index 5b9a6d8c97b..a81439e22e1 100644 --- a/src/fsharp/CompilerImports.fs +++ b/src/fsharp/CompilerImports.fs @@ -1830,12 +1830,12 @@ and [] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse let primaryScopeRef = match primaryAssem with | _, [ResolvedImportedAssembly ccu] -> ccu.FSharpViewOfMetadata.ILScopeRef - | _ -> failwith "unexpected" + | _ -> failwith "primaryScopeRef - unexpected" let primaryAssemblyResolvedPath = match primaryAssemblyResolution with | [primaryAssemblyResolution] -> primaryAssemblyResolution.resolvedPath - | _ -> failwith "unexpected" + | _ -> failwith "primaryAssemblyResolvedPath - unexpected" let resolvedAssemblies = tcResolutions.GetAssemblyResolutions() diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index 0e2cf020cfe..2870d76fbe7 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -3815,6 +3815,7 @@ and eligibleForFilter (cenv: cenv) expr = | Expr.Op(TOp.Coerce _, _, _, _) -> true | Expr.Val _ -> true | _ -> false + and checkDecisionTree dtree = match dtree with | TDSwitch(ve, cases, dflt, _) -> @@ -3823,6 +3824,7 @@ and eligibleForFilter (cenv: cenv) expr = dflt |> Option.forall checkDecisionTree | TDSuccess (es, _) -> es |> List.forall check | TDBind(bind, rest) -> check bind.Expr && checkDecisionTree rest + and checkDecisionTreeCase dcase = let (TCase(test, tree)) = dcase checkDecisionTree tree && @@ -4162,6 +4164,11 @@ and GenAsmCode cenv cgbuf eenv (il, tyargs, args, returnTys, m) sequel = GenSequel cenv eenv.cloc cgbuf sequel | _ -> failwith "Bad polymorphic IL instruction" + // ldnull; cgt.un then branch is used to test for null and can become a direct brtrue/brfalse + | [ AI_ldnull; AI_cgt_un ], [arg1], CmpThenBrOrContinue(1, [ I_brcmp (bi, label1) ]), _ -> + + GenExpr cenv cgbuf eenv arg1 (CmpThenBrOrContinue(pop 1, [ I_brcmp (bi, label1) ])) + // Strip off any ("ceq" x false) when the sequel is a comparison branch and change the BI_brfalse to a BI_brtrue // This is the instruction sequence for "not" // For these we can just generate the argument and change the test (from a brfalse to a brtrue and vice versa) @@ -4170,19 +4177,21 @@ and GenAsmCode cenv cgbuf eenv (il, tyargs, args, returnTys, m) sequel = CmpThenBrOrContinue(1, [I_brcmp (BI_brfalse | BI_brtrue as bi, label1) ]), _) -> - let bi = match bi with BI_brtrue -> BI_brfalse | _ -> BI_brtrue - GenExpr cenv cgbuf eenv arg1 (CmpThenBrOrContinue(pop 1, [ I_brcmp (bi, label1) ])) + let bi = match bi with BI_brtrue -> BI_brfalse | _ -> BI_brtrue + GenExpr cenv cgbuf eenv arg1 (CmpThenBrOrContinue(pop 1, [ I_brcmp (bi, label1) ])) // Query; when do we get a 'ret' in IL assembly code? | [ I_ret ], [arg1], sequel, [_ilRetTy] -> - GenExpr cenv cgbuf eenv arg1 Continue - CG.EmitInstr cgbuf (pop 1) Push0 I_ret - GenSequelEndScopes cgbuf sequel + + GenExpr cenv cgbuf eenv arg1 Continue + CG.EmitInstr cgbuf (pop 1) Push0 I_ret + GenSequelEndScopes cgbuf sequel // Query; when do we get a 'ret' in IL assembly code? | [ I_ret ], [], sequel, [_ilRetTy] -> - CG.EmitInstr cgbuf (pop 1) Push0 I_ret - GenSequelEndScopes cgbuf sequel + + CG.EmitInstr cgbuf (pop 1) Push0 I_ret + GenSequelEndScopes cgbuf sequel // 'throw' instructions are a bit of a problem - e.g. let x = (throw ...) in ... expects a value *) // to be left on the stack. But dead-code checking by some versions of the .NET verifier *) @@ -5756,8 +5765,8 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau match firstDiscrim with // Iterated tests, e.g. exception constructors, nulltests, typetests and active patterns. // These should always have one positive and one negative branch - | DecisionTreeTest.IsInst _ | DecisionTreeTest.ArrayLength _ + | DecisionTreeTest.IsInst _ | DecisionTreeTest.IsNull | DecisionTreeTest.Const(Const.Zero) -> if not (isSingleton cases) || Option.isNone defaultTargetOpt then failwith "internal error: GenDecisionTreeSwitch: DecisionTreeTest.IsInst/isnull/query" @@ -5781,7 +5790,9 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau CG.EmitInstr cgbuf (pop 1) Push0 (I_brcmp (bi, (List.head caseLabels).CodeLabel)) GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts targetInfos sequel caseLabels cases contf - | DecisionTreeTest.ActivePatternCase _ -> error(InternalError("internal error in codegen: DecisionTreeTest.ActivePatternCase", switchm)) + | DecisionTreeTest.ActivePatternCase _ -> + error(InternalError("internal error in codegen: DecisionTreeTest.ActivePatternCase", switchm)) + | DecisionTreeTest.UnionCase (hdc, tyargs) -> GenExpr cenv cgbuf eenv e Continue let cuspec = GenUnionSpec cenv.amap m eenv.tyenv hdc.TyconRef tyargs @@ -5841,7 +5852,8 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts targetInfos sequel caseLabels cases contf | _ -> error(InternalError("these matches should never be needed", switchm)) - | DecisionTreeTest.Error m -> error(InternalError("Trying to compile error recovery branch", m)) + | DecisionTreeTest.Error m -> + error(InternalError("Trying to compile error recovery branch", m)) and GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts targetInfos sequel caseLabels cases (contf: Zmap<_,_> -> FakeUnit) = @@ -7417,7 +7429,7 @@ and GenModuleDef cenv (cgbuf: CodeGenBuffer) qname lazyInitInfo eenv x = let recBinds = bindsRemaining |> List.takeWhile (function ModuleOrNamespaceBinding.Binding _ -> true | _ -> false) - |> List.map (function ModuleOrNamespaceBinding.Binding recBind -> recBind | _ -> failwith "unexpected") + |> List.map (function ModuleOrNamespaceBinding.Binding recBind -> recBind | _ -> failwith "GenModuleDef - unexpected") let otherBinds = bindsRemaining |> List.skipWhile (function ModuleOrNamespaceBinding.Binding _ -> true | _ -> false) diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index 0129e841089..92973641f73 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -3695,6 +3695,17 @@ and TryOptimizeDecisionTreeTest cenv test vinfo = /// Optimize/analyze a switch construct from pattern matching and OptimizeSwitch cenv env (e, cases, dflt, m) = + let g = cenv.g + + // Replace IsInst tests by calls to the helper for type tests, which may then get optimized + let e, cases = + match cases with + | [ TCase(DecisionTreeTest.IsInst (_srcTy, tgTy), success)] -> + let testExpr = mkCallTypeTest g m tgTy e + let testCases = [TCase(DecisionTreeTest.Const(Const.Bool true), success)] + testExpr, testCases + | _ -> e, cases + let eR, einfo = OptimizeExpr cenv env e let cases, dflt = @@ -3708,7 +3719,8 @@ and OptimizeSwitch cenv env (e, cases, dflt, m) = dflt else cases, dflt - // OK, see what weRre left with and continue + + // OK, see what we are left with and continue match cases, dflt with | [], Some case -> OptimizeDecisionTree cenv env m case | _ -> OptimizeSwitchFallback cenv env (eR, einfo, cases, dflt, m) diff --git a/src/fsharp/PatternMatchCompilation.fs b/src/fsharp/PatternMatchCompilation.fs index 643f0252853..d75d150393e 100644 --- a/src/fsharp/PatternMatchCompilation.fs +++ b/src/fsharp/PatternMatchCompilation.fs @@ -235,7 +235,7 @@ let RefuteDiscrimSet g m path discrims = match discrims with | [DecisionTreeTest.IsNull] -> snd(mkCompGenLocal m notNullText ty), false - | [DecisionTreeTest.IsInst _] -> + | DecisionTreeTest.IsInst _ :: _ -> snd(mkCompGenLocal m otherSubtypeText ty), false | DecisionTreeTest.Const c :: rest -> let consts = Set.ofList (c :: List.choose (function DecisionTreeTest.Const c -> Some c | _ -> None) rest) @@ -380,15 +380,17 @@ let ShowCounterExample g denv m refuted = // Basic problem specification //--------------------------------------------------------------------------- -type RuleNumber = int +type ClauseNumber = int +/// Represents an unresolved portion of pattern matching type Active = Active of Path * SubExprOfInput * Pattern type Actives = Active list -type Frontier = Frontier of RuleNumber * Actives * ValMap +/// Represents an unresolved portion of pattern matching within a clause +type Frontier = Frontier of ClauseNumber * Actives * ValMap -type InvestigationPoint = Investigation of RuleNumber * DecisionTreeTest * Path +type InvestigationPoint = Investigation of ClauseNumber * DecisionTreeTest * Path // Note: actives must be a SortedDictionary // REVIEW: improve these data structures, though surprisingly these functions don't tend to show up @@ -398,6 +400,7 @@ let rec isMemOfActives p1 actives = | [] -> false | Active(p2, _, _) :: rest -> pathEq p1 p2 || isMemOfActives p1 rest +// Find the information about the active investigation let rec lookupActive x l = match l with | [] -> raise (KeyNotFoundException()) @@ -408,6 +411,180 @@ let rec removeActive x l = | [] -> [] | Active(h, _, _) as p :: t -> if pathEq x h then t else p :: removeActive x t +[] +type Implication = + /// Indicates that, for any inputs where the first test succeeds, the second test will succeed + | Succeeds + /// Indicates that, for any inputs where the first test succeeded, the second test will fail + | Fails + /// Indicates nothing in particular + | Nothing + +/// Work out what one successful type test implies about a null test +/// +/// Example: +/// match x with +/// | :? string -> ... +/// | null -> ... +/// For any inputs where ':? string' succeeds, 'null' will fail +/// +/// Example: +/// match x with +/// | :? option -> ... +/// | null -> ... +/// Nothing can be learned. If ':? option' succeeds, 'null' may still have to be run. +let computeWhatSuccessfulTypeTestImpliesAboutNullTest g tgtTy1 = + if TypeNullIsTrueValue g tgtTy1 then + Implication.Nothing + else + Implication.Fails + +/// Work out what a failing type test implies about a null test. +/// +/// Example: +/// match x with +/// | :? option -> ... +/// | null -> ... +/// If ':? option' fails then 'null' will fail +let computeWhatFailingTypeTestImpliesAboutNullTest g tgtTy1 = + if TypeNullIsTrueValue g tgtTy1 then + Implication.Fails + else + Implication.Nothing + +/// Work out what one successful null test implies about a type test. +/// +/// Example: +/// match x with +/// | null -> ... +/// | :? string -> ... +/// For any inputs where 'null' succeeds, ':? string' will fail +/// +/// Example: +/// match x with +/// | null -> ... +/// | :? option -> ... +/// For any inputs where 'null' succeeds, ':? option' will succeed +let computeWhatSuccessfulNullTestImpliesAboutTypeTest g tgtTy2 = + if TypeNullIsTrueValue g tgtTy2 then + Implication.Succeeds + else + Implication.Fails + +/// Work out what a failing null test implies about a type test. The answer is "nothing" but it's included for symmetry. +let computeWhatFailingNullTestImpliesAboutTypeTest _g _tgtTy2 = + Implication.Nothing + +/// Work out what one successful type test implies about another type test +let computeWhatSuccessfulTypeTestImpliesAboutTypeTest g amap m tgtTy1 tgtTy2 = + let tgtTy1 = stripTyEqnsWrtErasure EraseAll g tgtTy1 + let tgtTy2 = stripTyEqnsWrtErasure EraseAll g tgtTy2 + + // A successful type test on any type implies all supertypes always succeed + // + // Example: + // match x with + // | :? string -> ... + // | :? IComparable -> ... + // + // Example: + // match x with + // | :? string -> ... + // | :? string -> ... + // + if TypeDefinitelySubsumesTypeNoCoercion 0 g amap m tgtTy2 tgtTy1 then + Implication.Succeeds + + // A successful type test on a sealed type implies all non-related types fail + // + // Example: + // match x with + // | :? int -> ... + // | :? string -> ... + // + // For any inputs where ':? int' succeeds, ':? string' will fail + // + // This doesn't apply to related types: + // match x with + // | :? int -> ... + // | :? IComparable -> ... + // + // Here IComparable neither fails nor is redundant + // + // This doesn't apply to unsealed types: + // match x with + // | :? SomeClass -> ... + // | :? SomeInterface -> ... + // + // This doesn't apply to types with null as true value: + // match x with + // | :? option -> ... + // | :? option -> ... + // + // Here on 'null' input the first pattern succeeds, and the second pattern will also succeed + elif isSealedTy g tgtTy1 && + not (TypeNullIsTrueValue g tgtTy1) && + not (TypeDefinitelySubsumesTypeNoCoercion 0 g amap m tgtTy2 tgtTy1) then + Implication.Fails + + // A successful type test on an unsealed class type implies type tests on unrelated non-interface types always fail + // + // Example: + // match x with + // | :? SomeUnsealedClass -> ... + // | :? SomeUnrelatedClass -> ... + // + // For any inputs where ':? SomeUnsealedClass' succeeds, ':? SomeUnrelatedClass' will fail + // + // This doesn't apply to interfaces or null-as-true-value + elif not (isSealedTy g tgtTy1) && + isClassTy g tgtTy1 && + not (TypeNullIsTrueValue g tgtTy1) && + not (isInterfaceTy g tgtTy2) && + not (TypeFeasiblySubsumesType 0 g amap m tgtTy1 CanCoerce tgtTy2) && + not (TypeFeasiblySubsumesType 0 g amap m tgtTy2 CanCoerce tgtTy1) then + Implication.Fails + + // A successful type test on an interface type refutes sealed types that do not support that interface + // + // Example: + // match x with + // | :? IComparable -> ... + // | :? SomeOtherSealedClass -> ... + // + // For any inputs where ':? IComparable' succeeds, ':? SomeOtherSealedClass' will fail + // + // This doesn't apply to interfaces or null-as-true-value + elif isInterfaceTy g tgtTy1 && + not (TypeNullIsTrueValue g tgtTy1) && + isSealedTy g tgtTy2 && + not (TypeFeasiblySubsumesType 0 g amap m tgtTy1 CanCoerce tgtTy2) then + Implication.Fails + else + Implication.Nothing + +/// Work out what one successful type test implies about another type test +let computeWhatFailingTypeTestImpliesAboutTypeTest g amap m tgtTy1 tgtTy2 = + let tgtTy1 = stripTyEqnsWrtErasure EraseAll g tgtTy1 + let tgtTy2 = stripTyEqnsWrtErasure EraseAll g tgtTy2 + + // A failing type test on any type implies all subtypes fail + // + // Example: + // match x with + // | :? IComparable -> ... + // | :? string -> ... + // + // Example: + // match x with + // | :? string -> ... + // | :? string -> ... + if TypeDefinitelySubsumesTypeNoCoercion 0 g amap m tgtTy1 tgtTy2 then + Implication.Fails + else + Implication.Nothing + + //--------------------------------------------------------------------------- // Utilities //--------------------------------------------------------------------------- @@ -458,25 +635,32 @@ let discrimsEq (g: TcGlobals) d1 d2 = | _ -> false /// Redundancy of 'isinst' patterns -let isDiscrimSubsumedBy g amap m d1 d2 = - (discrimsEq g d1 d2) +let isDiscrimSubsumedBy g amap m discrim taken = + discrimsEq g discrim taken || - (match d1, d2 with - | DecisionTreeTest.IsInst (_, tgty1), DecisionTreeTest.IsInst (_, tgty2) -> - TypeDefinitelySubsumesTypeNoCoercion 0 g amap m tgty2 tgty1 - | _ -> false) + match taken, discrim with + | DecisionTreeTest.IsInst (_, tgtTy1), DecisionTreeTest.IsInst (_, tgtTy2) -> + computeWhatFailingTypeTestImpliesAboutTypeTest g amap m tgtTy1 tgtTy2 = Implication.Fails + | DecisionTreeTest.IsNull _, DecisionTreeTest.IsInst (_, tgtTy2) -> + computeWhatFailingNullTestImpliesAboutTypeTest g tgtTy2 = Implication.Fails + | DecisionTreeTest.IsInst (_, tgtTy1), DecisionTreeTest.IsNull _ -> + computeWhatFailingTypeTestImpliesAboutNullTest g tgtTy1 = Implication.Fails + | _ -> + false + +type EdgeDiscrim = EdgeDiscrim of int * DecisionTreeTest * range /// Choose a set of investigations that can be performed simultaneously -let rec chooseSimultaneousEdgeSet prevOpt f l = +let rec chooseSimultaneousEdgeSet prev f l = match l with | [] -> [], [] | h :: t -> - match f prevOpt h with - | Some x -> - let l, r = chooseSimultaneousEdgeSet (Some x) f t - x :: l, r + match f prev h with + | Some (EdgeDiscrim(_, discrim, _) as edge) -> + let l, r = chooseSimultaneousEdgeSet (discrim::prev) f t + edge :: l, r | None -> - let l, r = chooseSimultaneousEdgeSet prevOpt f t + let l, r = chooseSimultaneousEdgeSet prev f t l, h :: r /// Can we represent a integer discrimination as a 'switch' @@ -488,14 +672,30 @@ let canCompactConstantClass c = | _ -> false /// Can two discriminators in a 'column' be decided simultaneously? -let discrimsHaveSameSimultaneousClass g d1 d2 = - match d1, d2 with - | DecisionTreeTest.Const _, DecisionTreeTest.Const _ - | DecisionTreeTest.IsNull, DecisionTreeTest.IsNull - | DecisionTreeTest.ArrayLength _, DecisionTreeTest.ArrayLength _ - | DecisionTreeTest.UnionCase _, DecisionTreeTest.UnionCase _ -> true - | DecisionTreeTest.IsInst _, DecisionTreeTest.IsInst _ -> false - | DecisionTreeTest.ActivePatternCase (_, _, _, apatVrefOpt1, _, _), DecisionTreeTest.ActivePatternCase (_, _, _, apatVrefOpt2, _, _) -> +let discrimWithinSimultaneousClass g amap m discrim prev = + match discrim, prev with + | _, [] -> true + | DecisionTreeTest.Const _, (DecisionTreeTest.Const _ :: _) + | DecisionTreeTest.ArrayLength _, (DecisionTreeTest.ArrayLength _ :: _) + | DecisionTreeTest.UnionCase _, (DecisionTreeTest.UnionCase _ :: _) -> true + + | DecisionTreeTest.IsNull, _ -> + // Check that each previous test in the set, if successful, gives some information about this test + prev |> List.forall (fun edge -> + match edge with + | DecisionTreeTest.IsNull _ -> true + | DecisionTreeTest.IsInst (_, tgtTy1) -> computeWhatSuccessfulTypeTestImpliesAboutNullTest g tgtTy1 <> Implication.Nothing + | _ -> false) + + | DecisionTreeTest.IsInst (_, tgtTy2), _ -> + // Check that each previous test in the set, if successful, gives some information about this test + prev |> List.forall (fun edge -> + match edge with + | DecisionTreeTest.IsNull _ -> true + | DecisionTreeTest.IsInst (_, tgtTy1) -> computeWhatSuccessfulTypeTestImpliesAboutTypeTest g amap m tgtTy1 tgtTy2 <> Implication.Nothing + | _ -> false) + + | DecisionTreeTest.ActivePatternCase (_, _, _, apatVrefOpt1, _, _), (DecisionTreeTest.ActivePatternCase (_, _, _, apatVrefOpt2, _, _) :: _) -> match apatVrefOpt1, apatVrefOpt2 with | Some (vref1, tinst1), Some (vref2, tinst2) -> valRefEq g vref1 vref2 && not (doesActivePatternHaveFreeTypars g vref1) && List.lengthsEqAndForall2 (typeEquiv g) tinst1 tinst2 | _ -> false (* for equality purposes these are considered different classes of discriminators! This is because adhoc computed patterns have no identity! *) @@ -574,7 +774,7 @@ let rec BuildSwitch inpExprOpt g expr edges dflt m = if verbose then dprintf "--> BuildSwitch@%a, #edges = %A, dflt.IsSome = %A\n" outputRange m (List.length edges) (Option.isSome dflt) match edges, dflt with | [], None -> failwith "internal error: no edges and no default" - | [], Some dflt -> dflt (* NOTE: first time around, edges<>[] *) + | [], Some dflt -> dflt // Optimize the case where the match always succeeds | [TCase(_, tree)], None -> tree @@ -587,7 +787,7 @@ let rec BuildSwitch inpExprOpt g expr edges dflt m = // isnull and isinst tests | TCase((DecisionTreeTest.IsNull | DecisionTreeTest.IsInst _), _) as edge :: edges, dflt -> - TDSwitch(expr, [edge], Some (BuildSwitch inpExprOpt g expr edges dflt m), m) + TDSwitch(expr, [edge], Some (BuildSwitch None g expr edges dflt m), m) #if OPTIMIZE_LIST_MATCHING // 'cons/nil' tests where we have stored the result of the cons test in an 'isinst' in a variable @@ -695,59 +895,94 @@ let layoutFrontier (Frontier (i, actives, _)) = Layout.(--) (Layout.wordL (TaggedText.tagText "Frontier ")) (Layout.tupleL [intL i; Layout.listL layoutActive actives]) #endif -let mkFrontiers investigations i = - List.map (fun (actives, valMap) -> Frontier(i, actives, valMap)) investigations - -let getRuleIndex (Frontier (i, _active, _valMap)) = i - -/// Is a pattern a partial pattern? -let rec isPatternPartial p = - match p with - | TPat_query ((_, _, _, _, _, apinfo), p, _m) -> not apinfo.IsTotal || isPatternPartial p - | TPat_const _ -> false - | TPat_wild _ -> false - | TPat_as (p, _, _) -> isPatternPartial p - | TPat_disjs (ps, _) | TPat_conjs(ps, _) - | TPat_tuple (_, ps, _, _) | TPat_exnconstr(_, ps, _) - | TPat_array (ps, _, _) | TPat_unioncase (_, _, ps, _) - | TPat_recd (_, _, ps, _) -> List.exists isPatternPartial ps - | TPat_range _ -> false - | TPat_null _ -> false - | TPat_isinst _ -> false - | TPat_error _ -> false - -let rec erasePartialPatterns inpp = - match inpp with +let mkFrontiers investigations clauseNumber = + investigations |> List.map (fun (actives, valMap) -> Frontier(clauseNumber, actives, valMap)) + +// Search for pattern decision points that are decided "one at a time" - i.e. where there is no +// multi-way switching. For example partial active patterns +let rec investigationPoints inpPat = + seq { + match inpPat with + | TPat_query ((_, _, _, _, _, apinfo), subPat, _) -> + yield not apinfo.IsTotal + yield! investigationPoints subPat + | TPat_isinst (_, _tgtTy, subPatOpt, _) -> + yield false + match subPatOpt with + | None -> () + | Some subPat -> + yield! investigationPoints subPat + | TPat_as (subPat, _, _) -> + yield! investigationPoints subPat + | TPat_disjs (subPats, _) + | TPat_conjs(subPats, _) + | TPat_tuple (_, subPats, _, _) + | TPat_recd (_, _, subPats, _) -> + for subPat in subPats do + yield! investigationPoints subPat + | TPat_exnconstr(_, subPats, _) -> + for subPat in subPats do + yield! investigationPoints subPat + | TPat_array (subPats, _, _) + | TPat_unioncase (_, _, subPats, _) -> + yield false + for subPat in subPats do + yield! investigationPoints subPat + | TPat_range _ + | TPat_null _ + | TPat_const _ -> + yield false + | TPat_wild _ + | TPat_error _ -> () + } + +let rec erasePartialPatterns inpPat = + match inpPat with | TPat_query ((expr, resTys, isStructRetTy, apatVrefOpt, idx, apinfo), p, m) -> if apinfo.IsTotal then TPat_query ((expr, resTys, isStructRetTy, apatVrefOpt, idx, apinfo), erasePartialPatterns p, m) else TPat_disjs ([], m) (* always fail *) | TPat_as (p, x, m) -> TPat_as (erasePartialPatterns p, x, m) - | TPat_disjs (ps, m) -> TPat_disjs(erasePartials ps, m) - | TPat_conjs(ps, m) -> TPat_conjs(erasePartials ps, m) - | TPat_tuple (tupInfo, ps, x, m) -> TPat_tuple(tupInfo, erasePartials ps, x, m) - | TPat_exnconstr(x, ps, m) -> TPat_exnconstr(x, erasePartials ps, m) - | TPat_array (ps, x, m) -> TPat_array (erasePartials ps, x, m) + | TPat_disjs (subPats, m) -> TPat_disjs(erasePartials subPats, m) + | TPat_conjs(subPats, m) -> TPat_conjs(erasePartials subPats, m) + | TPat_tuple (tupInfo, subPats, x, m) -> TPat_tuple(tupInfo, erasePartials subPats, x, m) + | TPat_exnconstr(x, subPats, m) -> TPat_exnconstr(x, erasePartials subPats, m) + | TPat_array (subPats, x, m) -> TPat_array (erasePartials subPats, x, m) | TPat_unioncase (x, y, ps, m) -> TPat_unioncase (x, y, erasePartials ps, m) | TPat_recd (x, y, ps, m) -> TPat_recd (x, y, List.map erasePartialPatterns ps, m) + | TPat_isinst (x, y, subPatOpt, m) -> TPat_isinst (x, y, Option.map erasePartialPatterns subPatOpt, m) | TPat_const _ | TPat_wild _ | TPat_range _ | TPat_null _ - | TPat_isinst _ - | TPat_error _ -> inpp + | TPat_error _ -> inpPat and erasePartials inps = List.map erasePartialPatterns inps +let rec isPatternDisjunctive inpPat = + match inpPat with + | TPat_query (_, subPat, _) -> isPatternDisjunctive subPat + | TPat_as (subPat, _, _) -> isPatternDisjunctive subPat + | TPat_disjs (subPats, _) -> subPats.Length > 1 || List.exists isPatternDisjunctive subPats + | TPat_conjs(subPats, _) + | TPat_tuple (_, subPats, _, _) + | TPat_exnconstr(_, subPats, _) + | TPat_array (subPats, _, _) + | TPat_unioncase (_, _, subPats, _) + | TPat_recd (_, _, subPats, _) -> List.exists isPatternDisjunctive subPats + | TPat_isinst (_, _, subPatOpt, _) -> Option.exists isPatternDisjunctive subPatOpt + | TPat_const _ -> false + | TPat_wild _ -> false + | TPat_range _ -> false + | TPat_null _ -> false + | TPat_error _ -> false //--------------------------------------------------------------------------- // The algorithm //--------------------------------------------------------------------------- -type EdgeDiscrim = EdgeDiscrim of int * DecisionTreeTest * range let getDiscrim (EdgeDiscrim(_, discrim, _)) = discrim - let CompilePatternBasic (g: TcGlobals) denv amap tcVal infoReader exprm matchm warnOnUnused @@ -945,16 +1180,16 @@ let CompilePatternBasic /// Select the set of discriminators which we can handle in one test, or as a series of iterated tests, /// e.g. in the case of TPat_isinst. Ensure we only take at most one class of `TPat_query` at a time. - /// Record the rule numbers so we know which rule the TPat_query cam from, so that when we project through + /// Record the clause numbers so we know which rule the TPat_query cam from, so that when we project through /// the frontier we only project the right rule. and ChooseSimultaneousEdges frontiers path = - frontiers |> chooseSimultaneousEdgeSet None (fun prevOpt (Frontier (i', active', _)) -> - if isMemOfActives path active' then - let _, p = lookupActive path active' - match getDiscrimOfPattern p with + frontiers |> chooseSimultaneousEdgeSet [] (fun prev (Frontier (i, active, _)) -> + if isMemOfActives path active then + let _, patAtActive = lookupActive path active + match getDiscrimOfPattern patAtActive with | Some discrim -> - if (match prevOpt with None -> true | Some (EdgeDiscrim(_, discrimPrev, _)) -> discrimsHaveSameSimultaneousClass g discrim discrimPrev) then - Some (EdgeDiscrim(i', discrim, p.Range)) + if discrimWithinSimultaneousClass g amap patAtActive.Range discrim prev then + Some (EdgeDiscrim(i, discrim, patAtActive.Range)) else None @@ -980,10 +1215,9 @@ let CompilePatternBasic // This is really an optimization that could be done more effectively in opt.fs // if we flowed a bit of information through - - | EdgeDiscrim(_i', DecisionTreeTest.IsInst (_srcty, tgty), m) :: _rest - (* check we can use a simple 'isinst' instruction *) - when canUseTypeTestFast g tgty && isNil origInputValTypars -> + | [EdgeDiscrim(_i', DecisionTreeTest.IsInst (_srcty, tgty), m)] + // check we can use a simple 'isinst' instruction + when isRefTy g tgty && canUseTypeTestFast g tgty && isNil origInputValTypars -> let v, vExpr = mkCompGenLocal m "typeTestResult" tgty if origInputVal.IsMemberOrModuleBinding then @@ -1058,7 +1292,7 @@ let CompilePatternBasic ([], simulSetOfEdgeDiscrims) ||> List.collectFold (fun taken (EdgeDiscrim(i', discrim, m)) -> // Check to see if we've already collected the edge for this case, in which case skip it. - if List.exists (isDiscrimSubsumedBy g amap m discrim) taken then + if taken |> List.exists (isDiscrimSubsumedBy g amap m discrim) then // Skip this edge: it is refuted ([], taken) else @@ -1109,8 +1343,10 @@ let CompilePatternBasic // Project a successful edge through the frontiers. let investigation = Investigation(i', discrim, path) - let frontiers = frontiers |> List.collect (GenerateNewFrontiersAfterSuccessfulInvestigation inpExprOpt resPostBindOpt investigation) + let frontiers = frontiers |> List.collect (GenerateNewFrontiersAfterSuccessfulInvestigation taken inpExprOpt resPostBindOpt investigation) + let tree = InvestigateFrontiers refuted frontiers + // Bind the resVar for the union case, if we have one let tree = match ucaseBindOpt with @@ -1124,10 +1360,10 @@ let CompilePatternBasic let simulSetOfDiscrims = simulSetOfCases |> List.map (fun c -> c.Discriminator) - let isRefuted (Frontier (_i', active', _)) = - isMemOfActives path active' && - let p = lookupActive path active' |> snd - match getDiscrimOfPattern p with + let isRefuted (Frontier (_i', active, _)) = + isMemOfActives path active && + let _, patAtActive = lookupActive path active + match getDiscrimOfPattern patAtActive with | Some discrim -> List.exists (isDiscrimSubsumedBy g amap exprm discrim) simulSetOfDiscrims | None -> false @@ -1151,31 +1387,33 @@ let CompilePatternBasic Some(InvestigateFrontiers refuted fallthroughPathFrontiers) // Build a new frontier that represents the result of a successful investigation - // at rule point (i', discrim, path) - and GenerateNewFrontiersAfterSuccessfulInvestigation inpExprOpt resPostBindOpt (Investigation(i', discrim, path)) (Frontier (i, active, valMap) as frontier) = + and GenerateNewFrontiersAfterSuccessfulInvestigation taken inpExprOpt resPostBindOpt investigation frontier = + let (Investigation(iInvestigated, discrim, path)) = investigation + let (Frontier (i, actives, valMap)) = frontier - if (isMemOfActives path active) then - let SubExpr(accessf, ve), pat = lookupActive path active + if isMemOfActives path actives then + let (subExprForActive, patAtActive) = lookupActive path actives + let (SubExpr(accessf, ve)) = subExprForActive - let mkSubFrontiers path accessf' active' argpats pathBuilder = + let mkSubFrontiers path subAccess subActive argpats pathBuilder = let mkSubActive j p = - let newSubExpr = SubExpr(accessf' j, ve) + let newSubExpr = SubExpr(subAccess j, ve) let newPath = pathBuilder path j Active(newPath, newSubExpr, p) let newActives = List.mapi mkSubActive argpats - let investigations = BindProjectionPatterns newActives (active', valMap) + let investigations = BindProjectionPatterns newActives (subActive, valMap) mkFrontiers investigations i - let active' = removeActive path active - match pat with + let newActives = removeActive path actives + match patAtActive with | TPat_wild _ | TPat_as _ | TPat_tuple _ | TPat_disjs _ | TPat_conjs _ | TPat_recd _ -> failwith "Unexpected projection pattern" | TPat_query ((_, resTys, isStructRetTy, apatVrefOpt, idx, apinfo), p, m) -> if apinfo.IsTotal then // Total active patterns always return choice values let hasParam = (match apatVrefOpt with None -> true | Some (vref, _) -> doesActivePatternHaveFreeTypars g vref) - if (hasParam && i = i') || (discrimsEq g discrim (Option.get (getDiscrimOfPattern pat))) then + if (hasParam && i = iInvestigated) || (discrimsEq g discrim (Option.get (getDiscrimOfPattern patAtActive))) then let aparity = apinfo.Names.Length - let accessf' j tpinst _e' = + let subAccess j tpinst _e' = assert inpExprOpt.IsSome if aparity <= 1 then Option.get inpExprOpt @@ -1184,7 +1422,7 @@ let CompilePatternBasic // TODO: In the future we will want active patterns to be able to return struct-unions // In that eventuality, we need to check we are taking the address correctly mkUnionCaseFieldGetUnprovenViaExprAddr (Option.get inpExprOpt, ucref, instTypes tpinst resTys, j, exprm) - mkSubFrontiers path accessf' active' [p] (fun path j -> PathQuery(path, int64 j)) + mkSubFrontiers path subAccess newActives [p] (fun path j -> PathQuery(path, int64 j)) elif hasParam then @@ -1194,15 +1432,15 @@ let CompilePatternBasic [] else // Partial active patterns always return options or value-options - if i = i' then - let accessf' _j tpinst _ = + if i = iInvestigated then + let subAccess _j tpinst _ = let expr = Option.get inpExprOpt if isStructRetTy then // In this case, the inpExprOpt is already an address-of expression mkUnionCaseFieldGetProvenViaExprAddr (expr, mkValueSomeCase g, instTypes tpinst resTys, 0, exprm) else mkUnionCaseFieldGetUnprovenViaExprAddr (expr, mkSomeCase g, instTypes tpinst resTys, 0, exprm) - mkSubFrontiers path accessf' active' [p] (fun path j -> PathQuery(path, int64 j)) + mkSubFrontiers path subAccess newActives [p] (fun path j -> PathQuery(path, int64 j)) else // Successful active patterns don't refute other patterns [frontier] @@ -1210,7 +1448,7 @@ let CompilePatternBasic | TPat_unioncase (ucref1, tyargs, argpats, _) -> match discrim with | DecisionTreeTest.UnionCase (ucref2, tinst) when g.unionCaseRefEq ucref1 ucref2 -> - let accessf' j tpinst exprIn = + let subAccess j tpinst exprIn = match resPostBindOpt with | Some e -> mkUnionCaseFieldGetProvenViaExprAddr (e, ucref1, tinst, j, exprm) | None -> @@ -1220,9 +1458,9 @@ let CompilePatternBasic | None -> accessf tpinst exprIn mkUnionCaseFieldGetUnprovenViaExprAddr (exprIn, ucref1, instTypes tpinst tyargs, j, exprm) - mkSubFrontiers path accessf' active' argpats (fun path j -> PathUnionConstr(path, ucref1, tyargs, j)) + mkSubFrontiers path subAccess newActives argpats (fun path j -> PathUnionConstr(path, ucref1, tyargs, j)) | DecisionTreeTest.UnionCase _ -> - // Successful union case tests DO refute all other union case tests (no overlapping union cases) + // Successful union case tests refute all other union case tests (no overlapping union cases) [] | _ -> // Successful union case tests don't refute any other patterns @@ -1230,51 +1468,90 @@ let CompilePatternBasic | TPat_array (argpats, ty, _) -> match discrim with - | DecisionTreeTest.ArrayLength (n, _) when List.length argpats = n -> - let accessf' j tpinst exprIn = mkCallArrayGet g exprm ty (accessf tpinst exprIn) (mkInt g exprm j) - mkSubFrontiers path accessf' active' argpats (fun path j -> PathArray(path, ty, List.length argpats, j)) - // Successful length tests refute all other lengths - | DecisionTreeTest.ArrayLength _ -> - [] + | DecisionTreeTest.ArrayLength (n, _) -> + if List.length argpats = n then + let subAccess j tpinst exprIn = mkCallArrayGet g exprm ty (accessf tpinst exprIn) (mkInt g exprm j) + mkSubFrontiers path subAccess newActives argpats (fun path j -> PathArray(path, ty, List.length argpats, j)) + else + // Successful length tests refute all other lengths + [] | _ -> [frontier] | TPat_exnconstr (ecref, argpats, _) -> + + let srcTy1 = g.exn_ty + let tgtTy1 = mkAppTy ecref [] + if taken |> List.exists (discrimsEq g (DecisionTreeTest.IsInst (srcTy1, tgtTy1))) then [] else + match discrim with - | DecisionTreeTest.IsInst (_srcTy, tgtTy) when typeEquiv g (mkAppTy ecref []) tgtTy -> - let accessf' j tpinst exprIn = mkExnCaseFieldGet(accessf tpinst exprIn, ecref, j, exprm) - mkSubFrontiers path accessf' active' argpats (fun path j -> PathExnConstr(path, ecref, j)) + | DecisionTreeTest.IsInst (_srcTy, tgtTy2) -> + if typeEquiv g tgtTy1 tgtTy2 then + let subAccess j tpinst exprIn = mkExnCaseFieldGet(accessf tpinst exprIn, ecref, j, exprm) + mkSubFrontiers path subAccess newActives argpats (fun path j -> PathExnConstr(path, ecref, j)) + else + // Successful tests against F# exception definitions refute all other non-equivalent type tests + // F# exception definitions are sealed. + [] + + | DecisionTreeTest.IsNull _ -> + match computeWhatSuccessfulTypeTestImpliesAboutNullTest g tgtTy1 with + | Implication.Succeeds -> [Frontier (i, newActives, valMap)] + | Implication.Fails -> [] + | Implication.Nothing -> [frontier] + | _ -> - // Successful type tests against one sealed type refute all other sealed types - // REVIEW: Successful type tests against one sealed type should refute all other sealed types [frontier] - | TPat_isinst (_srcty, tgtTy1, pbindOpt, _) -> + | TPat_isinst (srcTy1, tgtTy1, pbindOpt, m) -> + + if taken |> List.exists (discrimsEq g (DecisionTreeTest.IsInst (srcTy1, tgtTy1))) then [] else + match discrim with - | DecisionTreeTest.IsInst (_srcTy, tgtTy2) when typeEquiv g tgtTy1 tgtTy2 -> - match pbindOpt with - | Some pbind -> - let accessf' tpinst exprIn = - // Fetch the result from the place where we saved it, if possible - match inpExprOpt with - | Some e -> e - | _ -> - // Otherwise call the helper - mkCallUnboxFast g exprm (instType tpinst tgtTy1) (accessf tpinst exprIn) - BindProjectionPattern (Active(path, SubExpr(accessf', ve), pbind)) (active', valMap) - |> mkFrontiers <| i - | None -> - [Frontier (i, active', valMap)] + | DecisionTreeTest.IsInst (_srcTy, tgtTy2) -> + match computeWhatSuccessfulTypeTestImpliesAboutTypeTest g amap m tgtTy1 tgtTy2 with + | Implication.Succeeds -> + match pbindOpt with + | Some pbind -> + let subAccess tpinst exprIn = + // Fetch the result from the place where we saved it, if possible + match inpExprOpt with + | Some e -> e + | _ -> + // Otherwise call the helper + mkCallUnboxFast g exprm (instType tpinst tgtTy1) (accessf tpinst exprIn) + let subActive = Active(path, SubExpr(subAccess, ve), pbind) + let subActives = BindProjectionPattern subActive (newActives, valMap) + mkFrontiers subActives i + | None -> + [Frontier (i, newActives, valMap)] + | Implication.Fails -> + [] + | Implication.Nothing -> + [frontier] + + | DecisionTreeTest.IsNull _ -> + match computeWhatSuccessfulTypeTestImpliesAboutNullTest g tgtTy1 with + | Implication.Succeeds -> [Frontier (i, newActives, valMap)] + | Implication.Fails -> [] + | Implication.Nothing -> [frontier] | _ -> - // Successful type tests against other types don't refute anything - // REVIEW: Successful type tests against one sealed type should refute all other sealed types + // Successful type tests against other types don't refute other things [frontier] | TPat_null _ -> + + if taken |> List.exists (discrimsEq g DecisionTreeTest.IsNull) then [] else + match discrim with | DecisionTreeTest.IsNull -> - [Frontier (i, active', valMap)] + [Frontier (i, newActives, valMap)] + | DecisionTreeTest.IsInst (_, tgtTy) -> + match computeWhatSuccessfulNullTestImpliesAboutTypeTest g tgtTy with + | Implication.Succeeds -> [Frontier (i, newActives, valMap)] + | Implication.Fails -> [] + | Implication.Nothing -> [frontier] | _ -> // Successful null tests don't refute any other patterns [frontier] @@ -1282,7 +1559,7 @@ let CompilePatternBasic | TPat_const (c1, _) -> match discrim with | DecisionTreeTest.Const c2 when (c1=c2) -> - [Frontier (i, active', valMap)] + [Frontier (i, newActives, valMap)] | DecisionTreeTest.Const _ -> // All constants refute all other constants (no overlapping between constants!) [] @@ -1292,7 +1569,7 @@ let CompilePatternBasic | TPat_error range -> match discrim with | DecisionTreeTest.Error testRange when range = testRange -> - [Frontier (i, active', valMap)] + [Frontier (i, newActives, valMap)] | _ -> [frontier] @@ -1301,64 +1578,74 @@ let CompilePatternBasic else [frontier] - and BindProjectionPattern (Active(path, subExpr, p) as inp) (accActive, accValMap as s) = - let (SubExpr(accessf, ve)) = subExpr - let mkSubActive pathBuilder accessf' j p' = - Active(pathBuilder path j, SubExpr(accessf' j, ve), p') + and BindProjectionPattern inpActive ((accActive, accValMap) as activeState) = - match p with + let (Active(inpPath, inpExpr, pat)) = inpActive + let (SubExpr(inpAccess, inpExprAndVal)) = inpExpr + let mkSubActive pathBuilder subAccess j p' = + Active(pathBuilder inpPath j, SubExpr(subAccess j, inpExprAndVal), p') + + match pat with | TPat_wild _ -> - BindProjectionPatterns [] s - | TPat_as(p', pbind, m) -> - let v, subExpr' = BindSubExprOfInput g amap origInputValTypars pbind m subExpr - BindProjectionPattern (Active(path, subExpr, p')) (accActive, accValMap.Add v subExpr' ) - | TPat_tuple(tupInfo, ps, tyargs, _m) -> - let accessf' j tpinst subExpr' = mkTupleFieldGet g (tupInfo, accessf tpinst subExpr', instTypes tpinst tyargs, j, exprm) + [activeState] + + | TPat_as(leftPat, asValBind, m) -> + let asVal, subExpr = BindSubExprOfInput g amap origInputValTypars asValBind m inpExpr + BindProjectionPattern (Active(inpPath, inpExpr, leftPat)) (accActive, accValMap.Add asVal subExpr ) + + | TPat_tuple(tupInfo, tupFieldPats, tyargs, _m) -> + let subAccess j tpinst subExpr = mkTupleFieldGet g (tupInfo, inpAccess tpinst subExpr, instTypes tpinst tyargs, j, exprm) let pathBuilder path j = PathTuple(path, tyargs, j) - let newActives = List.mapi (mkSubActive pathBuilder accessf') ps - BindProjectionPatterns newActives s - | TPat_recd(tcref, tinst, ps, _m) -> + let newActives = List.mapi (mkSubActive pathBuilder subAccess) tupFieldPats + BindProjectionPatterns newActives activeState + + | TPat_recd(tcref, tinst, recdFieldPats, _m) -> let newActives = - (ps, tcref.TrueInstanceFieldsAsRefList) ||> List.mapi2 (fun j p fref -> - let accessf' fref _j tpinst exprIn = mkRecdFieldGet g (accessf tpinst exprIn, fref, instTypes tpinst tinst, exprm) + (recdFieldPats, tcref.TrueInstanceFieldsAsRefList) ||> List.mapi2 (fun j recdFieldPat fref -> + let subAccess fref _j tpinst exprIn = mkRecdFieldGet g (inpAccess tpinst exprIn, fref, instTypes tpinst tinst, exprm) let pathBuilder path j = PathRecd(path, tcref, tinst, j) - mkSubActive pathBuilder (accessf' fref) j p) - BindProjectionPatterns newActives s - | TPat_disjs(ps, _m) -> - List.collect (fun p -> BindProjectionPattern (Active(path, subExpr, p)) s) ps - | TPat_conjs(ps, _m) -> - let newActives = List.mapi (mkSubActive (fun path j -> PathConj(path, j)) (fun _j -> accessf)) ps - BindProjectionPatterns newActives s + mkSubActive pathBuilder (subAccess fref) j recdFieldPat) + BindProjectionPatterns newActives activeState + + | TPat_disjs(subPats, _m) -> + subPats |> List.collect (fun subPat -> BindProjectionPattern (Active(inpPath, inpExpr, subPat)) activeState) + + | TPat_conjs(subPats, _m) -> + let newActives = List.mapi (mkSubActive (fun path j -> PathConj(path, j)) (fun _j -> inpAccess)) subPats + BindProjectionPatterns newActives activeState | TPat_range (c1, c2, m) -> let mutable res = [] for i = int c1 to int c2 do - res <- BindProjectionPattern (Active(path, subExpr, TPat_const(Const.Char(char i), m))) s @ res + res <- BindProjectionPattern (Active(inpPath, inpExpr, TPat_const(Const.Char(char i), m))) activeState @ res res + // Assign an identifier to each TPat_query based on our knowledge of the 'identity' of the active pattern, if any | TPat_query ((_, _, _, apatVrefOpt, _, _), _, _) -> let uniqId = match apatVrefOpt with | Some (vref, _) when not (doesActivePatternHaveFreeTypars g vref) -> vref.Stamp | _ -> genUniquePathId() - let inp = Active(PathQuery(path, uniqId), subExpr, p) + let inp = Active(PathQuery(inpPath, uniqId), inpExpr, pat) [(inp :: accActive, accValMap)] | _ -> - [(inp :: accActive, accValMap)] + [(inpActive :: accActive, accValMap)] - and BindProjectionPatterns ps s = - List.foldBack (fun p sofar -> List.collect (BindProjectionPattern p) sofar) ps [s] + and BindProjectionPatterns actives s = + List.foldBack (fun p sofar -> List.collect (BindProjectionPattern p) sofar) actives [s] // The setup routine of the match compiler. let frontiers = ((typedClauses |> List.mapi (fun i c -> let initialSubExpr = SubExpr((fun _ x -> x), (exprForVal origInputVal.Range origInputVal, origInputVal)) - let investigations = BindProjectionPattern (Active(PathEmpty inputTy, initialSubExpr, c.Pattern)) ([], ValMap<_>.Empty) + let initialActive = Active(PathEmpty inputTy, initialSubExpr, c.Pattern) + let investigations = BindProjectionPattern initialActive ([], ValMap<_>.Empty) mkFrontiers investigations i) |> List.concat) @ mkFrontiers [([], ValMap<_>.Empty)] nClauses) + let dtree = InvestigateFrontiers [] @@ -1376,11 +1663,74 @@ let CompilePatternBasic dtree, targets -let isPartialOrWhenClause (c: TypedMatchClause) = isPatternPartial c.Pattern || c.GuardExpr.IsSome +// Three pattern constructs can cause significant code expansion in various combinations +// - Partial active patterns +// - Disjunctive patterns +// - Pattern clauses with 'when' +// - isinst patterns +// +// Partial active patterns that are not the "last" thing in a clause, +// combined with subsequent clauses, can cause significant code expansion +// because they are decided on one by one. Each failure path expands out the subsequent +// clause logic (with the active pattern contributing no reduction of those subsequent +// clauses). Each success path expands out any subsequent logic in the clause plus +// subsequent clause logic. +// +// | ActivePat1, ActivePat2 -> ... +// | more-logic +// +// goes to +// switch (ActivePat1) +// switch (ActivePat2) +// --> tgt1 +// --> more-logic +// --> more-logic +// +// When a partial active pattern is used in the last meaningful position the clause is +// not problematic, e.g. +// +// | ActivePat1, ActivePat2 -> ... +// | more-logic +// +// So when generating code we take clauses up until the first one containing +// a partial pattern. This can lead to sub-standard code generation +// but has long been the technique we use to avoid blow-up of pattern matching. +// +// Disjunctive patterns combined with 'when' clauses can also cause signficant code +// expansion. In particular this leads to multiple copies of 'when' expressions (even for one clause) +// and each failure path of those 'when' will then continue on the expand any remaining +// pattern logic in subsequent clauses. So when generating code we take clauses up +// until the first one containing a disjunctive pattern with a 'when' clause. +// +// Disjunction will still cause significant expansion, e.g. +// (A | B), (C | D) -> +// is immediately expanded out to four frontiers each with two investigation points. +// A, C -> ... +// A, D -> ... +// B, C -> ... +// B, D -> ... +// +// Of course, some decision-logic expansion here is expected. Further, for unions, integers, characters, enums etc. +// the column-based matching on A/B and C/D eliminates these relatively efficiently, e.g. to +// one-switch-on-A/B +// on each path, one switch on C/D +// So disjunction alone isn't considered problematic, but in combination with 'when' patterns + +let isProblematicClause (clause: TypedMatchClause) = + let ips = + seq { + yield! investigationPoints clause.Pattern + if clause.GuardExpr.IsSome then + yield true + } |> Seq.toArray + let ips = if isPatternDisjunctive clause.Pattern then Array.append ips ips else ips + // Look for multiple decision points. + // We don't mind about the last logical decision point + ips.Length > 0 && Array.exists id ips.[0..ips.Length-2] let rec CompilePattern g denv amap tcVal infoReader exprm matchm warnOnUnused actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) (clausesL: TypedMatchClause list) inputTy resultTy = match clausesL with - | _ when List.exists isPartialOrWhenClause clausesL -> + | _ when List.exists isProblematicClause clausesL -> // First make sure we generate at least some of the obvious incomplete match warnings. let warnOnUnused = false // we can't turn this on since we're pretending all partials fail in order to control the complexity of this. @@ -1391,17 +1741,17 @@ let rec CompilePattern g denv amap tcVal infoReader exprm matchm warnOnUnused a // Partial and when clauses cause major code explosion if treated naively // Hence treat any pattern matches with any partial clauses clause-by-clause - let rec atMostOnePartialAtATime clauses = - match List.takeUntil isPartialOrWhenClause clauses with + let rec atMostOneProblematicClauseAtATime clauses = + match List.takeUntil isProblematicClause clauses with | l, [] -> CompilePatternBasic g denv amap tcVal infoReader exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) l inputTy resultTy | l, h :: t -> - // Add the partial or when clause. - doGroupWithAtMostOnePartial (l @ [h]) t + // Add the problematic clause. + doGroupWithAtMostOneProblematic (l @ [h]) t - and doGroupWithAtMostOnePartial group rest = + and doGroupWithAtMostOneProblematic group rest = // Compile the remaining clauses. - let decisionTree, targets = atMostOnePartialAtATime rest + let decisionTree, targets = atMostOneProblematicClauseAtATime rest // Make the expression that represents the remaining cases of the pattern match. let expr = mkAndSimplifyMatch DebugPointAtBinding.NoneAtInvisible exprm matchm resultTy decisionTree targets @@ -1412,7 +1762,7 @@ let rec CompilePattern g denv amap tcVal infoReader exprm matchm warnOnUnused a CompilePatternBasic g denv amap tcVal infoReader exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) (group @ [clauseForRestOfMatch]) inputTy resultTy - atMostOnePartialAtATime clausesL + atMostOneProblematicClauseAtATime clausesL | _ -> CompilePatternBasic g denv amap tcVal infoReader exprm matchm warnOnUnused true actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) clausesL inputTy resultTy diff --git a/src/fsharp/TypedTreeOps.fs b/src/fsharp/TypedTreeOps.fs index 49dc04c11b5..816a4c38c32 100644 --- a/src/fsharp/TypedTreeOps.fs +++ b/src/fsharp/TypedTreeOps.fs @@ -8592,8 +8592,7 @@ let (|SpecialNotEquatableHeadType|_|) g ty = // Can we use the fast helper for the 'LanguagePrimitives.IntrinsicFunctions.TypeTestGeneric'? let canUseTypeTestFast g ty = not (isTyparTy g ty) && - not (TypeNullIsTrueValue g ty) && - not (TypeNullNever g ty) + not (TypeNullIsTrueValue g ty) // Can we use the fast helper for the 'LanguagePrimitives.IntrinsicFunctions.UnboxGeneric'? let canUseUnboxFast g m ty = @@ -8611,7 +8610,7 @@ let canUseUnboxFast g m ty = // used for compiler-generated code. let mkIsInstConditional g m tgty vinpe v e2 e3 = - if canUseTypeTestFast g tgty then + if canUseTypeTestFast g tgty && isRefTy g tgty then let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) let tg2 = mbuilder.AddResultTarget(e2) diff --git a/src/fsharp/absil/ilwrite.fs b/src/fsharp/absil/ilwrite.fs index a5c58fd7233..2e97f973552 100644 --- a/src/fsharp/absil/ilwrite.fs +++ b/src/fsharp/absil/ilwrite.fs @@ -899,7 +899,6 @@ and EmitType cenv env bb ty = bb.EmitByte (if req then et_CMOD_REQD else et_CMOD_OPT) emitTypeInfoAsTypeDefOrRefEncoded cenv bb (tref.Scope, tref.Enclosing, tref.Name) EmitType cenv env bb ty - | _ -> failwith "EmitType" and EmitLocalInfo cenv env (bb: ByteBuffer) (l: ILLocal) = if l.IsPinned then diff --git a/src/fsharp/ilx/EraseUnions.fs b/src/fsharp/ilx/EraseUnions.fs index 580461805cd..2ed77f2d9e5 100644 --- a/src/fsharp/ilx/EraseUnions.fs +++ b/src/fsharp/ilx/EraseUnions.fs @@ -406,7 +406,7 @@ let mkIsData ilg (avoidHelpers, cuspec, cidx) = match cidx with | TagNil -> mkGetTailOrNull avoidHelpers cuspec @ [ AI_ldnull; AI_ceq ] | TagCons -> mkGetTailOrNull avoidHelpers cuspec @ [ AI_ldnull; AI_cgt_un ] - | _ -> failwith "unexpected" + | _ -> failwith "mkIsData - unexpected" type ICodeGen<'Mark> = abstract CodeLabel: 'Mark -> ILCodeLabel @@ -454,7 +454,7 @@ let mkBrIsData ilg sense (avoidHelpers, cuspec,cidx,tg) = match cidx with | TagNil -> mkGetTailOrNull avoidHelpers cuspec @ [I_brcmp (neg,tg)] | TagCons -> mkGetTailOrNull avoidHelpers cuspec @ [ I_brcmp (pos,tg)] - | _ -> failwith "unexpected" + | _ -> failwith "mkBrIsData - unexpected" let emitLdDataTagPrim ilg ldOpt (cg: ICodeGen<'Mark>) (avoidHelpers,cuspec: IlxUnionSpec) = diff --git a/src/fsharp/import.fs b/src/fsharp/import.fs index 810d5093c2a..6766e56f299 100644 --- a/src/fsharp/import.fs +++ b/src/fsharp/import.fs @@ -399,15 +399,19 @@ let ImportProvidedMethodBaseAsILMethodRef (env: ImportMap) (m: range) (mbase: Ta | None -> match mbase.OfType() with | Some _ -> mbase.PApply((fun _ -> ProvidedType.Void), m) - | _ -> failwith "unexpected" + | _ -> failwith "ImportProvidedMethodBaseAsILMethodRef - unexpected" + let genericArity = if mbase.PUntaint((fun x -> x.IsGenericMethod), m) then mbase.PUntaint((fun x -> x.GetGenericArguments().Length), m) else 0 + let callingConv = (if mbase.PUntaint((fun x -> x.IsStatic), m) then ILCallingConv.Static else ILCallingConv.Instance) + let parameters = [ for p in mbase.PApplyArray((fun x -> x.GetParameters()), "GetParameters", m) do yield ImportProvidedTypeAsILType env m (p.PApply((fun p -> p.ParameterType), m)) ] + mkILMethRef (tref, callingConv, mbase.PUntaint((fun x -> x.Name), m), genericArity, parameters, ImportProvidedTypeAsILType env m rty ) #endif diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TypeTestsInPatternMatching.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TypeTestsInPatternMatching.fs new file mode 100644 index 00000000000..d28bc0f6b2b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TypeTestsInPatternMatching.fs @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open FSharp.Test.Compiler + +module TypeTestsInPatternMatching = + + [] + let ``Test codegen for one column of sealed types``() = + FSharp """ +module Test +let TestOneColumnOfTypeTestsWithSealedTypes(x: obj) = + match x with + | :? string -> 1 + | :? int -> 2 + | :? bool -> 3 + | :? float -> 4 + | :? char -> 5 + | _ -> 6 + """ + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method public static int32 TestOneColumnOfTypeTestsWithSealedTypes(object x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: isinst [runtime]System.String + IL_0006: brtrue.s IL_002a + + IL_0008: ldarg.0 + IL_0009: isinst [runtime]System.Int32 + IL_000e: brtrue.s IL_002c + + IL_0010: ldarg.0 + IL_0011: isinst [runtime]System.Boolean + IL_0016: brtrue.s IL_002e + + IL_0018: ldarg.0 + IL_0019: isinst [runtime]System.Double + IL_001e: brtrue.s IL_0030 + + IL_0020: ldarg.0 + IL_0021: isinst [runtime]System.Char + IL_0026: brfalse.s IL_0034 + + IL_0028: br.s IL_0032 + + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.2 + IL_002d: ret + + IL_002e: ldc.i4.3 + IL_002f: ret + + IL_0030: ldc.i4.4 + IL_0031: ret + + IL_0032: ldc.i4.5 + IL_0033: ret + + IL_0034: ldc.i4.6 + IL_0035: ret + } +""" + ] + + + + [] + let ``Test codegen for two columns of sealed types``() = + FSharp """ +module Test +let TestTwoColumnsOfTypeTestsWithSealedTypes(x: obj, y: obj) = + match x, y with + | :? string, :? string -> 1 + | :? int, :? int -> 2 + | :? bool, :? bool -> 3 + | :? float, :? float -> 4 + | :? char, :? char -> 5 + | _ -> 6 + """ + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method public static int32 TestTwoColumnsOfTypeTestsWithSealedTypes(object x, + object y) cil managed + { + + .maxstack 3 + .locals init (string V_0) + IL_0000: ldarg.0 + IL_0001: isinst [runtime]System.String + IL_0006: brfalse.s IL_0014 + + IL_0008: ldarg.1 + IL_0009: isinst [runtime]System.String + IL_000e: stloc.0 + IL_000f: ldloc.0 + IL_0010: brfalse.s IL_005c + + IL_0012: ldc.i4.1 + IL_0013: ret + + IL_0014: ldarg.0 + IL_0015: isinst [runtime]System.Int32 + IL_001a: brfalse.s IL_0026 + + IL_001c: ldarg.1 + IL_001d: isinst [runtime]System.Int32 + IL_0022: brfalse.s IL_005c + + IL_0024: ldc.i4.2 + IL_0025: ret + + IL_0026: ldarg.0 + IL_0027: isinst [runtime]System.Boolean + IL_002c: brfalse.s IL_0038 + + IL_002e: ldarg.1 + IL_002f: isinst [runtime]System.Boolean + IL_0034: brfalse.s IL_005c + + IL_0036: ldc.i4.3 + IL_0037: ret + + IL_0038: ldarg.0 + IL_0039: isinst [runtime]System.Double + IL_003e: brfalse.s IL_004a + + IL_0040: ldarg.1 + IL_0041: isinst [runtime]System.Double + IL_0046: brfalse.s IL_005c + + IL_0048: ldc.i4.4 + IL_0049: ret + + IL_004a: ldarg.0 + IL_004b: isinst [runtime]System.Char + IL_0050: brfalse.s IL_005c + + IL_0052: ldarg.1 + IL_0053: isinst [runtime]System.Char + IL_0058: brfalse.s IL_005c + + IL_005a: ldc.i4.5 + IL_005b: ret + + IL_005c: ldc.i4.6 + IL_005d: ret + } +""" + + ] + + + + + [] + let ``Test codegen for two columns of sealed types with bind``() = + FSharp """ +module Test +let TestTwoColumnsOfTypeTestsWithSealedTypes(x: obj, y: obj) = + match x, y with + | :? string as s1, (:? string as s2) -> s1.Length + s2.Length + | :? int as i1, (:? int as i2) -> i1 + i2 + | :? bool as b1, (:? bool as b2) -> (if b1 then 1 else 0) + (if b2 then 1 else 0) + | :? float as f1, (:? float as f2) -> int f2 + int f2 + | :? char as c1, (:? char as c2) -> int c1 + int c2 + | _ -> 6 + """ + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method public static int32 TestTwoColumnsOfTypeTestsWithSealedTypes(object x, + object y) cil managed + { + + .maxstack 4 + .locals init (string V_0, + string V_1, + string V_2, + int32 V_3, + int32 V_4, + bool V_5, + bool V_6, + float64 V_7, + float64 V_8, + char V_9, + char V_10) + IL_0000: ldarg.0 + IL_0001: isinst [runtime]System.String + IL_0006: brfalse.s IL_002c + + IL_0008: ldarg.1 + IL_0009: isinst [runtime]System.String + IL_000e: stloc.0 + IL_000f: ldloc.0 + IL_0010: brfalse IL_00d8 + + IL_0015: ldloc.0 + IL_0016: stloc.1 + IL_0017: ldarg.0 + IL_0018: unbox.any [runtime]System.String + IL_001d: stloc.2 + IL_001e: ldloc.2 + IL_001f: callvirt instance int32 [runtime]System.String::get_Length() + IL_0024: ldloc.1 + IL_0025: callvirt instance int32 [runtime]System.String::get_Length() + IL_002a: add + IL_002b: ret + + IL_002c: ldarg.0 + IL_002d: isinst [runtime]System.Int32 + IL_0032: brfalse.s IL_0053 + + IL_0034: ldarg.1 + IL_0035: isinst [runtime]System.Int32 + IL_003a: brfalse IL_00d8 + + IL_003f: ldarg.1 + IL_0040: unbox.any [runtime]System.Int32 + IL_0045: stloc.3 + IL_0046: ldarg.0 + IL_0047: unbox.any [runtime]System.Int32 + IL_004c: stloc.s V_4 + IL_004e: ldloc.s V_4 + IL_0050: ldloc.3 + IL_0051: add + IL_0052: ret + + IL_0053: ldarg.0 + IL_0054: isinst [runtime]System.Boolean + IL_0059: brfalse.s IL_0088 + + IL_005b: ldarg.1 + IL_005c: isinst [runtime]System.Boolean + IL_0061: brfalse IL_00d8 + + IL_0066: ldarg.1 + IL_0067: unbox.any [runtime]System.Boolean + IL_006c: stloc.s V_5 + IL_006e: ldarg.0 + IL_006f: unbox.any [runtime]System.Boolean + IL_0074: stloc.s V_6 + IL_0076: ldloc.s V_6 + IL_0078: brfalse.s IL_007d + + IL_007a: ldc.i4.1 + IL_007b: br.s IL_007e + + IL_007d: ldc.i4.0 + IL_007e: ldloc.s V_5 + IL_0080: brfalse.s IL_0085 + + IL_0082: ldc.i4.1 + IL_0083: br.s IL_0086 + + IL_0085: ldc.i4.0 + IL_0086: add + IL_0087: ret + + IL_0088: ldarg.0 + IL_0089: isinst [runtime]System.Double + IL_008e: brfalse.s IL_00b0 + + IL_0090: ldarg.1 + IL_0091: isinst [runtime]System.Double + IL_0096: brfalse.s IL_00d8 + + IL_0098: ldarg.1 + IL_0099: unbox.any [runtime]System.Double + IL_009e: stloc.s V_7 + IL_00a0: ldarg.0 + IL_00a1: unbox.any [runtime]System.Double + IL_00a6: stloc.s V_8 + IL_00a8: ldloc.s V_7 + IL_00aa: conv.i4 + IL_00ab: ldloc.s V_7 + IL_00ad: conv.i4 + IL_00ae: add + IL_00af: ret + + IL_00b0: ldarg.0 + IL_00b1: isinst [runtime]System.Char + IL_00b6: brfalse.s IL_00d8 + + IL_00b8: ldarg.1 + IL_00b9: isinst [runtime]System.Char + IL_00be: brfalse.s IL_00d8 + + IL_00c0: ldarg.1 + IL_00c1: unbox.any [runtime]System.Char + IL_00c6: stloc.s V_9 + IL_00c8: ldarg.0 + IL_00c9: unbox.any [runtime]System.Char + IL_00ce: stloc.s V_10 + IL_00d0: ldloc.s V_10 + IL_00d2: conv.i4 + IL_00d3: ldloc.s V_9 + IL_00d5: conv.i4 + IL_00d6: add + IL_00d7: ret + + IL_00d8: ldc.i4.6 + IL_00d9: ret + } +""" + ] \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 461cdbb4924..7659d108169 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -25,6 +25,7 @@ + diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs index 2a981b237f5..249bead6d8d 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs @@ -79,64 +79,62 @@ let ApplyDefaults () = """ (fun verifier -> verifier.VerifyIL [ """ -.method public static void ApplyDefaults() cil managed -{ - - .maxstack 5 - .locals init (int32 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_3, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_5, - bool V_6) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: br.s IL_004b - - IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 DontEliminateForLoops::get_unsolved() - IL_0009: stloc.1 - IL_000a: ldsfld class DontEliminateForLoops/ApplyDefaults@8 DontEliminateForLoops/ApplyDefaults@8::@_instance - IL_000f: stloc.2 - IL_0010: ldloc.1 - IL_0011: stloc.3 - IL_0012: ldloc.3 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001c: stloc.s V_5 - IL_001e: ldloc.s V_5 - IL_0020: ldnull - IL_0021: cgt.un - IL_0023: brfalse.s IL_0047 - - IL_0025: ldloc.s V_4 - IL_0027: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_002c: stloc.s V_6 - IL_002e: ldloc.2 - IL_002f: ldloc.s V_6 - IL_0031: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0036: pop - IL_0037: ldloc.s V_5 - IL_0039: stloc.s V_4 - IL_003b: ldloc.s V_4 - IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0042: stloc.s V_5 - IL_0044: nop - IL_0045: br.s IL_001e - - IL_0047: ldloc.0 - IL_0048: ldc.i4.1 - IL_0049: add - IL_004a: stloc.0 - IL_004b: ldloc.0 - IL_004c: ldc.i4.1 - IL_004d: ldc.i4.s 10 - IL_004f: add - IL_0050: blt.s IL_0004 + .method public static void ApplyDefaults() cil managed + { - IL_0052: ret -} + .maxstack 5 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_3, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_5, + bool V_6) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: br.s IL_0048 + + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 DontEliminateForLoops::get_unsolved() + IL_0009: stloc.1 + IL_000a: ldsfld class DontEliminateForLoops/ApplyDefaults@8 DontEliminateForLoops/ApplyDefaults@8::@_instance + IL_000f: stloc.2 + IL_0010: ldloc.1 + IL_0011: stloc.3 + IL_0012: ldloc.3 + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001c: stloc.s V_5 + IL_001e: ldloc.s V_5 + IL_0020: brfalse.s IL_0044 + + IL_0022: ldloc.s V_4 + IL_0024: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0029: stloc.s V_6 + IL_002b: ldloc.2 + IL_002c: ldloc.s V_6 + IL_002e: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0033: pop + IL_0034: ldloc.s V_5 + IL_0036: stloc.s V_4 + IL_0038: ldloc.s V_4 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003f: stloc.s V_5 + IL_0041: nop + IL_0042: br.s IL_001e + + IL_0044: ldloc.0 + IL_0045: ldc.i4.1 + IL_0046: add + IL_0047: stloc.0 + IL_0048: ldloc.0 + IL_0049: ldc.i4.1 + IL_004a: ldc.i4.s 10 + IL_004c: add + IL_004d: blt.s IL_0004 + + IL_004f: ret + } """ ]) diff --git a/tests/fsharp/core/patterns/test.fsx b/tests/fsharp/core/patterns/test.fsx index b22584c0b99..2f3ccd13ec5 100644 --- a/tests/fsharp/core/patterns/test.fsx +++ b/tests/fsharp/core/patterns/test.fsx @@ -1361,6 +1361,373 @@ module StructActivePatternTest = (* check for failure else sign off "ok" *) +let TestOneColumnOfTypeTestsWithSealedTypes(x: obj) = + match x with + | :? string -> 1 + | :? int -> 2 + | :? bool -> 3 + | :? float -> 4 + | :? char -> 5 + | _ -> 6 + +check "clkjcepw321" (TestOneColumnOfTypeTestsWithSealedTypes (box "a")) 1 +check "clkjcepw322" (TestOneColumnOfTypeTestsWithSealedTypes (box 1)) 2 +check "clkjcepw323" (TestOneColumnOfTypeTestsWithSealedTypes (box true)) 3 +check "clkjcepw324" (TestOneColumnOfTypeTestsWithSealedTypes (box 5.0)) 4 +check "clkjcepw325" (TestOneColumnOfTypeTestsWithSealedTypes (box 'a')) 5 +check "clkjcepw326" (TestOneColumnOfTypeTestsWithSealedTypes (box 5.0f)) 6 + + + +let TestTwoColumnsOfTypeTestsWithSealedTypes(x: obj, y: obj) = + match x, y with + | :? string, :? string -> 1 + | :? int, :? int -> 2 + | :? bool, :? bool -> 3 + | :? float, :? float -> 4 + | :? char, :? char -> 5 + | _ -> 6 + +check "clkjcepw3211" (TestTwoColumnsOfTypeTestsWithSealedTypes (box "a", box "a")) 1 +check "clkjcepw3222" (TestTwoColumnsOfTypeTestsWithSealedTypes (box 1, box 1)) 2 +check "clkjcepw3233" (TestTwoColumnsOfTypeTestsWithSealedTypes (box true, box true)) 3 +check "clkjcepw3244" (TestTwoColumnsOfTypeTestsWithSealedTypes (box 5.0, box 5.0)) 4 +check "clkjcepw3255" (TestTwoColumnsOfTypeTestsWithSealedTypes (box 'a', box 'a')) 5 +check "clkjcepw3266" (TestTwoColumnsOfTypeTestsWithSealedTypes (box 5.0, box 2)) 6 +check "clkjcepw3267" (TestTwoColumnsOfTypeTestsWithSealedTypes (box 5.0, box "a")) 6 +check "clkjcepw3268" (TestTwoColumnsOfTypeTestsWithSealedTypes (null, box "a")) 6 + +let TestColumnOfTypeTestsWithSealedTypesAndBind(x: obj, y: obj) = + match x, y with + | :? string as s1, (:? string as s2) -> s1.Length + s2.Length + | :? int as i1, (:? int as i2) -> i1 + i2 + | :? bool as b1, (:? bool as b2) -> (if b1 then 1 else 0) + (if b2 then 1 else 0) + | :? float as f1, (:? float as f2) -> int f2 + int f2 + | :? char as c1, (:? char as c2) -> int c1 + int c2 + | _ -> 6 + +check "clkjcepwx3211" (TestColumnOfTypeTestsWithSealedTypesAndBind (box "a", box "a")) 2 +check "clkjcepwx3222" (TestColumnOfTypeTestsWithSealedTypesAndBind (box 1, box 1)) 2 +check "clkjcepwx3233" (TestColumnOfTypeTestsWithSealedTypesAndBind (box true, box true)) 2 +check "clkjcepwx3244" (TestColumnOfTypeTestsWithSealedTypesAndBind (box 5.0, box 5.0)) 10 +check "clkjcepwx3255" (TestColumnOfTypeTestsWithSealedTypesAndBind (box 'a', box 'a')) 194 +check "clkjcepwx3266" (TestColumnOfTypeTestsWithSealedTypesAndBind (box 5.0, box 2)) 6 +check "clkjcepwx3267" (TestColumnOfTypeTestsWithSealedTypesAndBind (box 5.0, box "a")) 6 +check "clkjcepwx3268" (TestColumnOfTypeTestsWithSealedTypesAndBind (null, box "a")) 6 + +module TypeTests = + type A() = + member _.Code = 10 + + type B1() = + inherit A() + member _.Code = 11 + + type B2() = + inherit A() + interface System.IComparable with member _.CompareTo(y) = 0 + member _.Code = 12 + + [] + type C1() = + inherit B1() + member _.Code = 13 + + [] + type C2() = + inherit B2() + interface System.IComparable with member _.CompareTo(y) = 0 + member _.Code = 14 + + [] + type D() = + interface System.IComparable with member _.CompareTo(y) = 0 + member _.Code = 15 + + let TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes(x: obj) = + match x with + | null -> 0 + | :? C1 -> 1 + | :? C2 -> 2 + | :? B1 -> 3 + | :? B2 -> 4 + | :? A -> 5 + | _ -> 6 + + check "aclkjcepw321" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes null) 0 + check "aclkjcepw321" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes (C1())) 1 + check "aclkjcepw322" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes (C2())) 2 + check "aclkjcepw323" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes (B1())) 3 + check "aclkjcepw324" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes (B2())) 4 + check "aclkjcepw325" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes (A())) 5 + check "aclkjcepw326" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes "") 6 + + + let TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind(x: obj) = + match x with + | null -> 0 + | :? C1 as v -> v.Code + | :? C2 as v -> v.Code + | :? B1 as v -> v.Code + | :? B2 as v -> v.Code + | :? A as v -> v.Code + | _ -> 6 + + check "waclkjcepw321" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind null) 0 + check "waclkjcepw321" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind (C1())) 13 + check "waclkjcepw322" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind (C2())) 14 + check "waclkjcepw323" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind (B1())) 11 + check "waclkjcepw324" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind (B2())) 12 + check "waclkjcepw325" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind (A())) 10 + check "waclkjcepw326" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind "") 6 + + let TestOneColumnOfTypeTestsWithUnSealedClassTypes(x: obj) = + match x with + | :? C1 -> 1 + | :? C2 -> 2 + | :? B1 -> 3 + | :? B2 -> 4 + | :? A -> 5 + | _ -> 6 + + check "eaclkjcepw321" (TestOneColumnOfTypeTestsWithUnSealedClassTypes null) 6 + check "eaclkjcepw321" (TestOneColumnOfTypeTestsWithUnSealedClassTypes (C1())) 1 + check "eaclkjcepw322" (TestOneColumnOfTypeTestsWithUnSealedClassTypes (C2())) 2 + check "eaclkjcepw323" (TestOneColumnOfTypeTestsWithUnSealedClassTypes (B1())) 3 + check "eaclkjcepw324" (TestOneColumnOfTypeTestsWithUnSealedClassTypes (B2())) 4 + check "eaclkjcepw325" (TestOneColumnOfTypeTestsWithUnSealedClassTypes (A())) 5 + check "eaclkjcepw326" (TestOneColumnOfTypeTestsWithUnSealedClassTypes "") 6 + + + let TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes(x: obj, y: obj) = + match x, y with + | null, null -> 0 + | :? C1, :? C1 -> 1 + | :? C2, :? C2 -> 2 + | :? B1, :? B1 -> 3 + | :? B2, :? B2 -> 4 + | :? A, :? A -> 5 + | _ -> 6 + + check "rclkjcepwx3211a" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, null)) 0 + check "rclkjcepwx3211a" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (box (C1()), box (C1()))) 1 + check "rclkjcepwx3222a" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (box (C2()), box (C2()))) 2 + check "rclkjcepwx3233a" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (box (B1()), box (B1()))) 3 + check "rclkjcepwx3244a" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (box (B2()), box (B2()))) 4 + check "rclkjcepwx3255a" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (box (A()), box (A()))) 5 + check "rclkjcepwx3211b" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, box (C1()))) 6 + check "rclkjcepwx3211b" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, box (C2()))) 6 + check "rclkjcepwx3211b" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, box (B1()))) 6 + check "rclkjcepwx3211b" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, box (B2()))) 6 + check "rclkjcepwx3211b" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, box (A()))) 6 + check "rclkjcepwx3268b" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, box "a")) 6 + + let TestTwoColumnOfTypeTestsWithUnSealedClassTypes(x: obj, y: obj) = + match x, y with + | :? C1, :? C1 -> 1 + | :? C2, :? C2 -> 2 + | :? B1, :? B1 -> 3 + | :? B2, :? B2 -> 4 + | :? A, :? A -> 5 + | _ -> 6 + + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, null)) 6 + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (box (C1()), box (C1()))) 1 + check "trclkjcepwx3222" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (box (C2()), box (C2()))) 2 + check "trclkjcepwx3233" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (box (B1()), box (B1()))) 3 + check "trclkjcepwx3244" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (box (B2()), box (B2()))) 4 + check "trclkjcepwx3255" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (box (A()), box (A()))) 5 + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, box (C1()))) 6 + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, box (C2()))) 6 + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, box (B1()))) 6 + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, box (B2()))) 6 + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, box (A()))) 6 + check "trclkjcepwx3268" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, box "a")) 6 + + let TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind(x: obj, y: obj) = + match x, y with + | :? C1 as v1, (:? C1 as v2) -> v1.Code + v2.Code + | :? C2 as v1, (:? C2 as v2) -> v1.Code + v2.Code + | :? B1 as v1, (:? B1 as v2) -> v1.Code + v2.Code + | :? B1 as v1, (:? B2 as v2) -> v1.Code + v2.Code + | :? B2 as v1, (:? B1 as v2) -> v1.Code + v2.Code + | :? B2 as v1, (:? B2 as v2) -> v1.Code + v2.Code + | :? A as v1, (:? A as v2) -> v1.Code + v2.Code + | _ -> 6 + + check "ytrclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (C1()), box (C1()))) 26 + check "ytrclkjcepwx3222" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (C2()), box (C2()))) 28 + check "ytrclkjcepwx3233" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (B1()), box (B1()))) 22 + check "ytrclkjcepwx3233" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (B1()), box (B2()))) 23 + check "ytrclkjcepwx3233" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (B2()), box (B1()))) 23 + check "ytrclkjcepwx3244" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (B2()), box (B2()))) 24 + check "ytrclkjcepwx3255" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (A()), box (B1()))) 20 + check "ytrclkjcepwx3255" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (A()), box (A()))) 20 + check "ytrclkjcepwx3255" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (B1()), box (A()))) 20 + check "ytrclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (null, null)) 6 + + let TestOneColumnOfTypeTestsWithNullTrueValue(x: obj) = + match x with + | null -> 100 + | :? option -> 200 + | :? option -> 300 + | _ -> 500 + + check "vwewevwe11" (TestOneColumnOfTypeTestsWithNullTrueValue null) 100 + check "vwewevwe12" (TestOneColumnOfTypeTestsWithNullTrueValue (None: option)) 100 + check "vwewevwe13" (TestOneColumnOfTypeTestsWithNullTrueValue (None: option)) 100 + check "vwewevwe14" (TestOneColumnOfTypeTestsWithNullTrueValue (Some(3))) 200 + check "vwewevwe15" (TestOneColumnOfTypeTestsWithNullTrueValue (Some("3"))) 300 + check "vwewevwe16" (TestOneColumnOfTypeTestsWithNullTrueValue (Some(3.4))) 500 + + let TestTwoColumnsOfTypeTestsWithNullTrueValue(x: obj, y :obj) = + match x, y with + | null, null -> 100 + | :? option, :? option -> 200 + | :? option, :? option -> 300 + | :? option, :? option -> 400 + | _ -> 500 + + check "vwewevwe111" (TestTwoColumnsOfTypeTestsWithNullTrueValue (null, null)) 100 + check "vwewevwe122" (TestTwoColumnsOfTypeTestsWithNullTrueValue ((None: option), (None: option))) 100 + check "vwewevwe133" (TestTwoColumnsOfTypeTestsWithNullTrueValue ((None: option), (None: option))) 100 + check "vwewevwe144" (TestTwoColumnsOfTypeTestsWithNullTrueValue (Some(3), Some(3))) 200 + check "vwewevwe155" (TestTwoColumnsOfTypeTestsWithNullTrueValue (Some("3"), Some("3"))) 300 + check "vwewevwe166" (TestTwoColumnsOfTypeTestsWithNullTrueValue (Some(3.4), Some(3.4))) 500 + + let TestColumnOfTypeTestsWithNullAfterFirst(x: obj) = + match x with + | :? string -> 100 + | null -> 200 + | _ -> 500 + + check "vwewevwe1221" (TestColumnOfTypeTestsWithNullAfterFirst "a") 100 + check "vwewevwe1112" (TestColumnOfTypeTestsWithNullAfterFirst null) 200 + check "vwewevwe1333" (TestColumnOfTypeTestsWithNullAfterFirst 3) 500 + + let OneColumnOfTypeTestsInvolvingInterfacesAndSealed (x: obj) = + match x with + | :? string -> 1 + | :? System.IComparable -> 2 + | g -> 3 + + check "vwewevwe122t" (OneColumnOfTypeTestsInvolvingInterfacesAndSealed "a") 1 + check "vwewevwe133t" (OneColumnOfTypeTestsInvolvingInterfacesAndSealed 3) 2 + check "vwewevwe133t" (OneColumnOfTypeTestsInvolvingInterfacesAndSealed 3.14) 2 + check "vwewevwe111t" (OneColumnOfTypeTestsInvolvingInterfacesAndSealed null) 3 + + /// Note, some expansion does occur in this case. The first column-based type-test [A, IComparable] yields little frontier reduction + /// Failing A can't rule out IComparable (of course) + /// Succeeding A can't rule out IComparable (not sealed) + /// So IComparable frontiers end up duplicated + let TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (x: obj, y: obj) = + match x, y with + | :? A, :? A -> 1 + | :? System.IComparable, :? System.IComparable -> 2 + | :? A, :? System.IComparable -> 3 + | _ -> 4 + + // Note - + // A doesn't support IComparable + // B1 is a subtype of A and doesn't support IComparable + // B2 is a subtype of A and does support IComparable + // D is unrelated class and does support IComparable + check "vwewevwe122t1" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (A(), A())) 1 + check "vwewevwe122t2" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (A(), B1())) 1 + check "vwewevwe122t3" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (A(), B2())) 1 + check "vwewevwe122t4" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (B2(), B2())) 1 + check "vwewevwe122t5" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (C2(), B2())) 1 + check "vwewevwe122t6" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (B2(), D())) 2 + check "vwewevwe122t7" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (A(), D())) 3 + check "vwewevwe122t8" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (D(), A())) 4 + check "vwewevwe122t9" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (D(), D())) 2 + check "vwewevwe111tA" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (null, null)) 4 + +module ExampleThatGeneratedExponentialCode = + type Foo = | Foo + type Bar = | Bar + type Baz = | Baz + type Alpha = | Alpha + type Beta = | Beta + type Gamma = | Gamma + type Delta = | Delta + + type TypeA<'a> = + | A of 'a + + type TypeB<'a> = + | B of 'a + + type IntA = TypeA + type IntB = TypeB + + type FloatA = TypeA + type FloatB = TypeB + + type StringA = TypeA + type StringB = TypeB + + type DecimalA = TypeA + type DecimalB = TypeB + + type ByteA = TypeA + type ByteB = TypeB + + type Int64A = TypeA + type Int64B = TypeB + + type Float32A = TypeA + type Float32B = TypeB + + type CharA = TypeA + type CharB = TypeB + + type FooA = TypeA + type FooB = TypeB + + type BarA = TypeA + type BarB = TypeB + + type BazA = TypeA + type BazB = TypeB + + type AlphaA = TypeA + type AlphaB = TypeB + + type BetaA = TypeA + type BetaB = TypeB + + type GammaA = TypeA + type GammaB = TypeB + + type DeltaA = TypeA + type DeltaB = TypeB + + let performMatch valueA valueB = + match box valueA, box valueB with + | :? IntA as a, :? IntB as b -> "1" + | :? FloatA as a, :? FloatB as b -> "2" + | :? StringA as a, :? StringB as b -> "3" + | :? DecimalA as a, :? DecimalB as b -> "4" + | :? ByteA as a, :? ByteB as b -> "5" + | :? Int64A as a, :? Int64B as b -> "6" + | :? Float32A as a, :? Float32B as b -> "2" + | :? CharA as a, :? CharB as b -> "8" + | :? FooA as a, :? FooB as b -> "9" + | :? BarA as a, :? BarB as b -> "A" + | :? BazA as a, :? BazB as b -> "B" + | :? AlphaA as a, :? AlphaB as b -> "C" + | :? BetaB as a, :? BetaB as b -> "D" + | :? GammaA as a, :? GammaB as b -> "E" + | :? DeltaA as a, :? DeltaB as b -> "F" //Comment out this line and the code runs as expected + | _ -> "Failed" + + let x = A Delta + let y = B Delta + + check "f3wev" (performMatch x y) "F" + + #if TESTS_AS_APP let RUN() = !failures #else diff --git a/tests/fsharp/typeProviders/fsharp41/net45/providerDesigner.dll b/tests/fsharp/typeProviders/fsharp41/net45/providerDesigner.dll index 43d16856e51..6c1217f65c0 100644 Binary files a/tests/fsharp/typeProviders/fsharp41/net45/providerDesigner.dll and b/tests/fsharp/typeProviders/fsharp41/net45/providerDesigner.dll differ diff --git a/tests/fsharp/typeProviders/fsharp41/net461/providerDesigner.dll b/tests/fsharp/typeProviders/fsharp41/net461/providerDesigner.dll index 262e9c2e4db..be66328ed47 100644 Binary files a/tests/fsharp/typeProviders/fsharp41/net461/providerDesigner.dll and b/tests/fsharp/typeProviders/fsharp41/net461/providerDesigner.dll differ diff --git a/tests/fsharp/typeProviders/fsharp41/net472/providerDesigner.dll b/tests/fsharp/typeProviders/fsharp41/net472/providerDesigner.dll index f8e612bec9a..3fc00ffeff3 100644 Binary files a/tests/fsharp/typeProviders/fsharp41/net472/providerDesigner.dll and b/tests/fsharp/typeProviders/fsharp41/net472/providerDesigner.dll differ diff --git a/tests/fsharp/typeProviders/fsharp41/net48/providerDesigner.dll b/tests/fsharp/typeProviders/fsharp41/net48/providerDesigner.dll index 587f5f629b6..8d9f90ef421 100644 Binary files a/tests/fsharp/typeProviders/fsharp41/net48/providerDesigner.dll and b/tests/fsharp/typeProviders/fsharp41/net48/providerDesigner.dll differ diff --git a/tests/fsharp/typeProviders/fsharp41/netstandard2.0/providerDesigner.dll b/tests/fsharp/typeProviders/fsharp41/netstandard2.0/providerDesigner.dll index 235336a0325..873999d0e96 100644 Binary files a/tests/fsharp/typeProviders/fsharp41/netstandard2.0/providerDesigner.dll and b/tests/fsharp/typeProviders/fsharp41/netstandard2.0/providerDesigner.dll differ diff --git a/tests/fsharp/typecheck/sigs/neg133.bsl b/tests/fsharp/typecheck/sigs/neg133.bsl index ed51fcc0580..ab7959c8782 100644 --- a/tests/fsharp/typecheck/sigs/neg133.bsl +++ b/tests/fsharp/typecheck/sigs/neg133.bsl @@ -2,3 +2,19 @@ neg133.fs(4,19,4,22): typecheck error FS3521: Invalid member declaration. The name of the member is missing or has parentheses. neg133.fs(7,19,7,27): typecheck error FS3521: Invalid member declaration. The name of the member is missing or has parentheses. + +neg133.fs(28,7,28,17): typecheck error FS0026: This rule will never be matched + +neg133.fs(34,7,34,17): typecheck error FS0026: This rule will never be matched + +neg133.fs(40,7,40,17): typecheck error FS0026: This rule will never be matched + +neg133.fs(46,7,46,20): typecheck error FS0026: This rule will never be matched + +neg133.fs(52,7,52,37): typecheck error FS0026: This rule will never be matched + +neg133.fs(57,7,57,19): typecheck error FS0026: This rule will never be matched + +neg133.fs(63,7,63,19): typecheck error FS0026: This rule will never be matched + +neg133.fs(69,7,69,21): typecheck error FS0026: This rule will never be matched diff --git a/tests/fsharp/typecheck/sigs/neg133.fs b/tests/fsharp/typecheck/sigs/neg133.fs index 5151f488580..99b8c6156df 100644 --- a/tests/fsharp/typecheck/sigs/neg133.fs +++ b/tests/fsharp/typecheck/sigs/neg133.fs @@ -1,7 +1,71 @@ module Neg133 - +open System type T = static member (y) = 0 type U = static member (y: int) = 0 + +type A() = class end + +type B1() = + inherit A() + +type B2() = + inherit A() + +[] +type C1() = + inherit B1() + +[] +type C2() = + inherit B2() + +let TestOneColumnOfTypeTestsWithUnSealedClassTypes_Redundant1(x: obj) = + match x with + | :? A -> 1 + | :? B1 -> 2 // expect - never matched + | _ -> 3 + +let TestOneColumnOfTypeTestsWithUnSealedClassTypes_Redundant2(x: obj) = + match x with + | :? A -> 1 + | :? C1 -> 2 // expect - never matched + | _ -> 3 + +let TestOneColumnOfTypeTestsWithUnSealedClassTypes_Redundant3(x: obj) = + match x with + | :? B1 -> 1 + | :? C1 -> 2 // expect - never matched + | _ -> 3 + +let TestColumnOfTypeTestsWithNullTrueValue_Redundant(x: obj) = + match x with + | :? option -> 0x200 + | null -> 0x100 // expect - never matched + | _ -> 0x500 + +let Misc_Redundant2(x: ValueType) = + match x with + | a -> 2 + | :? Enum & (:? ConsoleKey) -> 1 // expect - never matched + +let Misc_Redundant3(x: ValueType) = + match x with + | :? Enum -> 2 + | :? Enum -> 1 // expect - never matched + | g -> 3 + +let Misc_Redundant4(x: obj) = + match x with + | :? ValueType -> 1 + | :? Enum -> 2 // expect - never matched + | g -> 3 + +let Misc_Redundant5(x: obj) = + match x with + | :? IComparable -> 1 + | :? string -> 2 // expect - never matched + | g -> 3 + diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl index 39e183f3fff..8503e1b52d6 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000780 Length: 0x00000227 } .module CCtorDUWithMember01.exe -// MVID: {61E07031-26F1-14EE-A745-03833170E061} +// MVID: {6220E156-26F1-14EE-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x058B0000 +// Image base: 0x050C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -243,61 +243,55 @@ instance int32 CompareTo(class CCtorDUWithMember01a/C obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 48 (0x30) + // Code size 39 (0x27) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember01a.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0020 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0024 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0019: stloc.1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_000c: stloc.0 + IL_000d: ldarg.1 + IL_000e: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_0013: stloc.1 .line 100001,100001 : 0,0 '' - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un.s IL_0020 + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: bne.un.s IL_001a .line 100001,100001 : 0,0 '' - IL_001e: ldc.i4.0 - IL_001f: ret + IL_0018: ldc.i4.0 + IL_0019: ret .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldloc.1 - IL_0022: sub - IL_0023: ret + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: sub + IL_001d: ret .line 100001,100001 : 0,0 '' - IL_0024: ldc.i4.1 - IL_0025: ret + IL_001e: ldc.i4.1 + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_0026: ldarg.1 - IL_0027: ldnull - IL_0028: cgt.un - IL_002a: brfalse.s IL_002e + IL_0020: ldarg.1 + IL_0021: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0023: ldc.i4.m1 + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.0 - IL_002f: ret + IL_0025: ldc.i4.0 + IL_0026: ret } // end of method C::CompareTo .method public hidebysig virtual final @@ -318,7 +312,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 65 (0x41) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] class CCtorDUWithMember01a/C V_0, [1] int32 V_1, @@ -329,82 +323,74 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0008: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any CCtorDUWithMember01a/C - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0030 + IL_000a: ldarg.1 + IL_000b: unbox.any CCtorDUWithMember01a/C + IL_0010: brfalse.s IL_002a .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_001e: stloc.1 - IL_001f: ldloc.0 - IL_0020: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0025: stloc.2 + IL_0012: ldarg.0 + IL_0013: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_001f: stloc.2 .line 100001,100001 : 0,0 '' - IL_0026: ldloc.1 - IL_0027: ldloc.2 - IL_0028: bne.un.s IL_002c + IL_0020: ldloc.1 + IL_0021: ldloc.2 + IL_0022: bne.un.s IL_0026 .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0024: ldc.i4.0 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_002c: ldloc.1 - IL_002d: ldloc.2 - IL_002e: sub - IL_002f: ret + IL_0026: ldloc.1 + IL_0027: ldloc.2 + IL_0028: sub + IL_0029: ret .line 100001,100001 : 0,0 '' - IL_0030: ldc.i4.1 - IL_0031: ret + IL_002a: ldc.i4.1 + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldarg.1 - IL_0033: unbox.any CCtorDUWithMember01a/C - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: brfalse.s IL_003f + IL_002c: ldarg.1 + IL_002d: unbox.any CCtorDUWithMember01a/C + IL_0032: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.m1 - IL_003e: ret + IL_0034: ldc.i4.m1 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_0036: ldc.i4.0 + IL_0037: ret } // end of method C::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 17 (0x11) + // Code size 14 (0xe) .maxstack 3 .locals init ([0] int32 V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000f + IL_0001: brfalse.s IL_000c .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_000e: ret + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_000b: ret .line 100001,100001 : 0,0 '' - IL_000f: ldc.i4.0 - IL_0010: ret + IL_000c: ldc.i4.0 + IL_000d: ret } // end of method C::GetHashCode .method public hidebysig virtual final @@ -424,7 +410,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 47 (0x2f) + // Code size 44 (0x2c) .maxstack 4 .locals init ([0] class CCtorDUWithMember01a/C V_0, [1] class CCtorDUWithMember01a/C V_1, @@ -432,44 +418,42 @@ [3] int32 V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst CCtorDUWithMember01a/C - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst CCtorDUWithMember01a/C + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0025 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_001f: stloc.3 + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.0 + IL_0010: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_001c: stloc.3 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: ceq - IL_0024: ret + IL_001d: ldloc.2 + IL_001e: ldloc.3 + IL_001f: ceq + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_0022: ldc.i4.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: ret + IL_0024: ldarg.1 + IL_0025: ldnull + IL_0026: cgt.un + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: ret } // end of method C::Equals .method public hidebysig specialname @@ -490,46 +474,42 @@ instance bool Equals(class CCtorDUWithMember01a/C obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 35 (0x23) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0021 + IL_0001: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_001f + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0019 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0019: stloc.1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_000c: stloc.0 + IL_000d: ldarg.1 + IL_000e: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_0013: stloc.1 .line 100001,100001 : 0,0 '' - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: ceq - IL_001e: ret + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: ceq + IL_0018: ret .line 100001,100001 : 0,0 '' - IL_001f: ldc.i4.0 - IL_0020: ret + IL_0019: ldc.i4.0 + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: ldc.i4.0 - IL_0026: ceq - IL_0028: ret + IL_001b: ldarg.1 + IL_001c: ldnull + IL_001d: cgt.un + IL_001f: ldc.i4.0 + IL_0020: ceq + IL_0022: ret } // end of method C::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl index 34fe1c3a684..ff9c17c6517 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000CE0 Length: 0x000002CB } .module CompiledNameAttribute04.exe -// MVID: {61F2D6A5-34DF-584F-A745-0383A5D6F261} +// MVID: {6220CCA3-34DF-584F-A745-0383A3CC2062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07550000 +// Image base: 0x07130000 // =============== CLASS MEMBERS DECLARATION =================== @@ -214,29 +214,32 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 24 (0x18) + // Code size 27 (0x1b) .maxstack 3 - .locals init ([0] valuetype CompiledNameAttribute04/S V_0, - [1] valuetype CompiledNameAttribute04/S& V_1) + .locals init ([0] object V_0, + [1] valuetype CompiledNameAttribute04/S V_1, + [2] valuetype CompiledNameAttribute04/S& V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0016 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst CompiledNameAttribute04/S + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0019 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any CompiledNameAttribute04/S - IL_0010: stloc.0 - IL_0011: ldloca.s V_0 + IL_000d: ldarg.1 + IL_000e: unbox.any CompiledNameAttribute04/S IL_0013: stloc.1 - IL_0014: ldc.i4.1 - IL_0015: ret + IL_0014: ldloca.s V_1 + IL_0016: stloc.2 + IL_0017: ldc.i4.1 + IL_0018: ret .line 100001,100001 : 0,0 '' - IL_0016: ldc.i4.0 - IL_0017: ret + IL_0019: ldc.i4.0 + IL_001a: ret } // end of method S::Equals .method public hidebysig instance !!a @@ -266,28 +269,31 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 27 (0x1b) + // Code size 30 (0x1e) .maxstack 4 - .locals init ([0] valuetype CompiledNameAttribute04/S V_0) + .locals init ([0] object V_0, + [1] valuetype CompiledNameAttribute04/S V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0019 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst CompiledNameAttribute04/S + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any CompiledNameAttribute04/S - IL_0010: stloc.0 - IL_0011: ldarg.0 - IL_0012: ldloc.0 - IL_0013: call instance bool CompiledNameAttribute04/S::Equals(valuetype CompiledNameAttribute04/S) - IL_0018: ret + IL_000d: ldarg.1 + IL_000e: unbox.any CompiledNameAttribute04/S + IL_0013: stloc.1 + IL_0014: ldarg.0 + IL_0015: ldloc.1 + IL_0016: call instance bool CompiledNameAttribute04/S::Equals(valuetype CompiledNameAttribute04/S) + IL_001b: ret .line 100001,100001 : 0,0 '' - IL_0019: ldc.i4.0 - IL_001a: ret + IL_001c: ldc.i4.0 + IL_001d: ret } // end of method S::Equals } // end of class S diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl index a752dfe4d88..643950ec138 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001C8 Length: 0x0000006B } .module AnonRecd.exe -// MVID: {61E07031-C42F-5208-A745-03833170E061} +// MVID: {6220E156-C42F-5208-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07100000 +// Image base: 0x072D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -161,78 +161,72 @@ instance int32 CompareTo(class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 84 (0x54) + // Code size 75 (0x4b) .maxstack 5 .locals init ([0] int32 V_0) .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\unknown' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004a + IL_0001: brfalse.s IL_0044 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0048 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 .line 100001,100001 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: ldarg.0 + IL_0006: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 IL_0012: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0017: ldarg.1 - IL_0018: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_001d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0022: stloc.0 + IL_001c: stloc.0 .line 100001,100001 : 0,0 '' - IL_0023: ldloc.0 - IL_0024: ldc.i4.0 - IL_0025: bge.s IL_0029 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.0 - IL_0028: ret + IL_0021: ldloc.0 + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0029: ldloc.0 - IL_002a: ldc.i4.0 - IL_002b: ble.s IL_002f + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 .line 100001,100001 : 0,0 '' - IL_002d: ldloc.0 - IL_002e: ret + IL_0027: ldloc.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0034: ldarg.0 + IL_0029: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 IL_0035: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_003a: ldarg.1 - IL_003b: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0040: tail. - IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0047: ret + IL_0041: ret .line 100001,100001 : 0,0 '' - IL_0048: ldc.i4.1 - IL_0049: ret + IL_0042: ldc.i4.1 + IL_0043: ret .line 100001,100001 : 0,0 '' - IL_004a: ldarg.1 - IL_004b: ldnull - IL_004c: cgt.un - IL_004e: brfalse.s IL_0052 + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 .line 100001,100001 : 0,0 '' - IL_0050: ldc.i4.m1 - IL_0051: ret + IL_0047: ldc.i4.m1 + IL_0048: ret .line 100001,100001 : 0,0 '' - IL_0052: ldc.i4.0 - IL_0053: ret + IL_0049: ldc.i4.0 + IL_004a: ret } // end of method '<>f__AnonymousType1912756633`2'::CompareTo .method public hidebysig virtual final @@ -254,7 +248,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 95 (0x5f) + // Code size 86 (0x56) .maxstack 5 .locals init ([0] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_0, [1] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_1, @@ -267,131 +261,123 @@ IL_0008: stloc.1 .line 100001,100001 : 0,0 '' IL_0009: ldarg.0 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse.s IL_0050 + IL_000a: brfalse.s IL_004a .line 100001,100001 : 0,0 '' - IL_000f: ldarg.1 - IL_0010: unbox.any class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> - IL_0015: ldnull - IL_0016: cgt.un - IL_0018: brfalse.s IL_004e + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 .line 100001,100001 : 0,0 '' - IL_001a: ldarg.2 - IL_001b: ldarg.0 + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 IL_001c: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0021: ldloc.1 - IL_0022: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0027: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_002c: stloc.2 + IL_0026: stloc.2 .line 100001,100001 : 0,0 '' - IL_002d: ldloc.2 - IL_002e: ldc.i4.0 - IL_002f: bge.s IL_0033 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d .line 100001,100001 : 0,0 '' - IL_0031: ldloc.2 - IL_0032: ret + IL_002b: ldloc.2 + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_0033: ldloc.2 - IL_0034: ldc.i4.0 - IL_0035: ble.s IL_0039 + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0037: ldloc.2 - IL_0038: ret + IL_0031: ldloc.2 + IL_0032: ret .line 100001,100001 : 0,0 '' - IL_0039: ldarg.2 - IL_003a: ldarg.0 + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 IL_003b: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0040: ldloc.1 - IL_0041: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0046: tail. - IL_0048: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_004d: ret + IL_0047: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.1 - IL_004f: ret + IL_0048: ldc.i4.1 + IL_0049: ret .line 100001,100001 : 0,0 '' - IL_0050: ldarg.1 - IL_0051: unbox.any class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> - IL_0056: ldnull - IL_0057: cgt.un - IL_0059: brfalse.s IL_005d + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 .line 100001,100001 : 0,0 '' - IL_005b: ldc.i4.m1 - IL_005c: ret + IL_0052: ldc.i4.m1 + IL_0053: ret .line 100001,100001 : 0,0 '' - IL_005d: ldc.i4.0 - IL_005e: ret + IL_0054: ldc.i4.0 + IL_0055: ret } // end of method '<>f__AnonymousType1912756633`2'::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 66 (0x42) + // Code size 63 (0x3f) .maxstack 7 .locals init ([0] int32 V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0040 - - .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: ldarg.0 - IL_000f: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0014: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + IL_0001: brfalse.s IL_003d + + .line 100001,100001 : 0,0 '' + 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 [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldarg.1 - IL_0029: ldarg.0 - IL_002a: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_002f: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + 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 [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl IL_0034: ldloc.0 - IL_0035: ldc.i4.6 - IL_0036: shl - IL_0037: ldloc.0 - IL_0038: ldc.i4.2 - IL_0039: shr - IL_003a: add - IL_003b: add - IL_003c: add - IL_003d: stloc.0 - IL_003e: ldloc.0 - IL_003f: ret + 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 .line 100001,100001 : 0,0 '' - IL_0040: ldc.i4.0 - IL_0041: ret + IL_003d: ldc.i4.0 + IL_003e: ret } // end of method '<>f__AnonymousType1912756633`2'::GetHashCode .method public hidebysig virtual final @@ -412,119 +398,113 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 71 (0x47) + // Code size 68 (0x44) .maxstack 5 .locals init ([0] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_0, [1] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003f + IL_0001: brfalse.s IL_003c .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003d + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.2 - IL_0013: ldarg.0 - IL_0014: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0019: ldloc.1 - IL_001a: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_001f: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + IL_000d: ldloc.0 + IL_000e: stloc.1 + .line 100001,100001 : 0,0 '' + IL_000f: ldarg.2 + IL_0010: ldarg.0 + IL_0011: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0016: ldloc.1 + IL_0017: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_001c: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_0024: brfalse.s IL_003b + IL_0021: brfalse.s IL_0038 .line 100001,100001 : 0,0 '' - IL_0026: ldarg.2 - IL_0027: ldarg.0 - IL_0028: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_002d: ldloc.1 - IL_002e: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0033: tail. - IL_0035: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + IL_0023: ldarg.2 + IL_0024: ldarg.0 + IL_0025: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_002a: ldloc.1 + IL_002b: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0030: tail. + IL_0032: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_003a: ret + IL_0037: ret .line 100001,100001 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_0038: ldc.i4.0 + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.0 - IL_003e: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_003f: ldarg.1 - IL_0040: ldnull - IL_0041: cgt.un - IL_0043: ldc.i4.0 - IL_0044: ceq - IL_0046: ret + IL_003c: ldarg.1 + IL_003d: ldnull + IL_003e: cgt.un + IL_0040: ldc.i4.0 + IL_0041: ceq + IL_0043: ret } // end of method '<>f__AnonymousType1912756633`2'::Equals .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 57 (0x39) .maxstack 8 .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0031 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0035 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 IL_000d: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0012: ldarg.1 - IL_0013: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0018: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, !!0) - IL_001d: brfalse.s IL_0033 + IL_0017: brfalse.s IL_002d .line 100001,100001 : 0,0 '' - IL_001f: ldarg.0 + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 IL_0020: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0025: ldarg.1 - IL_0026: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_002b: tail. - IL_002d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, !!0) - IL_0032: ret + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_002d: ldc.i4.0 + IL_002e: ret .line 100001,100001 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 100001,100001 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret } // end of method '<>f__AnonymousType1912756633`2'::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl index e54889aaaf5..657af9082f0 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000640 Length: 0x000001C7 } .module EqualsOnUnions01.exe -// MVID: {61EFEE1F-BBFB-14A0-A745-03831FEEEF61} +// MVID: {6220E156-BBFB-14A0-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06940000 +// Image base: 0x06E00000 // =============== CLASS MEMBERS DECLARATION =================== @@ -339,7 +339,7 @@ instance int32 CompareTo(class EqualsOnUnions01/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 131 (0x83) + // Code size 122 (0x7a) .maxstack 4 .locals init ([0] int32 V_0, [1] class EqualsOnUnions01/U V_1, @@ -353,106 +353,100 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\EqualsOnUnions01.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_0079 + IL_0001: brfalse IL_0073 .line 100001,100001 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse.s IL_0077 - - .line 100001,100001 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.1 - IL_0011: ldloc.1 - IL_0012: isinst EqualsOnUnions01/U/B - IL_0017: brfalse.s IL_001c - - IL_0019: ldc.i4.1 - IL_001a: br.s IL_001d - - IL_001c: ldc.i4.0 - IL_001d: stloc.0 - IL_001e: ldarg.1 - IL_001f: stloc.3 - IL_0020: ldloc.3 - IL_0021: isinst EqualsOnUnions01/U/B - IL_0026: brfalse.s IL_002b - - IL_0028: ldc.i4.1 - IL_0029: br.s IL_002c - - IL_002b: ldc.i4.0 - IL_002c: stloc.2 + IL_0006: ldarg.1 + IL_0007: brfalse.s IL_0071 + + .line 100001,100001 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: stloc.1 + IL_000b: ldloc.1 + IL_000c: isinst EqualsOnUnions01/U/B + IL_0011: brfalse.s IL_0016 + + IL_0013: ldc.i4.1 + IL_0014: br.s IL_0017 + + IL_0016: ldc.i4.0 + IL_0017: stloc.0 + IL_0018: ldarg.1 + IL_0019: stloc.3 + IL_001a: ldloc.3 + IL_001b: isinst EqualsOnUnions01/U/B + IL_0020: brfalse.s IL_0025 + + IL_0022: ldc.i4.1 + IL_0023: br.s IL_0026 + + IL_0025: ldc.i4.0 + IL_0026: stloc.2 + .line 100001,100001 : 0,0 '' + IL_0027: ldloc.0 + IL_0028: ldloc.2 + IL_0029: bne.un.s IL_006d + + .line 100001,100001 : 0,0 '' + IL_002b: ldarg.0 + IL_002c: isinst EqualsOnUnions01/U/B + IL_0031: brfalse.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_0033: ldarg.0 + IL_0034: castclass EqualsOnUnions01/U/B + IL_0039: stloc.s V_4 + IL_003b: ldarg.1 + IL_003c: castclass EqualsOnUnions01/U/B + IL_0041: stloc.s V_5 + IL_0043: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0048: stloc.s V_6 + IL_004a: ldloc.s V_4 + IL_004c: ldfld int32 EqualsOnUnions01/U/B::item + IL_0051: stloc.s V_7 + IL_0053: ldloc.s V_5 + IL_0055: ldfld int32 EqualsOnUnions01/U/B::item + IL_005a: stloc.s V_8 .line 100001,100001 : 0,0 '' - IL_002d: ldloc.0 - IL_002e: ldloc.2 - IL_002f: bne.un.s IL_0073 + IL_005c: ldloc.s V_7 + IL_005e: ldloc.s V_8 + IL_0060: bge.s IL_0064 .line 100001,100001 : 0,0 '' - IL_0031: ldarg.0 - IL_0032: isinst EqualsOnUnions01/U/B - IL_0037: brfalse.s IL_0071 + IL_0062: ldc.i4.m1 + IL_0063: ret .line 100001,100001 : 0,0 '' - IL_0039: ldarg.0 - IL_003a: castclass EqualsOnUnions01/U/B - IL_003f: stloc.s V_4 - IL_0041: ldarg.1 - IL_0042: castclass EqualsOnUnions01/U/B - IL_0047: stloc.s V_5 - IL_0049: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004e: stloc.s V_6 - IL_0050: ldloc.s V_4 - IL_0052: ldfld int32 EqualsOnUnions01/U/B::item - IL_0057: stloc.s V_7 - IL_0059: ldloc.s V_5 - IL_005b: ldfld int32 EqualsOnUnions01/U/B::item - IL_0060: stloc.s V_8 - .line 100001,100001 : 0,0 '' - IL_0062: ldloc.s V_7 - IL_0064: ldloc.s V_8 - IL_0066: bge.s IL_006a + IL_0064: ldloc.s V_7 + IL_0066: ldloc.s V_8 + IL_0068: cgt + IL_006a: ret .line 100001,100001 : 0,0 '' - IL_0068: ldc.i4.m1 - IL_0069: ret + IL_006b: ldc.i4.0 + IL_006c: ret .line 100001,100001 : 0,0 '' - IL_006a: ldloc.s V_7 - IL_006c: ldloc.s V_8 - IL_006e: cgt + IL_006d: ldloc.0 + IL_006e: ldloc.2 + IL_006f: sub IL_0070: ret .line 100001,100001 : 0,0 '' - IL_0071: ldc.i4.0 + IL_0071: ldc.i4.1 IL_0072: ret .line 100001,100001 : 0,0 '' - IL_0073: ldloc.0 - IL_0074: ldloc.2 - IL_0075: sub - IL_0076: ret - - .line 100001,100001 : 0,0 '' - IL_0077: ldc.i4.1 - IL_0078: ret - - .line 100001,100001 : 0,0 '' - IL_0079: ldarg.1 - IL_007a: ldnull - IL_007b: cgt.un - IL_007d: brfalse.s IL_0081 + IL_0073: ldarg.1 + IL_0074: brfalse.s IL_0078 .line 100001,100001 : 0,0 '' - IL_007f: ldc.i4.m1 - IL_0080: ret + IL_0076: ldc.i4.m1 + IL_0077: ret .line 100001,100001 : 0,0 '' - IL_0081: ldc.i4.0 - IL_0082: ret + IL_0078: ldc.i4.0 + IL_0079: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -473,7 +467,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 146 (0x92) + // Code size 137 (0x89) .maxstack 4 .locals init ([0] class EqualsOnUnions01/U V_0, [1] int32 V_1, @@ -491,115 +485,109 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse IL_0083 + IL_0008: brfalse IL_007d .line 100001,100001 : 0,0 '' - IL_0010: ldarg.1 - IL_0011: unbox.any EqualsOnUnions01/U - IL_0016: ldnull - IL_0017: cgt.un - IL_0019: brfalse.s IL_0081 + IL_000d: ldarg.1 + IL_000e: unbox.any EqualsOnUnions01/U + IL_0013: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_001b: ldarg.0 - IL_001c: stloc.2 - IL_001d: ldloc.2 - IL_001e: isinst EqualsOnUnions01/U/B - IL_0023: brfalse.s IL_0028 + IL_0015: ldarg.0 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: isinst EqualsOnUnions01/U/B + IL_001d: brfalse.s IL_0022 - IL_0025: ldc.i4.1 - IL_0026: br.s IL_0029 + IL_001f: ldc.i4.1 + IL_0020: br.s IL_0023 - IL_0028: ldc.i4.0 - IL_0029: stloc.1 - IL_002a: ldloc.0 - IL_002b: stloc.s V_4 - IL_002d: ldloc.s V_4 - IL_002f: isinst EqualsOnUnions01/U/B - IL_0034: brfalse.s IL_0039 + IL_0022: ldc.i4.0 + IL_0023: stloc.1 + IL_0024: ldloc.0 + IL_0025: stloc.s V_4 + IL_0027: ldloc.s V_4 + IL_0029: isinst EqualsOnUnions01/U/B + IL_002e: brfalse.s IL_0033 - IL_0036: ldc.i4.1 - IL_0037: br.s IL_003a + IL_0030: ldc.i4.1 + IL_0031: br.s IL_0034 - IL_0039: ldc.i4.0 - IL_003a: stloc.3 + IL_0033: ldc.i4.0 + IL_0034: stloc.3 .line 100001,100001 : 0,0 '' - IL_003b: ldloc.1 - IL_003c: ldloc.3 - IL_003d: bne.un.s IL_007d + IL_0035: ldloc.1 + IL_0036: ldloc.3 + IL_0037: bne.un.s IL_0077 .line 100001,100001 : 0,0 '' - IL_003f: ldarg.0 - IL_0040: isinst EqualsOnUnions01/U/B - IL_0045: brfalse.s IL_007b + IL_0039: ldarg.0 + IL_003a: isinst EqualsOnUnions01/U/B + IL_003f: brfalse.s IL_0075 .line 100001,100001 : 0,0 '' - IL_0047: ldarg.0 - IL_0048: castclass EqualsOnUnions01/U/B - IL_004d: stloc.s V_5 - IL_004f: ldloc.0 - IL_0050: castclass EqualsOnUnions01/U/B - IL_0055: stloc.s V_6 - IL_0057: ldarg.2 - IL_0058: stloc.s V_7 - IL_005a: ldloc.s V_5 - IL_005c: ldfld int32 EqualsOnUnions01/U/B::item - IL_0061: stloc.s V_8 - IL_0063: ldloc.s V_6 - IL_0065: ldfld int32 EqualsOnUnions01/U/B::item - IL_006a: stloc.s V_9 + IL_0041: ldarg.0 + IL_0042: castclass EqualsOnUnions01/U/B + IL_0047: stloc.s V_5 + IL_0049: ldloc.0 + IL_004a: castclass EqualsOnUnions01/U/B + IL_004f: stloc.s V_6 + IL_0051: ldarg.2 + IL_0052: stloc.s V_7 + IL_0054: ldloc.s V_5 + IL_0056: ldfld int32 EqualsOnUnions01/U/B::item + IL_005b: stloc.s V_8 + IL_005d: ldloc.s V_6 + IL_005f: ldfld int32 EqualsOnUnions01/U/B::item + IL_0064: stloc.s V_9 .line 100001,100001 : 0,0 '' - IL_006c: ldloc.s V_8 - IL_006e: ldloc.s V_9 - IL_0070: bge.s IL_0074 + IL_0066: ldloc.s V_8 + IL_0068: ldloc.s V_9 + IL_006a: bge.s IL_006e .line 100001,100001 : 0,0 '' - IL_0072: ldc.i4.m1 - IL_0073: ret + IL_006c: ldc.i4.m1 + IL_006d: ret .line 100001,100001 : 0,0 '' - IL_0074: ldloc.s V_8 - IL_0076: ldloc.s V_9 - IL_0078: cgt - IL_007a: ret + IL_006e: ldloc.s V_8 + IL_0070: ldloc.s V_9 + IL_0072: cgt + IL_0074: ret .line 100001,100001 : 0,0 '' - IL_007b: ldc.i4.0 - IL_007c: ret + IL_0075: ldc.i4.0 + IL_0076: ret .line 100001,100001 : 0,0 '' - IL_007d: ldloc.1 - IL_007e: ldloc.3 - IL_007f: sub - IL_0080: ret + IL_0077: ldloc.1 + IL_0078: ldloc.3 + IL_0079: sub + IL_007a: ret .line 100001,100001 : 0,0 '' - IL_0081: ldc.i4.1 - IL_0082: ret + IL_007b: ldc.i4.1 + IL_007c: ret .line 100001,100001 : 0,0 '' - IL_0083: ldarg.1 - IL_0084: unbox.any EqualsOnUnions01/U - IL_0089: ldnull - IL_008a: cgt.un - IL_008c: brfalse.s IL_0090 + IL_007d: ldarg.1 + IL_007e: unbox.any EqualsOnUnions01/U + IL_0083: brfalse.s IL_0087 .line 100001,100001 : 0,0 '' - IL_008e: ldc.i4.m1 - IL_008f: ret + IL_0085: ldc.i4.m1 + IL_0086: ret .line 100001,100001 : 0,0 '' - IL_0090: ldc.i4.0 - IL_0091: ret + IL_0087: ldc.i4.0 + IL_0088: ret } // end of method U::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 64 (0x40) .maxstack 7 .locals init ([0] int32 V_0, [1] class EqualsOnUnions01/U/B V_1, @@ -607,58 +595,56 @@ [3] class EqualsOnUnions01/U V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0041 + IL_0001: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: isinst EqualsOnUnions01/U/B - IL_000e: brfalse.s IL_0032 - - .line 100001,100001 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: castclass EqualsOnUnions01/U/B - IL_0016: stloc.1 - IL_0017: ldc.i4.1 - IL_0018: stloc.0 - IL_0019: ldc.i4 0x9e3779b9 - IL_001e: ldarg.1 - IL_001f: stloc.2 - IL_0020: ldloc.1 - IL_0021: ldfld int32 EqualsOnUnions01/U/B::item + IL_0005: ldarg.0 + IL_0006: isinst EqualsOnUnions01/U/B + IL_000b: brfalse.s IL_002f + + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.0 + IL_000e: castclass EqualsOnUnions01/U/B + IL_0013: stloc.1 + IL_0014: ldc.i4.1 + IL_0015: stloc.0 + IL_0016: ldc.i4 0x9e3779b9 + IL_001b: ldarg.1 + IL_001c: stloc.2 + IL_001d: ldloc.1 + IL_001e: ldfld int32 EqualsOnUnions01/U/B::item + IL_0023: ldloc.0 + IL_0024: ldc.i4.6 + IL_0025: shl 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 - - .line 100001,100001 : 0,0 '' - IL_0032: ldarg.0 - IL_0033: stloc.3 - IL_0034: ldloc.3 - IL_0035: isinst EqualsOnUnions01/U/B - IL_003a: brfalse.s IL_003f - - IL_003c: ldc.i4.1 - IL_003d: br.s IL_0040 - - IL_003f: ldc.i4.0 - IL_0040: ret - - .line 100001,100001 : 0,0 '' - IL_0041: ldc.i4.0 - IL_0042: ret + IL_0027: ldc.i4.2 + IL_0028: shr + IL_0029: add + IL_002a: add + IL_002b: add + IL_002c: stloc.0 + IL_002d: ldloc.0 + IL_002e: ret + + .line 100001,100001 : 0,0 '' + IL_002f: ldarg.0 + IL_0030: stloc.3 + IL_0031: ldloc.3 + IL_0032: isinst EqualsOnUnions01/U/B + IL_0037: brfalse.s IL_003c + + IL_0039: ldc.i4.1 + IL_003a: br.s IL_003d + + IL_003c: ldc.i4.0 + IL_003d: ret + + .line 100001,100001 : 0,0 '' + IL_003e: ldc.i4.0 + IL_003f: ret } // end of method U::GetHashCode .method public hidebysig virtual final @@ -678,7 +664,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 114 (0x72) + // Code size 111 (0x6f) .maxstack 4 .locals init ([0] class EqualsOnUnions01/U V_0, [1] class EqualsOnUnions01/U V_1, @@ -691,95 +677,93 @@ [8] class [mscorlib]System.Collections.IEqualityComparer V_8) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006a + IL_0001: brfalse.s IL_0067 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst EqualsOnUnions01/U - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst EqualsOnUnions01/U + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0068 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0065 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: stloc.3 - IL_0014: ldloc.3 - IL_0015: isinst EqualsOnUnions01/U/B - IL_001a: brfalse.s IL_001f - - IL_001c: ldc.i4.1 - IL_001d: br.s IL_0020 - - IL_001f: ldc.i4.0 - IL_0020: stloc.2 - IL_0021: ldloc.1 - IL_0022: stloc.s V_5 - IL_0024: ldloc.s V_5 - IL_0026: isinst EqualsOnUnions01/U/B - IL_002b: brfalse.s IL_0030 - - IL_002d: ldc.i4.1 - IL_002e: br.s IL_0031 - - IL_0030: ldc.i4.0 - IL_0031: stloc.s V_4 - .line 100001,100001 : 0,0 '' - IL_0033: ldloc.2 - IL_0034: ldloc.s V_4 - IL_0036: bne.un.s IL_0066 + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.0 + IL_0010: stloc.3 + IL_0011: ldloc.3 + IL_0012: isinst EqualsOnUnions01/U/B + IL_0017: brfalse.s IL_001c - .line 100001,100001 : 0,0 '' - IL_0038: ldarg.0 - IL_0039: isinst EqualsOnUnions01/U/B - IL_003e: brfalse.s IL_0064 + IL_0019: ldc.i4.1 + IL_001a: br.s IL_001d - .line 100001,100001 : 0,0 '' - IL_0040: ldarg.0 - IL_0041: castclass EqualsOnUnions01/U/B - IL_0046: stloc.s V_6 - IL_0048: ldloc.1 - IL_0049: castclass EqualsOnUnions01/U/B - IL_004e: stloc.s V_7 - IL_0050: ldarg.2 - IL_0051: stloc.s V_8 - IL_0053: ldloc.s V_6 - IL_0055: ldfld int32 EqualsOnUnions01/U/B::item - IL_005a: ldloc.s V_7 - IL_005c: ldfld int32 EqualsOnUnions01/U/B::item - IL_0061: ceq - IL_0063: ret + IL_001c: ldc.i4.0 + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: isinst EqualsOnUnions01/U/B + IL_0028: brfalse.s IL_002d + + IL_002a: ldc.i4.1 + IL_002b: br.s IL_002e + + IL_002d: ldc.i4.0 + IL_002e: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0030: ldloc.2 + IL_0031: ldloc.s V_4 + IL_0033: bne.un.s IL_0063 + + .line 100001,100001 : 0,0 '' + IL_0035: ldarg.0 + IL_0036: isinst EqualsOnUnions01/U/B + IL_003b: brfalse.s IL_0061 + + .line 100001,100001 : 0,0 '' + IL_003d: ldarg.0 + IL_003e: castclass EqualsOnUnions01/U/B + IL_0043: stloc.s V_6 + IL_0045: ldloc.1 + IL_0046: castclass EqualsOnUnions01/U/B + IL_004b: stloc.s V_7 + IL_004d: ldarg.2 + IL_004e: stloc.s V_8 + IL_0050: ldloc.s V_6 + IL_0052: ldfld int32 EqualsOnUnions01/U/B::item + IL_0057: ldloc.s V_7 + IL_0059: ldfld int32 EqualsOnUnions01/U/B::item + IL_005e: ceq + IL_0060: ret .line 100001,100001 : 0,0 '' - IL_0064: ldc.i4.1 - IL_0065: ret + IL_0061: ldc.i4.1 + IL_0062: ret .line 100001,100001 : 0,0 '' - IL_0066: ldc.i4.0 - IL_0067: ret + IL_0063: ldc.i4.0 + IL_0064: ret .line 100001,100001 : 0,0 '' - IL_0068: ldc.i4.0 - IL_0069: ret + IL_0065: ldc.i4.0 + IL_0066: ret .line 100001,100001 : 0,0 '' - IL_006a: ldarg.1 - IL_006b: ldnull - IL_006c: cgt.un - IL_006e: ldc.i4.0 - IL_006f: ceq - IL_0071: ret + IL_0067: ldarg.1 + IL_0068: ldnull + IL_0069: cgt.un + IL_006b: ldc.i4.0 + IL_006c: ceq + IL_006e: ret } // end of method U::Equals .method public hidebysig virtual final instance bool Equals(class EqualsOnUnions01/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 101 (0x65) + // Code size 95 (0x5f) .maxstack 4 .locals init ([0] int32 V_0, [1] class EqualsOnUnions01/U V_1, @@ -789,82 +773,78 @@ [5] class EqualsOnUnions01/U/B V_5) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_005d + IL_0001: brfalse.s IL_0057 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_005b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0055 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: isinst EqualsOnUnions01/U/B - IL_0014: brfalse.s IL_0019 + IL_0006: ldarg.0 + IL_0007: stloc.1 + IL_0008: ldloc.1 + IL_0009: isinst EqualsOnUnions01/U/B + IL_000e: brfalse.s IL_0013 - IL_0016: ldc.i4.1 - IL_0017: br.s IL_001a + IL_0010: ldc.i4.1 + IL_0011: br.s IL_0014 - IL_0019: ldc.i4.0 - IL_001a: stloc.0 - IL_001b: ldarg.1 - IL_001c: stloc.3 - IL_001d: ldloc.3 - IL_001e: isinst EqualsOnUnions01/U/B - IL_0023: brfalse.s IL_0028 - - IL_0025: ldc.i4.1 - IL_0026: br.s IL_0029 - - IL_0028: ldc.i4.0 - IL_0029: stloc.2 - .line 100001,100001 : 0,0 '' - IL_002a: ldloc.0 - IL_002b: ldloc.2 - IL_002c: bne.un.s IL_0059 - - .line 100001,100001 : 0,0 '' - IL_002e: ldarg.0 - IL_002f: isinst EqualsOnUnions01/U/B - IL_0034: brfalse.s IL_0057 - - .line 100001,100001 : 0,0 '' - IL_0036: ldarg.0 - IL_0037: castclass EqualsOnUnions01/U/B - IL_003c: stloc.s V_4 - IL_003e: ldarg.1 - IL_003f: castclass EqualsOnUnions01/U/B - IL_0044: stloc.s V_5 - IL_0046: ldloc.s V_4 - IL_0048: ldfld int32 EqualsOnUnions01/U/B::item - IL_004d: ldloc.s V_5 - IL_004f: ldfld int32 EqualsOnUnions01/U/B::item - IL_0054: ceq - IL_0056: ret + IL_0013: ldc.i4.0 + IL_0014: stloc.0 + IL_0015: ldarg.1 + IL_0016: stloc.3 + IL_0017: ldloc.3 + IL_0018: isinst EqualsOnUnions01/U/B + IL_001d: brfalse.s IL_0022 + + IL_001f: ldc.i4.1 + IL_0020: br.s IL_0023 + IL_0022: ldc.i4.0 + IL_0023: stloc.2 .line 100001,100001 : 0,0 '' - IL_0057: ldc.i4.1 - IL_0058: ret + IL_0024: ldloc.0 + IL_0025: ldloc.2 + IL_0026: bne.un.s IL_0053 .line 100001,100001 : 0,0 '' - IL_0059: ldc.i4.0 - IL_005a: ret + IL_0028: ldarg.0 + IL_0029: isinst EqualsOnUnions01/U/B + IL_002e: brfalse.s IL_0051 .line 100001,100001 : 0,0 '' - IL_005b: ldc.i4.0 - IL_005c: ret + IL_0030: ldarg.0 + IL_0031: castclass EqualsOnUnions01/U/B + IL_0036: stloc.s V_4 + IL_0038: ldarg.1 + IL_0039: castclass EqualsOnUnions01/U/B + IL_003e: stloc.s V_5 + IL_0040: ldloc.s V_4 + IL_0042: ldfld int32 EqualsOnUnions01/U/B::item + IL_0047: ldloc.s V_5 + IL_0049: ldfld int32 EqualsOnUnions01/U/B::item + IL_004e: ceq + IL_0050: ret .line 100001,100001 : 0,0 '' - IL_005d: ldarg.1 - IL_005e: ldnull - IL_005f: cgt.un - IL_0061: ldc.i4.0 - IL_0062: ceq - IL_0064: ret + IL_0051: ldc.i4.1 + IL_0052: ret + + .line 100001,100001 : 0,0 '' + IL_0053: ldc.i4.0 + IL_0054: ret + + .line 100001,100001 : 0,0 '' + IL_0055: ldc.i4.0 + IL_0056: ret + + .line 100001,100001 : 0,0 '' + IL_0057: ldarg.1 + IL_0058: ldnull + IL_0059: cgt.un + IL_005b: ldc.i4.0 + IL_005c: ceq + IL_005e: ret } // end of method U::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop01.il.bsl index e8e857034c9..04d6481ef46 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x00000050 } .module ForLoop01.exe -// MVID: {61EFEC5E-1795-791C-A745-03835EECEF61} +// MVID: {6220E156-1795-791C-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06810000 +// Image base: 0x07270000 // =============== CLASS MEMBERS DECLARATION =================== @@ -63,7 +63,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 74 (0x4a) + // Code size 71 (0x47) .maxstack 5 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -84,30 +84,28 @@ IL_0019: stloc.1 .line 5,5 : 8,10 '' IL_001a: ldloc.1 - IL_001b: ldnull - IL_001c: cgt.un - IL_001e: brfalse.s IL_0049 + IL_001b: brfalse.s IL_0046 - IL_0020: ldloc.0 - IL_0021: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0026: stloc.2 + IL_001d: ldloc.0 + IL_001e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0023: stloc.2 .line 6,6 : 4,19 '' - IL_0027: ldstr "%A" - IL_002c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) - IL_0031: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0036: ldloc.2 - IL_0037: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_003c: pop - IL_003d: ldloc.1 - IL_003e: stloc.0 - IL_003f: ldloc.0 - IL_0040: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0045: stloc.1 + IL_0024: ldstr "%A" + IL_0029: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_002e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0033: ldloc.2 + IL_0034: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0039: pop + IL_003a: ldloc.1 + IL_003b: stloc.0 + IL_003c: ldloc.0 + IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0042: stloc.1 .line 100001,100001 : 0,0 '' - IL_0046: nop - IL_0047: br.s IL_001a + IL_0043: nop + IL_0044: br.s IL_001a - IL_0049: ret + IL_0046: ret } // end of method $ForLoop01::main@ } // end of class ''.$ForLoop01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl index 35320fbb8c0..5af2e0c6969 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000690 Length: 0x000001F4 } .module GeneralizationOnUnions01.exe -// MVID: {61E07031-4CA2-8CD1-A745-03833170E061} +// MVID: {6220E156-4CA2-8CD1-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x070E0000 +// Image base: 0x07190000 // =============== CLASS MEMBERS DECLARATION =================== @@ -145,42 +145,36 @@ instance int32 CompareTo(class GeneralizationOnUnions01/Weirdo obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 26 (0x1a) + // Code size 17 (0x11) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\GeneralizationOnUnions01.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0010 + IL_0001: brfalse.s IL_000a .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_000e + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 .line 100001,100001 : 0,0 '' - IL_000c: ldc.i4.0 - IL_000d: ret + IL_0006: ldc.i4.0 + IL_0007: ret .line 100001,100001 : 0,0 '' - IL_000e: ldc.i4.1 - IL_000f: ret + IL_0008: ldc.i4.1 + IL_0009: ret .line 100001,100001 : 0,0 '' - IL_0010: ldarg.1 - IL_0011: ldnull - IL_0012: cgt.un - IL_0014: brfalse.s IL_0018 + IL_000a: ldarg.1 + IL_000b: brfalse.s IL_000f .line 100001,100001 : 0,0 '' - IL_0016: ldc.i4.m1 - IL_0017: ret + IL_000d: ldc.i4.m1 + IL_000e: ret .line 100001,100001 : 0,0 '' - IL_0018: ldc.i4.0 - IL_0019: ret + IL_000f: ldc.i4.0 + IL_0010: ret } // end of method Weirdo::CompareTo .method public hidebysig virtual final @@ -201,7 +195,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 34 (0x22) .maxstack 3 .locals init ([0] class GeneralizationOnUnions01/Weirdo V_0) .line 100001,100001 : 0,0 '' @@ -210,65 +204,57 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_001c + IL_0008: brfalse.s IL_0016 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any GeneralizationOnUnions01/Weirdo - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_001a + IL_000a: ldarg.1 + IL_000b: unbox.any GeneralizationOnUnions01/Weirdo + IL_0010: brfalse.s IL_0014 .line 100001,100001 : 0,0 '' - IL_0018: ldc.i4.0 - IL_0019: ret + IL_0012: ldc.i4.0 + IL_0013: ret .line 100001,100001 : 0,0 '' - IL_001a: ldc.i4.1 - IL_001b: ret + IL_0014: ldc.i4.1 + IL_0015: ret .line 100001,100001 : 0,0 '' - IL_001c: ldarg.1 - IL_001d: unbox.any GeneralizationOnUnions01/Weirdo - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: brfalse.s IL_0029 + IL_0016: ldarg.1 + IL_0017: unbox.any GeneralizationOnUnions01/Weirdo + IL_001c: brfalse.s IL_0020 .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.m1 - IL_0028: ret + IL_001e: ldc.i4.m1 + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_0020: ldc.i4.0 + IL_0021: ret } // end of method Weirdo::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) + // Code size 11 (0xb) .maxstack 3 .locals init ([0] int32 V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000c + IL_0001: brfalse.s IL_0009 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: ret + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldc.i4.0 + IL_0008: ret .line 100001,100001 : 0,0 '' - IL_000c: ldc.i4.0 - IL_000d: ret + IL_0009: ldc.i4.0 + IL_000a: ret } // end of method Weirdo::GetHashCode .method public hidebysig virtual final @@ -288,68 +274,64 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 30 (0x1e) + // Code size 27 (0x1b) .maxstack 4 .locals init ([0] class GeneralizationOnUnions01/Weirdo V_0, [1] class GeneralizationOnUnions01/Weirdo V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0016 + IL_0001: brfalse.s IL_0013 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst GeneralizationOnUnions01/Weirdo - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst GeneralizationOnUnions01/Weirdo + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0014 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0011 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldc.i4.1 - IL_0013: ret + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldc.i4.1 + IL_0010: ret .line 100001,100001 : 0,0 '' - IL_0014: ldc.i4.0 - IL_0015: ret + IL_0011: ldc.i4.0 + IL_0012: ret .line 100001,100001 : 0,0 '' - IL_0016: ldarg.1 - IL_0017: ldnull - IL_0018: cgt.un - IL_001a: ldc.i4.0 - IL_001b: ceq - IL_001d: ret + IL_0013: ldarg.1 + IL_0014: ldnull + IL_0015: cgt.un + IL_0017: ldc.i4.0 + IL_0018: ceq + IL_001a: ret } // end of method Weirdo::Equals .method public hidebysig virtual final instance bool Equals(class GeneralizationOnUnions01/Weirdo obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 19 (0x13) + // Code size 16 (0x10) .maxstack 8 .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000b + IL_0001: brfalse.s IL_0008 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: ret + IL_0003: ldarg.1 + IL_0004: ldnull + IL_0005: cgt.un + IL_0007: ret .line 100001,100001 : 0,0 '' - IL_000b: ldarg.1 - IL_000c: ldnull - IL_000d: cgt.un - IL_000f: ldc.i4.0 - IL_0010: ceq - IL_0012: ret + IL_0008: ldarg.1 + IL_0009: ldnull + IL_000a: cgt.un + IL_000c: ldc.i4.0 + IL_000d: ceq + IL_000f: ret } // end of method Weirdo::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl index e110fbaec2c..d9c60a58612 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000748 Length: 0x00000231 } .module Structs01.exe -// MVID: {61EFEE1F-701F-5E27-A745-03831FEEEF61} +// MVID: {6220CCA3-701F-5E27-A745-0383A3CC2062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06E70000 +// Image base: 0x06B90000 // =============== CLASS MEMBERS DECLARATION =================== @@ -200,36 +200,39 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 39 (0x27) + // Code size 42 (0x2a) .maxstack 4 - .locals init ([0] valuetype Experiment.Test/Test V_0, - [1] valuetype Experiment.Test/Test& V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .locals init ([0] object V_0, + [1] valuetype Experiment.Test/Test V_1, + [2] valuetype Experiment.Test/Test& V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0025 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Experiment.Test/Test + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any Experiment.Test/Test - IL_0010: stloc.0 - IL_0011: ldloca.s V_0 + IL_000d: ldarg.1 + IL_000e: unbox.any Experiment.Test/Test IL_0013: stloc.1 - IL_0014: ldarg.2 - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldfld int32 Experiment.Test/Test::Field - IL_001c: ldloc.1 - IL_001d: ldfld int32 Experiment.Test/Test::Field - IL_0022: ceq - IL_0024: ret + IL_0014: ldloca.s V_1 + IL_0016: stloc.2 + IL_0017: ldarg.2 + IL_0018: stloc.3 + IL_0019: ldarg.0 + IL_001a: ldfld int32 Experiment.Test/Test::Field + IL_001f: ldloc.2 + IL_0020: ldfld int32 Experiment.Test/Test::Field + IL_0025: ceq + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_0028: ldc.i4.0 + IL_0029: ret } // end of method Test::Equals .method public specialname rtspecialname @@ -265,28 +268,31 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 27 (0x1b) + // Code size 30 (0x1e) .maxstack 4 - .locals init ([0] valuetype Experiment.Test/Test V_0) + .locals init ([0] object V_0, + [1] valuetype Experiment.Test/Test V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0019 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Experiment.Test/Test + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any Experiment.Test/Test - IL_0010: stloc.0 - IL_0011: ldarg.0 - IL_0012: ldloc.0 - IL_0013: call instance bool Experiment.Test/Test::Equals(valuetype Experiment.Test/Test) - IL_0018: ret + IL_000d: ldarg.1 + IL_000e: unbox.any Experiment.Test/Test + IL_0013: stloc.1 + IL_0014: ldarg.0 + IL_0015: ldloc.1 + IL_0016: call instance bool Experiment.Test/Test::Equals(valuetype Experiment.Test/Test) + IL_001b: ret .line 100001,100001 : 0,0 '' - IL_0019: ldc.i4.0 - IL_001a: ret + IL_001c: ldc.i4.0 + IL_001d: ret } // end of method Test::Equals } // end of class Test diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl index 78cbccb0b56..61ab2b426c5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000780 Length: 0x00000237 } .module Structs02.exe -// MVID: {61EFEE1F-7040-5E27-A745-03831FEEEF61} +// MVID: {6220CCA3-7040-5E27-A745-0383A3CC2062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07400000 +// Image base: 0x06A30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -211,36 +211,39 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 39 (0x27) + // Code size 42 (0x2a) .maxstack 4 - .locals init ([0] valuetype Experiment.Test/Repro V_0, - [1] valuetype Experiment.Test/Repro& V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .locals init ([0] object V_0, + [1] valuetype Experiment.Test/Repro V_1, + [2] valuetype Experiment.Test/Repro& V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0025 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Experiment.Test/Repro + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any Experiment.Test/Repro - IL_0010: stloc.0 - IL_0011: ldloca.s V_0 + IL_000d: ldarg.1 + IL_000e: unbox.any Experiment.Test/Repro IL_0013: stloc.1 - IL_0014: ldarg.2 - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldfld int32 Experiment.Test/Repro::hash@ - IL_001c: ldloc.1 - IL_001d: ldfld int32 Experiment.Test/Repro::hash@ - IL_0022: ceq - IL_0024: ret + IL_0014: ldloca.s V_1 + IL_0016: stloc.2 + IL_0017: ldarg.2 + IL_0018: stloc.3 + IL_0019: ldarg.0 + IL_001a: ldfld int32 Experiment.Test/Repro::hash@ + IL_001f: ldloc.2 + IL_0020: ldfld int32 Experiment.Test/Repro::hash@ + IL_0025: ceq + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_0028: ldc.i4.0 + IL_0029: ret } // end of method Repro::Equals .method public specialname rtspecialname @@ -313,28 +316,31 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 27 (0x1b) + // Code size 30 (0x1e) .maxstack 4 - .locals init ([0] valuetype Experiment.Test/Repro V_0) + .locals init ([0] object V_0, + [1] valuetype Experiment.Test/Repro V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0019 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Experiment.Test/Repro + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any Experiment.Test/Repro - IL_0010: stloc.0 - IL_0011: ldarg.0 - IL_0012: ldloc.0 - IL_0013: call instance bool Experiment.Test/Repro::Equals(valuetype Experiment.Test/Repro) - IL_0018: ret + IL_000d: ldarg.1 + IL_000e: unbox.any Experiment.Test/Repro + IL_0013: stloc.1 + IL_0014: ldarg.0 + IL_0015: ldloc.1 + IL_0016: call instance bool Experiment.Test/Repro::Equals(valuetype Experiment.Test/Repro) + IL_001b: ret .line 100001,100001 : 0,0 '' - IL_0019: ldc.i4.0 - IL_001a: ret + IL_001c: ldc.i4.0 + IL_001d: ret } // end of method Repro::Equals .property instance int32 hash() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl index 305e6e79e47..539be40b258 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000758 Length: 0x0000022C } .module StructsAsArrayElements01.dll -// MVID: {61EFEE1F-29F3-6E68-A745-03831FEEEF61} +// MVID: {6220CCA3-29F3-6E68-A745-0383A3CC2062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06EF0000 +// Image base: 0x06980000 // =============== CLASS MEMBERS DECLARATION =================== @@ -201,36 +201,39 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 39 (0x27) + // Code size 42 (0x2a) .maxstack 4 - .locals init ([0] valuetype StructsAsArrayElements01/T V_0, - [1] valuetype StructsAsArrayElements01/T& V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .locals init ([0] object V_0, + [1] valuetype StructsAsArrayElements01/T V_1, + [2] valuetype StructsAsArrayElements01/T& V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0025 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst StructsAsArrayElements01/T + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any StructsAsArrayElements01/T - IL_0010: stloc.0 - IL_0011: ldloca.s V_0 + IL_000d: ldarg.1 + IL_000e: unbox.any StructsAsArrayElements01/T IL_0013: stloc.1 - IL_0014: ldarg.2 - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldfld int32 StructsAsArrayElements01/T::i - IL_001c: ldloc.1 - IL_001d: ldfld int32 StructsAsArrayElements01/T::i - IL_0022: ceq - IL_0024: ret + IL_0014: ldloca.s V_1 + IL_0016: stloc.2 + IL_0017: ldarg.2 + IL_0018: stloc.3 + IL_0019: ldarg.0 + IL_001a: ldfld int32 StructsAsArrayElements01/T::i + IL_001f: ldloc.2 + IL_0020: ldfld int32 StructsAsArrayElements01/T::i + IL_0025: ceq + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_0028: ldc.i4.0 + IL_0029: ret } // end of method T::Equals .method public hidebysig instance void @@ -266,28 +269,31 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 27 (0x1b) + // Code size 30 (0x1e) .maxstack 4 - .locals init ([0] valuetype StructsAsArrayElements01/T V_0) + .locals init ([0] object V_0, + [1] valuetype StructsAsArrayElements01/T V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0019 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst StructsAsArrayElements01/T + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any StructsAsArrayElements01/T - IL_0010: stloc.0 - IL_0011: ldarg.0 - IL_0012: ldloc.0 - IL_0013: call instance bool StructsAsArrayElements01/T::Equals(valuetype StructsAsArrayElements01/T) - IL_0018: ret + IL_000d: ldarg.1 + IL_000e: unbox.any StructsAsArrayElements01/T + IL_0013: stloc.1 + IL_0014: ldarg.0 + IL_0015: ldloc.1 + IL_0016: call instance bool StructsAsArrayElements01/T::Equals(valuetype StructsAsArrayElements01/T) + IL_001b: ret .line 100001,100001 : 0,0 '' - IL_0019: ldc.i4.0 - IL_001a: ret + IL_001c: ldc.i4.0 + IL_001d: ret } // end of method T::Equals } // end of class T diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl index c8603a78df6..f5998d14fb7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl @@ -50,13 +50,13 @@ // Offset: 0x000005F0 Length: 0x00000211 } .module Linq101Aggregates01.exe -// MVID: {61FD32BA-D281-4783-A745-0383BA32FD61} +// MVID: {6220E157-D281-4783-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05570000 +// Image base: 0x067C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -193,7 +193,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -277,16 +277,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #1 input at line 11@12'::Close .method public strict virtual instance bool @@ -489,7 +487,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -573,16 +571,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method numSum@21::Close .method public strict virtual instance bool @@ -823,7 +819,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -907,16 +903,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method totalChars@30::Close .method public strict virtual instance bool @@ -1284,7 +1278,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1368,16 +1362,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method sum@42::Close .method public strict virtual instance bool @@ -1795,7 +1787,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1879,16 +1871,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method minNum@49::Close .method public strict virtual instance bool @@ -2129,7 +2119,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -2213,16 +2203,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method shortestWord@52::Close .method public strict virtual instance bool @@ -2590,7 +2578,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -2674,16 +2662,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method min@59::Close .method public strict virtual instance bool @@ -3185,7 +3171,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -3269,16 +3255,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method cheapestProducts@69::Close .method public strict virtual instance bool @@ -3653,7 +3637,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -3737,16 +3721,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method maxNum@74::Close .method public strict virtual instance bool @@ -3987,7 +3969,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -4071,16 +4053,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method longestLength@77::Close .method public strict virtual instance bool @@ -4448,7 +4428,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -4532,16 +4512,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method mostExpensivePrice@84::Close .method public strict virtual instance bool @@ -5025,7 +5003,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -5109,16 +5087,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method maxPrice@93::Close .method public strict virtual instance bool @@ -5370,7 +5346,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -5454,16 +5430,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method mostExpensiveProducts@94::Close .method public strict virtual instance bool @@ -5844,7 +5818,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 135 (0x87) + // Code size 132 (0x84) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -5928,16 +5902,14 @@ .line 100001,100001 : 0,0 '' IL_007e: ldloc.0 - IL_007f: ldnull - IL_0080: cgt.un - IL_0082: brfalse.s IL_0086 + IL_007f: brfalse.s IL_0083 .line 100001,100001 : 0,0 '' - IL_0084: ldloc.0 - IL_0085: throw + IL_0081: ldloc.0 + IL_0082: throw .line 100001,100001 : 0,0 '' - IL_0086: ret + IL_0083: ret } // end of method averageNum@100::Close .method public strict virtual instance bool @@ -6406,7 +6378,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -6490,16 +6462,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method averagePrice@115::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl index d87ae14159c..449fc70b7f1 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x00000388 Length: 0x00000127 } .module Linq101ElementOperators01.exe -// MVID: {61F2D6A6-19D7-C20D-A745-0383A6D6F261} +// MVID: {6220E157-19D7-C20D-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07130000 +// Image base: 0x06AB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -188,7 +188,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -272,16 +272,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method products12@12::Close .method public strict virtual instance bool @@ -525,7 +523,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -609,16 +607,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method startsWithO@22::Close .method public strict virtual instance bool @@ -863,7 +859,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -947,16 +943,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method firstNumOrDefault@31::Close .method public strict virtual instance bool @@ -1159,7 +1153,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1243,16 +1237,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method fourthLowNum@52::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl index 55a7e663c2d..188edf08cb3 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl @@ -40,13 +40,13 @@ // Offset: 0x000003B8 Length: 0x00000134 } .module Linq101Ordering01.exe -// MVID: {61FD32BA-649A-6956-A745-0383BA32FD61} +// MVID: {6220E157-649A-6956-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x051E0000 +// Image base: 0x072B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -183,7 +183,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -267,16 +267,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #1 input at line 10@11'::Close .method public strict virtual instance bool @@ -517,7 +515,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -601,16 +599,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #2 input at line 17@18'::Close .method public strict virtual instance bool @@ -972,7 +968,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1056,16 +1052,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #4 input at line 43@44'::Close .method public strict virtual instance bool @@ -1308,7 +1302,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1392,16 +1386,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #5 input at line 51@52'::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl index dc9761089b4..71a8db12ddb 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x000003D8 Length: 0x00000138 } .module Linq101Partitioning01.exe -// MVID: {61FD32BA-B280-A6A2-A745-0383BA32FD61} +// MVID: {6220E157-B280-A6A2-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06E50000 +// Image base: 0x06F10000 // =============== CLASS MEMBERS DECLARATION =================== @@ -188,7 +188,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -272,16 +272,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #1 input at line 11@12'::Close .method public strict virtual instance bool @@ -693,7 +691,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -777,16 +775,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #3 input at line 28@29'::Close .method public strict virtual instance bool @@ -1198,7 +1194,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1282,16 +1278,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #5 input at line 44@45'::Close .method public strict virtual instance bool @@ -1534,7 +1528,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1618,16 +1612,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #6 input at line 51@52'::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl index cee73d81f73..e316390f8b9 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x00000398 Length: 0x000000FF } .module Linq101Quantifiers01.exe -// MVID: {61FD32BA-76DD-E373-A745-0383BA32FD61} +// MVID: {6220E157-76DD-E373-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07130000 +// Image base: 0x06B00000 // =============== CLASS MEMBERS DECLARATION =================== @@ -188,7 +188,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -272,16 +272,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method iAfterE@12::Close .method public strict virtual instance bool @@ -790,7 +788,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -874,16 +872,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method onlyOdd@32::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl index d8b2b469cfb..3cbe05caa2d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x00000648 Length: 0x00000204 } .module Linq101Select01.exe -// MVID: {61FD32BA-6057-8F80-A745-0383BA32FD61} +// MVID: {6220E157-6057-8F80-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05A30000 +// Image base: 0x06B30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -233,7 +233,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -317,16 +317,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #1 input at line 11@13'::Close .method public strict virtual instance bool @@ -573,7 +571,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -657,16 +655,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method productNames@22::Close .method public strict virtual instance bool @@ -914,7 +910,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -998,16 +994,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #2 input at line 28@30'::Close .method public strict virtual instance bool @@ -1258,7 +1252,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1342,16 +1336,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #3 input at line 37@39'::Close .method public strict virtual instance bool @@ -1606,7 +1598,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1690,16 +1682,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #4 input at line 44@46'::Close .method public strict virtual instance bool @@ -1953,7 +1943,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -2037,16 +2027,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #5 input at line 51@53'::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl index 4976371674b..bcbe15932b0 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x00000390 Length: 0x0000011E } .module Linq101SetOperators01.exe -// MVID: {61FD32BA-4EE5-349F-A745-0383BA32FD61} +// MVID: {6220E157-4EE5-349F-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05B90000 +// Image base: 0x06AA0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -188,7 +188,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -272,16 +272,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #1 input at line 12@13'::Close .method public strict virtual instance bool @@ -528,7 +526,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -612,16 +610,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #2 input at line 21@23'::Close .method public strict virtual instance bool @@ -870,7 +866,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -954,16 +950,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method productFirstChars@33::Close .method public strict virtual instance bool @@ -1212,7 +1206,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1296,16 +1290,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method customerFirstChars@39::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl index aecbaf18528..6c802eefced 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x000003D0 Length: 0x0000012E } .module Linq101Where01.exe -// MVID: {61FD32BA-FF23-CD21-A745-0383BA32FD61} +// MVID: {6220E157-FF23-CD21-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05C80000 +// Image base: 0x05850000 // =============== CLASS MEMBERS DECLARATION =================== @@ -735,7 +735,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -819,16 +819,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #3 input at line 50@52'::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl index d8d9b87bf50..08c5cbfced7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000AD } .module SeqExpressionSteppingTest5.exe -// MVID: {61FD4A6D-2432-9401-A745-03836D4AFD61} +// MVID: {6220E157-2432-9401-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06FD0000 +// Image base: 0x06920000 // =============== CLASS MEMBERS DECLARATION =================== @@ -213,7 +213,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 156 (0x9c) + // Code size 153 (0x99) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -313,16 +313,14 @@ .line 100001,100001 : 0,0 '' IL_0093: ldloc.0 - IL_0094: ldnull - IL_0095: cgt.un - IL_0097: brfalse.s IL_009b + IL_0094: brfalse.s IL_0098 .line 100001,100001 : 0,0 '' - IL_0099: ldloc.0 - IL_009a: throw + IL_0096: ldloc.0 + IL_0097: throw .line 100001,100001 : 0,0 '' - IL_009b: ret + IL_0098: ret } // end of method f4@5::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl index 619f85c4a5c..b7cbd0c93ee 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000002A0 Length: 0x000000BA } .module SeqExpressionSteppingTest6.exe -// MVID: {61FD4A6D-2432-94A2-A745-03836D4AFD61} +// MVID: {6220E157-2432-94A2-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F10000 +// Image base: 0x06B60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -252,7 +252,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 167 (0xa7) + // Code size 164 (0xa4) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -359,16 +359,14 @@ .line 100001,100001 : 0,0 '' IL_009e: ldloc.0 - IL_009f: ldnull - IL_00a0: cgt.un - IL_00a2: brfalse.s IL_00a6 + IL_009f: brfalse.s IL_00a3 .line 100001,100001 : 0,0 '' - IL_00a4: ldloc.0 - IL_00a5: throw + IL_00a1: ldloc.0 + IL_00a2: throw .line 100001,100001 : 0,0 '' - IL_00a6: ret + IL_00a3: ret } // end of method f7@6::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl index fb5d62e1ea4..29bf52bb2da 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000858 Length: 0x000003BA } .module SeqExpressionSteppingTest7.exe -// MVID: {61FD4A6D-2432-93C3-A745-03836D4AFD61} +// MVID: {6220E157-2432-93C3-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07240000 +// Image base: 0x05050000 // =============== CLASS MEMBERS DECLARATION =================== @@ -313,7 +313,7 @@ .method public static void testSimpleForEachListLoopWithOneStatement(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed { - // Code size 51 (0x33) + // Code size 48 (0x30) .maxstack 4 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -326,34 +326,32 @@ IL_0008: stloc.1 .line 28,28 : 11,13 '' IL_0009: ldloc.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse.s IL_0032 + IL_000a: brfalse.s IL_002f - IL_000f: ldloc.0 - IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0015: stloc.2 + IL_000c: ldloc.0 + IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0012: stloc.2 .line 29,29 : 8,42 '' - IL_0016: ldstr "{0}" - IL_001b: ldloc.2 - IL_001c: box [mscorlib]System.Int32 - IL_0021: call void [mscorlib]System.Console::WriteLine(string, + IL_0013: ldstr "{0}" + IL_0018: ldloc.2 + IL_0019: box [mscorlib]System.Int32 + IL_001e: call void [mscorlib]System.Console::WriteLine(string, object) - IL_0026: ldloc.1 - IL_0027: stloc.0 - IL_0028: ldloc.0 - IL_0029: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002e: stloc.1 + IL_0023: ldloc.1 + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002b: stloc.1 .line 100001,100001 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0009 + IL_002c: nop + IL_002d: br.s IL_0009 - IL_0032: ret + IL_002f: ret } // end of method SeqExpressionSteppingTest7::testSimpleForEachListLoopWithOneStatement .method public static void testSimpleForEachListLoopWithTwoStatements(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed { - // Code size 67 (0x43) + // Code size 64 (0x40) .maxstack 4 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -366,35 +364,33 @@ IL_0008: stloc.1 .line 32,32 : 11,13 '' IL_0009: ldloc.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse.s IL_0042 + IL_000a: brfalse.s IL_003f - IL_000f: ldloc.0 - IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0015: stloc.2 + IL_000c: ldloc.0 + IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0012: stloc.2 .line 33,33 : 8,42 '' - IL_0016: ldstr "{0}" - IL_001b: ldloc.2 - IL_001c: box [mscorlib]System.Int32 - IL_0021: call void [mscorlib]System.Console::WriteLine(string, + IL_0013: ldstr "{0}" + IL_0018: ldloc.2 + IL_0019: box [mscorlib]System.Int32 + IL_001e: call void [mscorlib]System.Console::WriteLine(string, object) .line 34,34 : 8,42 '' - IL_0026: ldstr "{0}" - IL_002b: ldloc.2 - IL_002c: box [mscorlib]System.Int32 - IL_0031: call void [mscorlib]System.Console::WriteLine(string, + IL_0023: ldstr "{0}" + IL_0028: ldloc.2 + IL_0029: box [mscorlib]System.Int32 + IL_002e: call void [mscorlib]System.Console::WriteLine(string, object) - IL_0036: ldloc.1 - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003e: stloc.1 + IL_0033: ldloc.1 + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003b: stloc.1 .line 100001,100001 : 0,0 '' - IL_003f: nop - IL_0040: br.s IL_0009 + IL_003c: nop + IL_003d: br.s IL_0009 - IL_0042: ret + IL_003f: ret } // end of method SeqExpressionSteppingTest7::testSimpleForEachListLoopWithTwoStatements .method public static void testSimpleForEachIntRangeLoopWithOneStatement(int32 start, diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule-preview.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule-preview.il.bsl index 73dc3548868..62d954ac355 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule-preview.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule-preview.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001158 Length: 0x00000405 } .module 'TopLevelModule-preview.dll' -// MVID: {620FD84C-A1E9-C7BD-A745-03834CD80F62} +// MVID: {6220E471-A1E9-C7BD-A745-038371E42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06ED0000 +// Image base: 0x06870000 // =============== CLASS MEMBERS DECLARATION =================== @@ -151,7 +151,7 @@ instance int32 CompareTo(class ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -161,64 +161,58 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelModule.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -239,7 +233,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -253,115 +247,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 ABC/Expr::item + 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.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + 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 .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -381,7 +367,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -390,97 +376,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + 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/Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -598,41 +578,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass ABC/MyExn - IL_0015: call instance int32 ABC/MyExn::get_Data0() + 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.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + 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 .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -656,34 +634,35 @@ .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' IL_001c: ldarg.2 - IL_001d: stloc.2 + IL_001d: stloc.3 IL_001e: ldarg.0 IL_001f: castclass ABC/MyExn IL_0024: call instance int32 ABC/MyExn::get_Data0() @@ -714,52 +693,51 @@ Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 56 (0x38) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass ABC/MyExn - IL_001c: call instance int32 ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass ABC/MyExn - IL_0027: call instance int32 ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0013: ldarg.0 + IL_0014: castclass ABC/MyExn + IL_0019: call instance int32 ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass ABC/MyExn + IL_0024: call instance int32 ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -938,7 +916,7 @@ instance int32 CompareTo(class ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, @@ -947,64 +925,58 @@ [4] int32 V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 ABC/ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 ABC/ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 ABC/ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 ABC/ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1025,7 +997,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, @@ -1039,115 +1011,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any ABC/ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any ABC/ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 ABC/ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 ABC/ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 ABC/ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 ABC/ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any ABC/ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any ABC/ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class ABC/ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 ABC/ABC/Expr::item + 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.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + 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 .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1167,7 +1131,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, @@ -1176,97 +1140,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst ABC/ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst ABC/ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 ABC/ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 ABC/ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 ABC/ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 ABC/ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + 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: ldloc.1 - IL_0019: ldfld int32 ABC/ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -1384,41 +1342,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass ABC/ABC/MyExn - IL_0015: call instance int32 ABC/ABC/MyExn::get_Data0() + 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.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + 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 .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -1442,34 +1398,35 @@ .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst ABC/ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' IL_001c: ldarg.2 - IL_001d: stloc.2 + IL_001d: stloc.3 IL_001e: ldarg.0 IL_001f: castclass ABC/ABC/MyExn IL_0024: call instance int32 ABC/ABC/MyExn::get_Data0() @@ -1500,52 +1457,51 @@ Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 56 (0x38) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst ABC/ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass ABC/ABC/MyExn - IL_001c: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass ABC/ABC/MyExn - IL_0027: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0013: ldarg.0 + IL_0014: castclass ABC/ABC/MyExn + IL_0019: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass ABC/ABC/MyExn + IL_0024: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl index 46252f18879..62506a71d24 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001148 Length: 0x000003FD } .module TopLevelModule.dll -// MVID: {620FB412-37F5-C118-A745-038312B40F62} +// MVID: {6220E46D-37F5-C118-A745-03836DE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06DA0000 +// Image base: 0x06C10000 // =============== CLASS MEMBERS DECLARATION =================== @@ -151,7 +151,7 @@ instance int32 CompareTo(class ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -161,64 +161,58 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelModule.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -239,7 +233,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -253,115 +247,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 ABC/Expr::item + 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.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + 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 .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -381,7 +367,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -390,97 +376,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + 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/Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -584,41 +564,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass ABC/MyExn - IL_0015: call instance int32 ABC/MyExn::get_Data0() + 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.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + 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 .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -642,34 +620,35 @@ .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' IL_001c: ldarg.2 - IL_001d: stloc.2 + IL_001d: stloc.3 IL_001e: ldarg.0 IL_001f: castclass ABC/MyExn IL_0024: call instance int32 ABC/MyExn::get_Data0() @@ -700,52 +679,51 @@ Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 56 (0x38) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass ABC/MyExn - IL_001c: call instance int32 ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass ABC/MyExn - IL_0027: call instance int32 ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0013: ldarg.0 + IL_0014: castclass ABC/MyExn + IL_0019: call instance int32 ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass ABC/MyExn + IL_0024: call instance int32 ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -924,7 +902,7 @@ instance int32 CompareTo(class ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, @@ -933,64 +911,58 @@ [4] int32 V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 ABC/ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 ABC/ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 ABC/ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 ABC/ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1011,7 +983,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, @@ -1025,115 +997,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any ABC/ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any ABC/ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 ABC/ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 ABC/ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 ABC/ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 ABC/ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any ABC/ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any ABC/ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class ABC/ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 ABC/ABC/Expr::item + 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.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + 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 .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1153,7 +1117,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, @@ -1162,97 +1126,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst ABC/ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst ABC/ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 ABC/ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 ABC/ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 ABC/ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 ABC/ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + 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: ldloc.1 - IL_0019: ldfld int32 ABC/ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -1356,41 +1314,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass ABC/ABC/MyExn - IL_0015: call instance int32 ABC/ABC/MyExn::get_Data0() + 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.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + 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 .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -1414,34 +1370,35 @@ .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst ABC/ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' IL_001c: ldarg.2 - IL_001d: stloc.2 + IL_001d: stloc.3 IL_001e: ldarg.0 IL_001f: castclass ABC/ABC/MyExn IL_0024: call instance int32 ABC/ABC/MyExn::get_Data0() @@ -1472,52 +1429,51 @@ Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 56 (0x38) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst ABC/ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass ABC/ABC/MyExn - IL_001c: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass ABC/ABC/MyExn - IL_0027: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0013: ldarg.0 + IL_0014: castclass ABC/ABC/MyExn + IL_0019: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass ABC/ABC/MyExn + IL_0024: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace-preview.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace-preview.il.bsl index 55493db0923..7deda04c06d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace-preview.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace-preview.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001860 Length: 0x00000564 } .module 'ToplevelNamespace-preview.dll' -// MVID: {620FD84E-96BA-B011-A745-03834ED80F62} +// MVID: {6220E473-96BA-B011-A745-038373E42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A60000 +// Image base: 0x06A50000 // =============== CLASS MEMBERS DECLARATION =================== @@ -146,7 +146,7 @@ instance int32 CompareTo(class XYZ.Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -156,64 +156,58 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelNamespace.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -234,7 +228,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -248,115 +242,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any XYZ.Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any XYZ.Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 XYZ.Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 XYZ.Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 XYZ.Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 XYZ.Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any XYZ.Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any XYZ.Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.Expr::item + 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.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + 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 .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -376,7 +362,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -385,97 +371,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst XYZ.Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 XYZ.Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 XYZ.Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + 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.Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 XYZ.Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 XYZ.Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -593,41 +573,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.MyExn - IL_0015: call instance int32 XYZ.MyExn::get_Data0() + 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.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + 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 .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -651,34 +629,35 @@ .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst XYZ.MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' IL_001c: ldarg.2 - IL_001d: stloc.2 + IL_001d: stloc.3 IL_001e: ldarg.0 IL_001f: castclass XYZ.MyExn IL_0024: call instance int32 XYZ.MyExn::get_Data0() @@ -709,52 +688,51 @@ Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 56 (0x38) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst XYZ.MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.MyExn - IL_001c: call instance int32 XYZ.MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.MyExn - IL_0027: call instance int32 XYZ.MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0013: ldarg.0 + IL_0014: castclass XYZ.MyExn + IL_0019: call instance int32 XYZ.MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass XYZ.MyExn + IL_0024: call instance int32 XYZ.MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -933,7 +911,7 @@ instance int32 CompareTo(class XYZ.ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, @@ -942,64 +920,58 @@ [4] int32 V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1020,7 +992,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, @@ -1034,115 +1006,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any XYZ.ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any XYZ.ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 XYZ.ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 XYZ.ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 XYZ.ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 XYZ.ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any XYZ.ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any XYZ.ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.ABC/Expr::item + 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.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + 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 .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1162,7 +1126,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, @@ -1171,97 +1135,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst XYZ.ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 XYZ.ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 XYZ.ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + 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/Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 XYZ.ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 XYZ.ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -1379,41 +1337,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.ABC/MyExn - IL_0015: call instance int32 XYZ.ABC/MyExn::get_Data0() + 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.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + 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 .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -1437,34 +1393,35 @@ .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst XYZ.ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' IL_001c: ldarg.2 - IL_001d: stloc.2 + IL_001d: stloc.3 IL_001e: ldarg.0 IL_001f: castclass XYZ.ABC/MyExn IL_0024: call instance int32 XYZ.ABC/MyExn::get_Data0() @@ -1495,52 +1452,51 @@ Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 56 (0x38) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst XYZ.ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.ABC/MyExn - IL_001c: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0013: ldarg.0 + IL_0014: castclass XYZ.ABC/MyExn + IL_0019: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass XYZ.ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -1719,7 +1675,7 @@ instance int32 CompareTo(class XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, @@ -1728,64 +1684,58 @@ [4] int32 V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1806,7 +1756,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, @@ -1820,115 +1770,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any XYZ.ABC/ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any XYZ.ABC/ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any XYZ.ABC/ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any XYZ.ABC/ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.ABC/ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.ABC/ABC/Expr::item + 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.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + 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 .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1948,7 +1890,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, @@ -1957,97 +1899,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.ABC/ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst XYZ.ABC/ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + 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: ldloc.1 - IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -2165,41 +2101,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.ABC/ABC/MyExn - IL_0015: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + 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.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + 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 .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -2223,34 +2157,35 @@ .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst XYZ.ABC/ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' IL_001c: ldarg.2 - IL_001d: stloc.2 + IL_001d: stloc.3 IL_001e: ldarg.0 IL_001f: castclass XYZ.ABC/ABC/MyExn IL_0024: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() @@ -2281,52 +2216,51 @@ Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 56 (0x38) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst XYZ.ABC/ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.ABC/ABC/MyExn - IL_001c: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.ABC/ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0013: ldarg.0 + IL_0014: castclass XYZ.ABC/ABC/MyExn + IL_0019: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass XYZ.ABC/ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl index 18fba70daff..25ca4618741 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001850 Length: 0x0000055C } .module ToplevelNamespace.dll -// MVID: {620FB591-218B-729A-A745-038391B50F62} +// MVID: {6220E46F-218B-729A-A745-03836FE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06FC0000 +// Image base: 0x05570000 // =============== CLASS MEMBERS DECLARATION =================== @@ -146,7 +146,7 @@ instance int32 CompareTo(class XYZ.Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -156,64 +156,58 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelNamespace.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -234,7 +228,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -248,115 +242,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any XYZ.Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any XYZ.Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 XYZ.Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 XYZ.Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 XYZ.Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 XYZ.Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any XYZ.Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any XYZ.Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.Expr::item + 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.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + 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 .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -376,7 +362,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -385,97 +371,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst XYZ.Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 XYZ.Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 XYZ.Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + 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.Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 XYZ.Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 XYZ.Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -579,41 +559,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.MyExn - IL_0015: call instance int32 XYZ.MyExn::get_Data0() + 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.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + 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 .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -637,34 +615,35 @@ .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst XYZ.MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' IL_001c: ldarg.2 - IL_001d: stloc.2 + IL_001d: stloc.3 IL_001e: ldarg.0 IL_001f: castclass XYZ.MyExn IL_0024: call instance int32 XYZ.MyExn::get_Data0() @@ -695,52 +674,51 @@ Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 56 (0x38) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst XYZ.MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.MyExn - IL_001c: call instance int32 XYZ.MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.MyExn - IL_0027: call instance int32 XYZ.MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0013: ldarg.0 + IL_0014: castclass XYZ.MyExn + IL_0019: call instance int32 XYZ.MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass XYZ.MyExn + IL_0024: call instance int32 XYZ.MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -919,7 +897,7 @@ instance int32 CompareTo(class XYZ.ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, @@ -928,64 +906,58 @@ [4] int32 V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1006,7 +978,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, @@ -1020,115 +992,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any XYZ.ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any XYZ.ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 XYZ.ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 XYZ.ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 XYZ.ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 XYZ.ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any XYZ.ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any XYZ.ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.ABC/Expr::item + 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.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + 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 .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1148,7 +1112,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, @@ -1157,97 +1121,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst XYZ.ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 XYZ.ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 XYZ.ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + 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/Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 XYZ.ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 XYZ.ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -1351,41 +1309,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.ABC/MyExn - IL_0015: call instance int32 XYZ.ABC/MyExn::get_Data0() + 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.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + 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 .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -1409,34 +1365,35 @@ .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst XYZ.ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' IL_001c: ldarg.2 - IL_001d: stloc.2 + IL_001d: stloc.3 IL_001e: ldarg.0 IL_001f: castclass XYZ.ABC/MyExn IL_0024: call instance int32 XYZ.ABC/MyExn::get_Data0() @@ -1467,52 +1424,51 @@ Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 56 (0x38) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst XYZ.ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.ABC/MyExn - IL_001c: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0013: ldarg.0 + IL_0014: castclass XYZ.ABC/MyExn + IL_0019: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass XYZ.ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -1691,7 +1647,7 @@ instance int32 CompareTo(class XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, @@ -1700,64 +1656,58 @@ [4] int32 V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1778,7 +1728,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, @@ -1792,115 +1742,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any XYZ.ABC/ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any XYZ.ABC/ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any XYZ.ABC/ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any XYZ.ABC/ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.ABC/ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.ABC/ABC/Expr::item + 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.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + 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 .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1920,7 +1862,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, @@ -1929,97 +1871,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.ABC/ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst XYZ.ABC/ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + 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: ldloc.1 - IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -2123,41 +2059,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.ABC/ABC/MyExn - IL_0015: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + 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.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + 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 .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -2181,34 +2115,35 @@ .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst XYZ.ABC/ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' IL_001c: ldarg.2 - IL_001d: stloc.2 + IL_001d: stloc.3 IL_001e: ldarg.0 IL_001f: castclass XYZ.ABC/ABC/MyExn IL_0024: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() @@ -2239,52 +2174,51 @@ Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 56 (0x38) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst XYZ.ABC/ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.ABC/ABC/MyExn - IL_001c: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.ABC/ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0013: ldarg.0 + IL_0014: castclass XYZ.ABC/ABC/MyExn + IL_0019: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass XYZ.ABC/ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl index 0d494197f3c..7260c700b86 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x000007A8 Length: 0x0000021F } .module StaticInit_Struct01.dll -// MVID: {61FC3629-05F6-D6CB-A745-03832936FC61} +// MVID: {6220CCA3-05F6-D6CB-A745-0383A3CC2062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05360000 +// Image base: 0x066A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -174,38 +174,41 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 42 (0x2a) + // Code size 45 (0x2d) .maxstack 4 - .locals init ([0] valuetype StaticInit_Struct01/C V_0, - [1] valuetype StaticInit_Struct01/C& V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .locals init ([0] object V_0, + [1] valuetype StaticInit_Struct01/C V_1, + [2] valuetype StaticInit_Struct01/C& V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\StaticInit\\StaticInit_Struct01.fs' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0028 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst StaticInit_Struct01/C + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_002b .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any StaticInit_Struct01/C - IL_0010: stloc.0 - IL_0011: ldloca.s V_0 + IL_000d: ldarg.1 + IL_000e: unbox.any StaticInit_Struct01/C IL_0013: stloc.1 - IL_0014: ldarg.2 - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s - IL_001c: ldloc.1 - IL_001d: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s - IL_0022: call bool [netstandard]System.DateTime::Equals(valuetype [netstandard]System.DateTime, + IL_0014: ldloca.s V_1 + IL_0016: stloc.2 + IL_0017: ldarg.2 + IL_0018: stloc.3 + IL_0019: ldarg.0 + IL_001a: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_001f: ldloc.2 + IL_0020: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_0025: call bool [netstandard]System.DateTime::Equals(valuetype [netstandard]System.DateTime, valuetype [netstandard]System.DateTime) - IL_0027: ret + IL_002a: ret .line 100001,100001 : 0,0 '' - IL_0028: ldc.i4.0 - IL_0029: ret + IL_002b: ldc.i4.0 + IL_002c: ret } // end of method C::Equals .method public specialname rtspecialname @@ -270,28 +273,31 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 27 (0x1b) + // Code size 30 (0x1e) .maxstack 4 - .locals init ([0] valuetype StaticInit_Struct01/C V_0) + .locals init ([0] object V_0, + [1] valuetype StaticInit_Struct01/C V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0019 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst StaticInit_Struct01/C + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any StaticInit_Struct01/C - IL_0010: stloc.0 - IL_0011: ldarg.0 - IL_0012: ldloc.0 - IL_0013: call instance bool StaticInit_Struct01/C::Equals(valuetype StaticInit_Struct01/C) - IL_0018: ret + IL_000d: ldarg.1 + IL_000e: unbox.any StaticInit_Struct01/C + IL_0013: stloc.1 + IL_0014: ldarg.0 + IL_0015: ldloc.1 + IL_0016: call instance bool StaticInit_Struct01/C::Equals(valuetype StaticInit_Struct01/C) + IL_001b: ret .line 100001,100001 : 0,0 '' - IL_0019: ldc.i4.0 - IL_001a: ret + IL_001c: ldc.i4.0 + IL_001d: ret } // end of method C::Equals .method private specialname rtspecialname static diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl index 9a57805b166..7787966afd7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000680 Length: 0x000001D9 } .module SteppingMatch06.dll -// MVID: {61E07031-4FAE-FD21-A745-03833170E061} +// MVID: {6220E156-4FAE-FD21-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06D40000 +// Image base: 0x06930000 // =============== CLASS MEMBERS DECLARATION =================== @@ -205,62 +205,56 @@ instance int32 CompareTo(class SteppingMatch06/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 48 (0x30) + // Code size 39 (0x27) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch06.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0020 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0024 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 SteppingMatch06/Discr::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 SteppingMatch06/Discr::_tag - IL_0019: stloc.1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 SteppingMatch06/Discr::_tag + IL_000c: stloc.0 + IL_000d: ldarg.1 + IL_000e: ldfld int32 SteppingMatch06/Discr::_tag + IL_0013: stloc.1 .line 100001,100001 : 0,0 '' - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un.s IL_0020 + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: bne.un.s IL_001a .line 100001,100001 : 0,0 '' - IL_001e: ldc.i4.0 - IL_001f: ret + IL_0018: ldc.i4.0 + IL_0019: ret .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldloc.1 - IL_0022: sub - IL_0023: ret + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: sub + IL_001d: ret .line 100001,100001 : 0,0 '' - IL_0024: ldc.i4.1 - IL_0025: ret + IL_001e: ldc.i4.1 + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_0026: ldarg.1 - IL_0027: ldnull - IL_0028: cgt.un - IL_002a: brfalse.s IL_002e + IL_0020: ldarg.1 + IL_0021: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0023: ldc.i4.m1 + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.0 - IL_002f: ret + IL_0025: ldc.i4.0 + IL_0026: ret } // end of method Discr::CompareTo .method public hidebysig virtual final @@ -281,7 +275,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 65 (0x41) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] class SteppingMatch06/Discr V_0, [1] int32 V_1, @@ -292,82 +286,74 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0008: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any SteppingMatch06/Discr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0030 + IL_000a: ldarg.1 + IL_000b: unbox.any SteppingMatch06/Discr + IL_0010: brfalse.s IL_002a .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: ldfld int32 SteppingMatch06/Discr::_tag - IL_001e: stloc.1 - IL_001f: ldloc.0 - IL_0020: ldfld int32 SteppingMatch06/Discr::_tag - IL_0025: stloc.2 + IL_0012: ldarg.0 + IL_0013: ldfld int32 SteppingMatch06/Discr::_tag + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: ldfld int32 SteppingMatch06/Discr::_tag + IL_001f: stloc.2 .line 100001,100001 : 0,0 '' - IL_0026: ldloc.1 - IL_0027: ldloc.2 - IL_0028: bne.un.s IL_002c + IL_0020: ldloc.1 + IL_0021: ldloc.2 + IL_0022: bne.un.s IL_0026 .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0024: ldc.i4.0 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_002c: ldloc.1 - IL_002d: ldloc.2 - IL_002e: sub - IL_002f: ret + IL_0026: ldloc.1 + IL_0027: ldloc.2 + IL_0028: sub + IL_0029: ret .line 100001,100001 : 0,0 '' - IL_0030: ldc.i4.1 - IL_0031: ret + IL_002a: ldc.i4.1 + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldarg.1 - IL_0033: unbox.any SteppingMatch06/Discr - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: brfalse.s IL_003f + IL_002c: ldarg.1 + IL_002d: unbox.any SteppingMatch06/Discr + IL_0032: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.m1 - IL_003e: ret + IL_0034: ldc.i4.m1 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_0036: ldc.i4.0 + IL_0037: ret } // end of method Discr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 17 (0x11) + // Code size 14 (0xe) .maxstack 3 .locals init ([0] int32 V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000f + IL_0001: brfalse.s IL_000c .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: ldfld int32 SteppingMatch06/Discr::_tag - IL_000e: ret + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 SteppingMatch06/Discr::_tag + IL_000b: ret .line 100001,100001 : 0,0 '' - IL_000f: ldc.i4.0 - IL_0010: ret + IL_000c: ldc.i4.0 + IL_000d: ret } // end of method Discr::GetHashCode .method public hidebysig virtual final @@ -387,7 +373,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 47 (0x2f) + // Code size 44 (0x2c) .maxstack 4 .locals init ([0] class SteppingMatch06/Discr V_0, [1] class SteppingMatch06/Discr V_1, @@ -395,90 +381,84 @@ [3] int32 V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst SteppingMatch06/Discr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst SteppingMatch06/Discr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0025 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 SteppingMatch06/Discr::_tag - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld int32 SteppingMatch06/Discr::_tag - IL_001f: stloc.3 + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.0 + IL_0010: ldfld int32 SteppingMatch06/Discr::_tag + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldfld int32 SteppingMatch06/Discr::_tag + IL_001c: stloc.3 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: ceq - IL_0024: ret + IL_001d: ldloc.2 + IL_001e: ldloc.3 + IL_001f: ceq + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_0022: ldc.i4.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: ret + IL_0024: ldarg.1 + IL_0025: ldnull + IL_0026: cgt.un + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: ret } // end of method Discr::Equals .method public hidebysig virtual final instance bool Equals(class SteppingMatch06/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 35 (0x23) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0021 + IL_0001: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_001f + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0019 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 SteppingMatch06/Discr::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 SteppingMatch06/Discr::_tag - IL_0019: stloc.1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 SteppingMatch06/Discr::_tag + IL_000c: stloc.0 + IL_000d: ldarg.1 + IL_000e: ldfld int32 SteppingMatch06/Discr::_tag + IL_0013: stloc.1 .line 100001,100001 : 0,0 '' - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: ceq - IL_001e: ret + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: ceq + IL_0018: ret .line 100001,100001 : 0,0 '' - IL_001f: ldc.i4.0 - IL_0020: ret + IL_0019: ldc.i4.0 + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: ldc.i4.0 - IL_0026: ceq - IL_0028: ret + IL_001b: ldarg.1 + IL_001c: ldnull + IL_001d: cgt.un + IL_001f: ldc.i4.0 + IL_0020: ceq + IL_0022: ret } // end of method Discr::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl index 733e90f336d..14ce575bea5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000680 Length: 0x000001D9 } .module SteppingMatch07.dll -// MVID: {61E07031-D373-07F3-A745-03833170E061} +// MVID: {6220E156-D373-07F3-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x073B0000 +// Image base: 0x05420000 // =============== CLASS MEMBERS DECLARATION =================== @@ -205,62 +205,56 @@ instance int32 CompareTo(class SteppingMatch07/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 48 (0x30) + // Code size 39 (0x27) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch07.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0020 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0024 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 SteppingMatch07/Discr::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 SteppingMatch07/Discr::_tag - IL_0019: stloc.1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 SteppingMatch07/Discr::_tag + IL_000c: stloc.0 + IL_000d: ldarg.1 + IL_000e: ldfld int32 SteppingMatch07/Discr::_tag + IL_0013: stloc.1 .line 100001,100001 : 0,0 '' - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un.s IL_0020 + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: bne.un.s IL_001a .line 100001,100001 : 0,0 '' - IL_001e: ldc.i4.0 - IL_001f: ret + IL_0018: ldc.i4.0 + IL_0019: ret .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldloc.1 - IL_0022: sub - IL_0023: ret + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: sub + IL_001d: ret .line 100001,100001 : 0,0 '' - IL_0024: ldc.i4.1 - IL_0025: ret + IL_001e: ldc.i4.1 + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_0026: ldarg.1 - IL_0027: ldnull - IL_0028: cgt.un - IL_002a: brfalse.s IL_002e + IL_0020: ldarg.1 + IL_0021: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0023: ldc.i4.m1 + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.0 - IL_002f: ret + IL_0025: ldc.i4.0 + IL_0026: ret } // end of method Discr::CompareTo .method public hidebysig virtual final @@ -281,7 +275,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 65 (0x41) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] class SteppingMatch07/Discr V_0, [1] int32 V_1, @@ -292,82 +286,74 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0008: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any SteppingMatch07/Discr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0030 + IL_000a: ldarg.1 + IL_000b: unbox.any SteppingMatch07/Discr + IL_0010: brfalse.s IL_002a .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: ldfld int32 SteppingMatch07/Discr::_tag - IL_001e: stloc.1 - IL_001f: ldloc.0 - IL_0020: ldfld int32 SteppingMatch07/Discr::_tag - IL_0025: stloc.2 + IL_0012: ldarg.0 + IL_0013: ldfld int32 SteppingMatch07/Discr::_tag + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: ldfld int32 SteppingMatch07/Discr::_tag + IL_001f: stloc.2 .line 100001,100001 : 0,0 '' - IL_0026: ldloc.1 - IL_0027: ldloc.2 - IL_0028: bne.un.s IL_002c + IL_0020: ldloc.1 + IL_0021: ldloc.2 + IL_0022: bne.un.s IL_0026 .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0024: ldc.i4.0 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_002c: ldloc.1 - IL_002d: ldloc.2 - IL_002e: sub - IL_002f: ret + IL_0026: ldloc.1 + IL_0027: ldloc.2 + IL_0028: sub + IL_0029: ret .line 100001,100001 : 0,0 '' - IL_0030: ldc.i4.1 - IL_0031: ret + IL_002a: ldc.i4.1 + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldarg.1 - IL_0033: unbox.any SteppingMatch07/Discr - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: brfalse.s IL_003f + IL_002c: ldarg.1 + IL_002d: unbox.any SteppingMatch07/Discr + IL_0032: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.m1 - IL_003e: ret + IL_0034: ldc.i4.m1 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_0036: ldc.i4.0 + IL_0037: ret } // end of method Discr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 17 (0x11) + // Code size 14 (0xe) .maxstack 3 .locals init ([0] int32 V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000f + IL_0001: brfalse.s IL_000c .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: ldfld int32 SteppingMatch07/Discr::_tag - IL_000e: ret + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 SteppingMatch07/Discr::_tag + IL_000b: ret .line 100001,100001 : 0,0 '' - IL_000f: ldc.i4.0 - IL_0010: ret + IL_000c: ldc.i4.0 + IL_000d: ret } // end of method Discr::GetHashCode .method public hidebysig virtual final @@ -387,7 +373,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 47 (0x2f) + // Code size 44 (0x2c) .maxstack 4 .locals init ([0] class SteppingMatch07/Discr V_0, [1] class SteppingMatch07/Discr V_1, @@ -395,90 +381,84 @@ [3] int32 V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst SteppingMatch07/Discr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst SteppingMatch07/Discr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0025 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 SteppingMatch07/Discr::_tag - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld int32 SteppingMatch07/Discr::_tag - IL_001f: stloc.3 + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.0 + IL_0010: ldfld int32 SteppingMatch07/Discr::_tag + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldfld int32 SteppingMatch07/Discr::_tag + IL_001c: stloc.3 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: ceq - IL_0024: ret + IL_001d: ldloc.2 + IL_001e: ldloc.3 + IL_001f: ceq + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_0022: ldc.i4.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: ret + IL_0024: ldarg.1 + IL_0025: ldnull + IL_0026: cgt.un + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: ret } // end of method Discr::Equals .method public hidebysig virtual final instance bool Equals(class SteppingMatch07/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 35 (0x23) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0021 + IL_0001: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_001f + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0019 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 SteppingMatch07/Discr::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 SteppingMatch07/Discr::_tag - IL_0019: stloc.1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 SteppingMatch07/Discr::_tag + IL_000c: stloc.0 + IL_000d: ldarg.1 + IL_000e: ldfld int32 SteppingMatch07/Discr::_tag + IL_0013: stloc.1 .line 100001,100001 : 0,0 '' - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: ceq - IL_001e: ret + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: ceq + IL_0018: ret .line 100001,100001 : 0,0 '' - IL_001f: ldc.i4.0 - IL_0020: ret + IL_0019: ldc.i4.0 + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: ldc.i4.0 - IL_0026: ceq - IL_0028: ret + IL_001b: ldarg.1 + IL_001c: ldnull + IL_001d: cgt.un + IL_001f: ldc.i4.0 + IL_0020: ceq + IL_0022: ret } // end of method Discr::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl index 92e53fdc94f..68c9a116549 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000688 Length: 0x000001CD } .module TestFunction16.exe -// MVID: {61EFEE1F-A624-45C5-A745-03831FEEEF61} +// MVID: {6220E156-A624-45C5-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x069E0000 +// Image base: 0x068C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -174,7 +174,7 @@ instance int32 CompareTo(class TestFunction16/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 120 (0x78) + // Code size 111 (0x6f) .maxstack 4 .locals init ([0] class TestFunction16/U V_0, [1] class TestFunction16/U V_1, @@ -188,110 +188,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction16.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006e + IL_0001: brfalse.s IL_0068 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006c + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0066 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 TestFunction16/U::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 TestFunction16/U::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 TestFunction16/U::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 TestFunction16/U::item1 + IL_0020: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 100001,100001 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 100001,100001 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 100001,100001 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 100001,100001 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 100001,100001 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 100001,100001 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.s V_6 - IL_004d: ldloc.0 - IL_004e: ldfld int32 TestFunction16/U::item2 - IL_0053: stloc.s V_7 - IL_0055: ldloc.1 - IL_0056: ldfld int32 TestFunction16/U::item2 - IL_005b: stloc.s V_8 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.s V_6 + IL_0047: ldloc.0 + IL_0048: ldfld int32 TestFunction16/U::item2 + IL_004d: stloc.s V_7 + IL_004f: ldloc.1 + IL_0050: ldfld int32 TestFunction16/U::item2 + IL_0055: stloc.s V_8 .line 100001,100001 : 0,0 '' - IL_005d: ldloc.s V_7 - IL_005f: ldloc.s V_8 - IL_0061: bge.s IL_0065 + IL_0057: ldloc.s V_7 + IL_0059: ldloc.s V_8 + IL_005b: bge.s IL_005f .line 100001,100001 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_005d: ldc.i4.m1 + IL_005e: ret .line 100001,100001 : 0,0 '' - IL_0065: ldloc.s V_7 - IL_0067: ldloc.s V_8 - IL_0069: cgt - IL_006b: ret + IL_005f: ldloc.s V_7 + IL_0061: ldloc.s V_8 + IL_0063: cgt + IL_0065: ret .line 100001,100001 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_0066: ldc.i4.1 + IL_0067: ret .line 100001,100001 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: ldnull - IL_0070: cgt.un - IL_0072: brfalse.s IL_0076 + IL_0068: ldarg.1 + IL_0069: brfalse.s IL_006d .line 100001,100001 : 0,0 '' - IL_0074: ldc.i4.m1 - IL_0075: ret + IL_006b: ldc.i4.m1 + IL_006c: ret .line 100001,100001 : 0,0 '' - IL_0076: ldc.i4.0 - IL_0077: ret + IL_006d: ldc.i4.0 + IL_006e: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -312,7 +306,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 130 (0x82) + // Code size 121 (0x79) .maxstack 4 .locals init ([0] class TestFunction16/U V_0, [1] class TestFunction16/U V_1, @@ -330,119 +324,113 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0073 - - .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any TestFunction16/U - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0071 - - .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop - .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.s V_4 - IL_0021: ldloc.1 - IL_0022: ldfld int32 TestFunction16/U::item1 - IL_0027: stloc.s V_5 - IL_0029: ldloc.2 - IL_002a: ldfld int32 TestFunction16/U::item1 - IL_002f: stloc.s V_6 + IL_0008: brfalse.s IL_006d + .line 100001,100001 : 0,0 '' - IL_0031: ldloc.s V_5 - IL_0033: ldloc.s V_6 - IL_0035: bge.s IL_003b + IL_000a: ldarg.1 + IL_000b: unbox.any TestFunction16/U + IL_0010: brfalse.s IL_006b .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.m1 + IL_0012: ldarg.0 + IL_0013: pop + .line 100001,100001 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.s V_4 + IL_001b: ldloc.1 + IL_001c: ldfld int32 TestFunction16/U::item1 + IL_0021: stloc.s V_5 + IL_0023: ldloc.2 + IL_0024: ldfld int32 TestFunction16/U::item1 + IL_0029: stloc.s V_6 .line 100001,100001 : 0,0 '' - IL_0038: nop - IL_0039: br.s IL_0042 + IL_002b: ldloc.s V_5 + IL_002d: ldloc.s V_6 + IL_002f: bge.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003b: ldloc.s V_5 - IL_003d: ldloc.s V_6 - IL_003f: cgt + IL_0031: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_0041: nop + IL_0032: nop + IL_0033: br.s IL_003c + .line 100001,100001 : 0,0 '' - IL_0042: stloc.3 + IL_0035: ldloc.s V_5 + IL_0037: ldloc.s V_6 + IL_0039: cgt .line 100001,100001 : 0,0 '' - IL_0043: ldloc.3 - IL_0044: ldc.i4.0 - IL_0045: bge.s IL_0049 + IL_003b: nop + .line 100001,100001 : 0,0 '' + IL_003c: stloc.3 + .line 100001,100001 : 0,0 '' + IL_003d: ldloc.3 + IL_003e: ldc.i4.0 + IL_003f: bge.s IL_0043 .line 100001,100001 : 0,0 '' - IL_0047: ldloc.3 - IL_0048: ret + IL_0041: ldloc.3 + IL_0042: ret .line 100001,100001 : 0,0 '' - IL_0049: ldloc.3 - IL_004a: ldc.i4.0 - IL_004b: ble.s IL_004f + IL_0043: ldloc.3 + IL_0044: ldc.i4.0 + IL_0045: ble.s IL_0049 .line 100001,100001 : 0,0 '' - IL_004d: ldloc.3 - IL_004e: ret + IL_0047: ldloc.3 + IL_0048: ret .line 100001,100001 : 0,0 '' - IL_004f: ldarg.2 - IL_0050: stloc.s V_7 - IL_0052: ldloc.1 - IL_0053: ldfld int32 TestFunction16/U::item2 - IL_0058: stloc.s V_8 - IL_005a: ldloc.2 - IL_005b: ldfld int32 TestFunction16/U::item2 - IL_0060: stloc.s V_9 + IL_0049: ldarg.2 + IL_004a: stloc.s V_7 + IL_004c: ldloc.1 + IL_004d: ldfld int32 TestFunction16/U::item2 + IL_0052: stloc.s V_8 + IL_0054: ldloc.2 + IL_0055: ldfld int32 TestFunction16/U::item2 + IL_005a: stloc.s V_9 .line 100001,100001 : 0,0 '' - IL_0062: ldloc.s V_8 - IL_0064: ldloc.s V_9 - IL_0066: bge.s IL_006a + IL_005c: ldloc.s V_8 + IL_005e: ldloc.s V_9 + IL_0060: bge.s IL_0064 .line 100001,100001 : 0,0 '' - IL_0068: ldc.i4.m1 - IL_0069: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 100001,100001 : 0,0 '' - IL_006a: ldloc.s V_8 - IL_006c: ldloc.s V_9 - IL_006e: cgt - IL_0070: ret + IL_0064: ldloc.s V_8 + IL_0066: ldloc.s V_9 + IL_0068: cgt + IL_006a: ret .line 100001,100001 : 0,0 '' - IL_0071: ldc.i4.1 - IL_0072: ret + IL_006b: ldc.i4.1 + IL_006c: ret .line 100001,100001 : 0,0 '' - IL_0073: ldarg.1 - IL_0074: unbox.any TestFunction16/U - IL_0079: ldnull - IL_007a: cgt.un - IL_007c: brfalse.s IL_0080 + IL_006d: ldarg.1 + IL_006e: unbox.any TestFunction16/U + IL_0073: brfalse.s IL_0077 .line 100001,100001 : 0,0 '' - IL_007e: ldc.i4.m1 - IL_007f: ret + IL_0075: ldc.i4.m1 + IL_0076: ret .line 100001,100001 : 0,0 '' - IL_0080: ldc.i4.0 - IL_0081: ret + IL_0077: ldc.i4.0 + IL_0078: ret } // end of method U::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 61 (0x3d) .maxstack 7 .locals init ([0] int32 V_0, [1] class TestFunction16/U V_1, @@ -450,57 +438,55 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 TestFunction16/U::item2 + 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 TestFunction16/U::item2 + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldc.i4 0x9e3779b9 - IL_002a: ldarg.1 - IL_002b: stloc.3 - IL_002c: ldloc.1 - IL_002d: ldfld int32 TestFunction16/U::item1 + 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 TestFunction16/U::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl IL_0032: ldloc.0 - IL_0033: ldc.i4.6 - IL_0034: shl - IL_0035: ldloc.0 - IL_0036: ldc.i4.2 - IL_0037: shr - IL_0038: add - IL_0039: add - IL_003a: add - IL_003b: stloc.0 - IL_003c: ldloc.0 - IL_003d: ret + 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 .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003b: ldc.i4.0 + IL_003c: ret } // end of method U::GetHashCode .method public hidebysig virtual final @@ -520,7 +506,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 73 (0x49) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class TestFunction16/U V_0, [1] class TestFunction16/U V_1, @@ -530,124 +516,118 @@ [5] class [mscorlib]System.Collections.IEqualityComparer V_5) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0041 + IL_0001: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst TestFunction16/U - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst TestFunction16/U + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003f + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_003c .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000f: ldarg.0 + IL_0010: pop .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 TestFunction16/U::item1 - IL_0021: ldloc.3 - IL_0022: ldfld int32 TestFunction16/U::item1 - IL_0027: ceq - IL_0029: brfalse.s IL_003d - - .line 100001,100001 : 0,0 '' - IL_002b: ldarg.2 - IL_002c: stloc.s V_5 - IL_002e: ldloc.2 - IL_002f: ldfld int32 TestFunction16/U::item2 - IL_0034: ldloc.3 - IL_0035: ldfld int32 TestFunction16/U::item2 - IL_003a: ceq - IL_003c: ret + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 TestFunction16/U::item1 + IL_001e: ldloc.3 + IL_001f: ldfld int32 TestFunction16/U::item1 + IL_0024: ceq + IL_0026: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.0 - IL_003e: ret + IL_0028: ldarg.2 + IL_0029: stloc.s V_5 + IL_002b: ldloc.2 + IL_002c: ldfld int32 TestFunction16/U::item2 + IL_0031: ldloc.3 + IL_0032: ldfld int32 TestFunction16/U::item2 + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: ldnull - IL_0043: cgt.un - IL_0045: ldc.i4.0 - IL_0046: ceq - IL_0048: ret + IL_003c: ldc.i4.0 + IL_003d: ret + + .line 100001,100001 : 0,0 '' + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method U::Equals .method public hidebysig virtual final instance bool Equals(class TestFunction16/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class TestFunction16/U V_0, [1] class TestFunction16/U V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 TestFunction16/U::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 TestFunction16/U::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 TestFunction16/U::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 TestFunction16/U::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 TestFunction16/U::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 TestFunction16/U::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method U::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl index cadb6fe4694..0d46ddc1a9c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000678 Length: 0x000001CD } .module TestFunction17.exe -// MVID: {61EFEE1F-A624-45A8-A745-03831FEEEF61} +// MVID: {6220E156-A624-45A8-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06AF0000 +// Image base: 0x051E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -119,7 +119,7 @@ instance int32 CompareTo(class TestFunction17/R obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 108 (0x6c) + // Code size 99 (0x63) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -131,103 +131,97 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction17.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0062 + IL_0001: brfalse.s IL_005c .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0060 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_005a .line 100001,100001 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 TestFunction17/R::x@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 TestFunction17/R::x@ - IL_001f: stloc.3 + IL_0006: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 TestFunction17/R::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 TestFunction17/R::x@ + IL_0019: stloc.3 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: bge.s IL_0022 .line 100001,100001 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_001e: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_001f: nop + IL_0020: br.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0022: ldloc.2 + IL_0023: ldloc.3 + IL_0024: cgt .line 100001,100001 : 0,0 '' - IL_002c: nop + IL_0026: nop .line 100001,100001 : 0,0 '' - IL_002d: stloc.0 + IL_0027: stloc.0 .line 100001,100001 : 0,0 '' - IL_002e: ldloc.0 - IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_0028: ldloc.0 + IL_0029: ldc.i4.0 + IL_002a: bge.s IL_002e .line 100001,100001 : 0,0 '' - IL_0032: ldloc.0 - IL_0033: ret + IL_002c: ldloc.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a + IL_002e: ldloc.0 + IL_002f: ldc.i4.0 + IL_0030: ble.s IL_0034 .line 100001,100001 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0032: ldloc.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.s V_4 - IL_0041: ldarg.0 - IL_0042: ldfld int32 TestFunction17/R::y@ - IL_0047: stloc.s V_5 - IL_0049: ldarg.1 - IL_004a: ldfld int32 TestFunction17/R::y@ - IL_004f: stloc.s V_6 + IL_0034: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0039: stloc.s V_4 + IL_003b: ldarg.0 + IL_003c: ldfld int32 TestFunction17/R::y@ + IL_0041: stloc.s V_5 + IL_0043: ldarg.1 + IL_0044: ldfld int32 TestFunction17/R::y@ + IL_0049: stloc.s V_6 .line 100001,100001 : 0,0 '' - IL_0051: ldloc.s V_5 - IL_0053: ldloc.s V_6 - IL_0055: bge.s IL_0059 + IL_004b: ldloc.s V_5 + IL_004d: ldloc.s V_6 + IL_004f: bge.s IL_0053 .line 100001,100001 : 0,0 '' - IL_0057: ldc.i4.m1 - IL_0058: ret + IL_0051: ldc.i4.m1 + IL_0052: ret .line 100001,100001 : 0,0 '' - IL_0059: ldloc.s V_5 - IL_005b: ldloc.s V_6 - IL_005d: cgt - IL_005f: ret + IL_0053: ldloc.s V_5 + IL_0055: ldloc.s V_6 + IL_0057: cgt + IL_0059: ret .line 100001,100001 : 0,0 '' - IL_0060: ldc.i4.1 - IL_0061: ret + IL_005a: ldc.i4.1 + IL_005b: ret .line 100001,100001 : 0,0 '' - IL_0062: ldarg.1 - IL_0063: ldnull - IL_0064: cgt.un - IL_0066: brfalse.s IL_006a + IL_005c: ldarg.1 + IL_005d: brfalse.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0068: ldc.i4.m1 - IL_0069: ret + IL_005f: ldc.i4.m1 + IL_0060: ret .line 100001,100001 : 0,0 '' - IL_006a: ldc.i4.0 - IL_006b: ret + IL_0061: ldc.i4.0 + IL_0062: ret } // end of method R::CompareTo .method public hidebysig virtual final @@ -248,7 +242,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 125 (0x7d) + // Code size 116 (0x74) .maxstack 4 .locals init ([0] class TestFunction17/R V_0, [1] class TestFunction17/R V_1, @@ -267,161 +261,153 @@ IL_0008: stloc.1 .line 100001,100001 : 0,0 '' IL_0009: ldarg.0 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse.s IL_006e + IL_000a: brfalse.s IL_0068 .line 100001,100001 : 0,0 '' - IL_000f: ldarg.1 - IL_0010: unbox.any TestFunction17/R - IL_0015: ldnull - IL_0016: cgt.un - IL_0018: brfalse.s IL_006c + IL_000c: ldarg.1 + IL_000d: unbox.any TestFunction17/R + IL_0012: brfalse.s IL_0066 .line 100001,100001 : 0,0 '' - IL_001a: ldarg.2 - IL_001b: stloc.3 - IL_001c: ldarg.0 - IL_001d: ldfld int32 TestFunction17/R::x@ - IL_0022: stloc.s V_4 - IL_0024: ldloc.1 - IL_0025: ldfld int32 TestFunction17/R::x@ - IL_002a: stloc.s V_5 + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 TestFunction17/R::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 TestFunction17/R::x@ + IL_0024: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_002c: ldloc.s V_4 - IL_002e: ldloc.s V_5 - IL_0030: bge.s IL_0036 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.s V_5 + IL_002a: bge.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.m1 + IL_002c: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_0033: nop - IL_0034: br.s IL_003d + IL_002d: nop + IL_002e: br.s IL_0037 .line 100001,100001 : 0,0 '' - IL_0036: ldloc.s V_4 - IL_0038: ldloc.s V_5 - IL_003a: cgt + IL_0030: ldloc.s V_4 + IL_0032: ldloc.s V_5 + IL_0034: cgt .line 100001,100001 : 0,0 '' - IL_003c: nop + IL_0036: nop .line 100001,100001 : 0,0 '' - IL_003d: stloc.2 + IL_0037: stloc.2 .line 100001,100001 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ldc.i4.0 - IL_0040: bge.s IL_0044 + IL_0038: ldloc.2 + IL_0039: ldc.i4.0 + IL_003a: bge.s IL_003e .line 100001,100001 : 0,0 '' - IL_0042: ldloc.2 - IL_0043: ret + IL_003c: ldloc.2 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ldc.i4.0 - IL_0046: ble.s IL_004a + IL_003e: ldloc.2 + IL_003f: ldc.i4.0 + IL_0040: ble.s IL_0044 .line 100001,100001 : 0,0 '' - IL_0048: ldloc.2 - IL_0049: ret + IL_0042: ldloc.2 + IL_0043: ret .line 100001,100001 : 0,0 '' - IL_004a: ldarg.2 - IL_004b: stloc.s V_6 - IL_004d: ldarg.0 - IL_004e: ldfld int32 TestFunction17/R::y@ - IL_0053: stloc.s V_7 - IL_0055: ldloc.1 - IL_0056: ldfld int32 TestFunction17/R::y@ - IL_005b: stloc.s V_8 + IL_0044: ldarg.2 + IL_0045: stloc.s V_6 + IL_0047: ldarg.0 + IL_0048: ldfld int32 TestFunction17/R::y@ + IL_004d: stloc.s V_7 + IL_004f: ldloc.1 + IL_0050: ldfld int32 TestFunction17/R::y@ + IL_0055: stloc.s V_8 .line 100001,100001 : 0,0 '' - IL_005d: ldloc.s V_7 - IL_005f: ldloc.s V_8 - IL_0061: bge.s IL_0065 + IL_0057: ldloc.s V_7 + IL_0059: ldloc.s V_8 + IL_005b: bge.s IL_005f .line 100001,100001 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_005d: ldc.i4.m1 + IL_005e: ret .line 100001,100001 : 0,0 '' - IL_0065: ldloc.s V_7 - IL_0067: ldloc.s V_8 - IL_0069: cgt - IL_006b: ret + IL_005f: ldloc.s V_7 + IL_0061: ldloc.s V_8 + IL_0063: cgt + IL_0065: ret .line 100001,100001 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_0066: ldc.i4.1 + IL_0067: ret .line 100001,100001 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: unbox.any TestFunction17/R - IL_0074: ldnull - IL_0075: cgt.un - IL_0077: brfalse.s IL_007b + IL_0068: ldarg.1 + IL_0069: unbox.any TestFunction17/R + IL_006e: brfalse.s IL_0072 .line 100001,100001 : 0,0 '' - IL_0079: ldc.i4.m1 - IL_007a: ret + IL_0070: ldc.i4.m1 + IL_0071: ret .line 100001,100001 : 0,0 '' - IL_007b: ldc.i4.0 - IL_007c: ret + IL_0072: ldc.i4.0 + IL_0073: ret } // end of method R::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 58 (0x3a) + // Code size 55 (0x37) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0038 + IL_0001: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: ldfld int32 TestFunction17/R::y@ + 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 TestFunction17/R::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl IL_0015: ldloc.0 - IL_0016: ldc.i4.6 - IL_0017: shl - IL_0018: ldloc.0 - IL_0019: ldc.i4.2 - IL_001a: shr - IL_001b: add - IL_001c: add - IL_001d: add - IL_001e: stloc.0 - IL_001f: ldc.i4 0x9e3779b9 - IL_0024: ldarg.1 - IL_0025: stloc.2 - IL_0026: ldarg.0 - IL_0027: ldfld int32 TestFunction17/R::x@ + 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 TestFunction17/R::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl IL_002c: ldloc.0 - IL_002d: ldc.i4.6 - IL_002e: shl - IL_002f: ldloc.0 - IL_0030: ldc.i4.2 - IL_0031: shr - IL_0032: add - IL_0033: add - IL_0034: add - IL_0035: stloc.0 - IL_0036: ldloc.0 - IL_0037: ret - - .line 100001,100001 : 0,0 '' - IL_0038: ldc.i4.0 - IL_0039: ret + 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 + + .line 100001,100001 : 0,0 '' + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method R::GetHashCode .method public hidebysig virtual final @@ -441,7 +427,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 65 (0x41) + // Code size 62 (0x3e) .maxstack 4 .locals init ([0] class TestFunction17/R V_0, [1] class TestFunction17/R V_1, @@ -449,106 +435,100 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0039 + IL_0001: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst TestFunction17/R - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst TestFunction17/R + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0037 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldarg.2 - IL_0013: stloc.2 - IL_0014: ldarg.0 - IL_0015: ldfld int32 TestFunction17/R::x@ - IL_001a: ldloc.1 - IL_001b: ldfld int32 TestFunction17/R::x@ - IL_0020: ceq - IL_0022: brfalse.s IL_0035 + IL_000f: ldarg.2 + IL_0010: stloc.2 + IL_0011: ldarg.0 + IL_0012: ldfld int32 TestFunction17/R::x@ + IL_0017: ldloc.1 + IL_0018: ldfld int32 TestFunction17/R::x@ + IL_001d: ceq + IL_001f: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0024: ldarg.2 - IL_0025: stloc.3 - IL_0026: ldarg.0 - IL_0027: ldfld int32 TestFunction17/R::y@ - IL_002c: ldloc.1 - IL_002d: ldfld int32 TestFunction17/R::y@ - IL_0032: ceq - IL_0034: ret + IL_0021: ldarg.2 + IL_0022: stloc.3 + IL_0023: ldarg.0 + IL_0024: ldfld int32 TestFunction17/R::y@ + IL_0029: ldloc.1 + IL_002a: ldfld int32 TestFunction17/R::y@ + IL_002f: ceq + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0039: ldarg.1 - IL_003a: ldnull - IL_003b: cgt.un - IL_003d: ldc.i4.0 - IL_003e: ceq - IL_0040: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method R::Equals .method public hidebysig virtual final instance bool Equals(class TestFunction17/R obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 47 (0x2f) .maxstack 8 .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 + IL_0006: ldarg.0 + IL_0007: ldfld int32 TestFunction17/R::x@ + IL_000c: ldarg.1 IL_000d: ldfld int32 TestFunction17/R::x@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 TestFunction17/R::x@ - IL_0018: bne.un.s IL_0029 + IL_0012: bne.un.s IL_0023 .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 + IL_0014: ldarg.0 + IL_0015: ldfld int32 TestFunction17/R::y@ + IL_001a: ldarg.1 IL_001b: ldfld int32 TestFunction17/R::y@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 TestFunction17/R::y@ - IL_0026: ceq - IL_0028: ret + IL_0020: ceq + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_0023: ldc.i4.0 + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_0025: ldc.i4.0 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret } // end of method R::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl index 26fad449662..0fbf7367fc5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000680 Length: 0x000001CD } .module TestFunction21.exe -// MVID: {61EFEE1F-A643-45E6-A745-03831FEEEF61} +// MVID: {6220E156-A643-45E6-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x069B0000 +// Image base: 0x06FC0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -174,7 +174,7 @@ instance int32 CompareTo(class TestFunction21/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 120 (0x78) + // Code size 111 (0x6f) .maxstack 4 .locals init ([0] class TestFunction21/U V_0, [1] class TestFunction21/U V_1, @@ -188,110 +188,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction21.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006e + IL_0001: brfalse.s IL_0068 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006c + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0066 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 TestFunction21/U::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 TestFunction21/U::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 TestFunction21/U::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 TestFunction21/U::item1 + IL_0020: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 100001,100001 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 100001,100001 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 100001,100001 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 100001,100001 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 100001,100001 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 100001,100001 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.s V_6 - IL_004d: ldloc.0 - IL_004e: ldfld int32 TestFunction21/U::item2 - IL_0053: stloc.s V_7 - IL_0055: ldloc.1 - IL_0056: ldfld int32 TestFunction21/U::item2 - IL_005b: stloc.s V_8 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.s V_6 + IL_0047: ldloc.0 + IL_0048: ldfld int32 TestFunction21/U::item2 + IL_004d: stloc.s V_7 + IL_004f: ldloc.1 + IL_0050: ldfld int32 TestFunction21/U::item2 + IL_0055: stloc.s V_8 .line 100001,100001 : 0,0 '' - IL_005d: ldloc.s V_7 - IL_005f: ldloc.s V_8 - IL_0061: bge.s IL_0065 + IL_0057: ldloc.s V_7 + IL_0059: ldloc.s V_8 + IL_005b: bge.s IL_005f .line 100001,100001 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_005d: ldc.i4.m1 + IL_005e: ret .line 100001,100001 : 0,0 '' - IL_0065: ldloc.s V_7 - IL_0067: ldloc.s V_8 - IL_0069: cgt - IL_006b: ret + IL_005f: ldloc.s V_7 + IL_0061: ldloc.s V_8 + IL_0063: cgt + IL_0065: ret .line 100001,100001 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_0066: ldc.i4.1 + IL_0067: ret .line 100001,100001 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: ldnull - IL_0070: cgt.un - IL_0072: brfalse.s IL_0076 + IL_0068: ldarg.1 + IL_0069: brfalse.s IL_006d .line 100001,100001 : 0,0 '' - IL_0074: ldc.i4.m1 - IL_0075: ret + IL_006b: ldc.i4.m1 + IL_006c: ret .line 100001,100001 : 0,0 '' - IL_0076: ldc.i4.0 - IL_0077: ret + IL_006d: ldc.i4.0 + IL_006e: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -312,7 +306,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 130 (0x82) + // Code size 121 (0x79) .maxstack 4 .locals init ([0] class TestFunction21/U V_0, [1] class TestFunction21/U V_1, @@ -330,119 +324,113 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0073 - - .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any TestFunction21/U - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0071 - - .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop - .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.s V_4 - IL_0021: ldloc.1 - IL_0022: ldfld int32 TestFunction21/U::item1 - IL_0027: stloc.s V_5 - IL_0029: ldloc.2 - IL_002a: ldfld int32 TestFunction21/U::item1 - IL_002f: stloc.s V_6 + IL_0008: brfalse.s IL_006d + .line 100001,100001 : 0,0 '' - IL_0031: ldloc.s V_5 - IL_0033: ldloc.s V_6 - IL_0035: bge.s IL_003b + IL_000a: ldarg.1 + IL_000b: unbox.any TestFunction21/U + IL_0010: brfalse.s IL_006b .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.m1 + IL_0012: ldarg.0 + IL_0013: pop + .line 100001,100001 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.s V_4 + IL_001b: ldloc.1 + IL_001c: ldfld int32 TestFunction21/U::item1 + IL_0021: stloc.s V_5 + IL_0023: ldloc.2 + IL_0024: ldfld int32 TestFunction21/U::item1 + IL_0029: stloc.s V_6 .line 100001,100001 : 0,0 '' - IL_0038: nop - IL_0039: br.s IL_0042 + IL_002b: ldloc.s V_5 + IL_002d: ldloc.s V_6 + IL_002f: bge.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003b: ldloc.s V_5 - IL_003d: ldloc.s V_6 - IL_003f: cgt + IL_0031: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_0041: nop + IL_0032: nop + IL_0033: br.s IL_003c + .line 100001,100001 : 0,0 '' - IL_0042: stloc.3 + IL_0035: ldloc.s V_5 + IL_0037: ldloc.s V_6 + IL_0039: cgt .line 100001,100001 : 0,0 '' - IL_0043: ldloc.3 - IL_0044: ldc.i4.0 - IL_0045: bge.s IL_0049 + IL_003b: nop + .line 100001,100001 : 0,0 '' + IL_003c: stloc.3 + .line 100001,100001 : 0,0 '' + IL_003d: ldloc.3 + IL_003e: ldc.i4.0 + IL_003f: bge.s IL_0043 .line 100001,100001 : 0,0 '' - IL_0047: ldloc.3 - IL_0048: ret + IL_0041: ldloc.3 + IL_0042: ret .line 100001,100001 : 0,0 '' - IL_0049: ldloc.3 - IL_004a: ldc.i4.0 - IL_004b: ble.s IL_004f + IL_0043: ldloc.3 + IL_0044: ldc.i4.0 + IL_0045: ble.s IL_0049 .line 100001,100001 : 0,0 '' - IL_004d: ldloc.3 - IL_004e: ret + IL_0047: ldloc.3 + IL_0048: ret .line 100001,100001 : 0,0 '' - IL_004f: ldarg.2 - IL_0050: stloc.s V_7 - IL_0052: ldloc.1 - IL_0053: ldfld int32 TestFunction21/U::item2 - IL_0058: stloc.s V_8 - IL_005a: ldloc.2 - IL_005b: ldfld int32 TestFunction21/U::item2 - IL_0060: stloc.s V_9 + IL_0049: ldarg.2 + IL_004a: stloc.s V_7 + IL_004c: ldloc.1 + IL_004d: ldfld int32 TestFunction21/U::item2 + IL_0052: stloc.s V_8 + IL_0054: ldloc.2 + IL_0055: ldfld int32 TestFunction21/U::item2 + IL_005a: stloc.s V_9 .line 100001,100001 : 0,0 '' - IL_0062: ldloc.s V_8 - IL_0064: ldloc.s V_9 - IL_0066: bge.s IL_006a + IL_005c: ldloc.s V_8 + IL_005e: ldloc.s V_9 + IL_0060: bge.s IL_0064 .line 100001,100001 : 0,0 '' - IL_0068: ldc.i4.m1 - IL_0069: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 100001,100001 : 0,0 '' - IL_006a: ldloc.s V_8 - IL_006c: ldloc.s V_9 - IL_006e: cgt - IL_0070: ret + IL_0064: ldloc.s V_8 + IL_0066: ldloc.s V_9 + IL_0068: cgt + IL_006a: ret .line 100001,100001 : 0,0 '' - IL_0071: ldc.i4.1 - IL_0072: ret + IL_006b: ldc.i4.1 + IL_006c: ret .line 100001,100001 : 0,0 '' - IL_0073: ldarg.1 - IL_0074: unbox.any TestFunction21/U - IL_0079: ldnull - IL_007a: cgt.un - IL_007c: brfalse.s IL_0080 + IL_006d: ldarg.1 + IL_006e: unbox.any TestFunction21/U + IL_0073: brfalse.s IL_0077 .line 100001,100001 : 0,0 '' - IL_007e: ldc.i4.m1 - IL_007f: ret + IL_0075: ldc.i4.m1 + IL_0076: ret .line 100001,100001 : 0,0 '' - IL_0080: ldc.i4.0 - IL_0081: ret + IL_0077: ldc.i4.0 + IL_0078: ret } // end of method U::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 61 (0x3d) .maxstack 7 .locals init ([0] int32 V_0, [1] class TestFunction21/U V_1, @@ -450,57 +438,55 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 TestFunction21/U::item2 + 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 TestFunction21/U::item2 + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldc.i4 0x9e3779b9 - IL_002a: ldarg.1 - IL_002b: stloc.3 - IL_002c: ldloc.1 - IL_002d: ldfld int32 TestFunction21/U::item1 + 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 TestFunction21/U::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl IL_0032: ldloc.0 - IL_0033: ldc.i4.6 - IL_0034: shl - IL_0035: ldloc.0 - IL_0036: ldc.i4.2 - IL_0037: shr - IL_0038: add - IL_0039: add - IL_003a: add - IL_003b: stloc.0 - IL_003c: ldloc.0 - IL_003d: ret + 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 .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003b: ldc.i4.0 + IL_003c: ret } // end of method U::GetHashCode .method public hidebysig virtual final @@ -520,7 +506,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 73 (0x49) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class TestFunction21/U V_0, [1] class TestFunction21/U V_1, @@ -530,124 +516,118 @@ [5] class [mscorlib]System.Collections.IEqualityComparer V_5) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0041 + IL_0001: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst TestFunction21/U - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst TestFunction21/U + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003f + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_003c .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000f: ldarg.0 + IL_0010: pop .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 TestFunction21/U::item1 - IL_0021: ldloc.3 - IL_0022: ldfld int32 TestFunction21/U::item1 - IL_0027: ceq - IL_0029: brfalse.s IL_003d - - .line 100001,100001 : 0,0 '' - IL_002b: ldarg.2 - IL_002c: stloc.s V_5 - IL_002e: ldloc.2 - IL_002f: ldfld int32 TestFunction21/U::item2 - IL_0034: ldloc.3 - IL_0035: ldfld int32 TestFunction21/U::item2 - IL_003a: ceq - IL_003c: ret + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 TestFunction21/U::item1 + IL_001e: ldloc.3 + IL_001f: ldfld int32 TestFunction21/U::item1 + IL_0024: ceq + IL_0026: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.0 - IL_003e: ret + IL_0028: ldarg.2 + IL_0029: stloc.s V_5 + IL_002b: ldloc.2 + IL_002c: ldfld int32 TestFunction21/U::item2 + IL_0031: ldloc.3 + IL_0032: ldfld int32 TestFunction21/U::item2 + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: ldnull - IL_0043: cgt.un - IL_0045: ldc.i4.0 - IL_0046: ceq - IL_0048: ret + IL_003c: ldc.i4.0 + IL_003d: ret + + .line 100001,100001 : 0,0 '' + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method U::Equals .method public hidebysig virtual final instance bool Equals(class TestFunction21/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class TestFunction21/U V_0, [1] class TestFunction21/U V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 TestFunction21/U::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 TestFunction21/U::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 TestFunction21/U::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 TestFunction21/U::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 TestFunction21/U::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 TestFunction21/U::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method U::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl index ba28389fd7d..41c5617313c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000748 Length: 0x00000228 } .module TestFunction24.exe -// MVID: {61EFEE1F-A643-4587-A745-03831FEEEF61} +// MVID: {6220E156-A643-4587-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07110000 +// Image base: 0x095E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -141,7 +141,7 @@ instance int32 CompareTo(class TestFunction24/Point obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 108 (0x6c) + // Code size 99 (0x63) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -153,103 +153,97 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction24.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0062 + IL_0001: brfalse.s IL_005c .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0060 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_005a .line 16707566,16707566 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 TestFunction24/Point::x@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 TestFunction24/Point::x@ - IL_001f: stloc.3 + IL_0006: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 TestFunction24/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 TestFunction24/Point::x@ + IL_0019: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: bge.s IL_0022 .line 16707566,16707566 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_001e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_001f: nop + IL_0020: br.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0022: ldloc.2 + IL_0023: ldloc.3 + IL_0024: cgt .line 16707566,16707566 : 0,0 '' - IL_002c: nop + IL_0026: nop .line 16707566,16707566 : 0,0 '' - IL_002d: stloc.0 + IL_0027: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.0 - IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_0028: ldloc.0 + IL_0029: ldc.i4.0 + IL_002a: bge.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.0 - IL_0033: ret + IL_002c: ldloc.0 + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a + IL_002e: ldloc.0 + IL_002f: ldc.i4.0 + IL_0030: ble.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0032: ldloc.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.s V_4 - IL_0041: ldarg.0 - IL_0042: ldfld int32 TestFunction24/Point::y@ - IL_0047: stloc.s V_5 - IL_0049: ldarg.1 - IL_004a: ldfld int32 TestFunction24/Point::y@ - IL_004f: stloc.s V_6 + IL_0034: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0039: stloc.s V_4 + IL_003b: ldarg.0 + IL_003c: ldfld int32 TestFunction24/Point::y@ + IL_0041: stloc.s V_5 + IL_0043: ldarg.1 + IL_0044: ldfld int32 TestFunction24/Point::y@ + IL_0049: stloc.s V_6 .line 16707566,16707566 : 0,0 '' - IL_0051: ldloc.s V_5 - IL_0053: ldloc.s V_6 - IL_0055: bge.s IL_0059 + IL_004b: ldloc.s V_5 + IL_004d: ldloc.s V_6 + IL_004f: bge.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_0057: ldc.i4.m1 - IL_0058: ret + IL_0051: ldc.i4.m1 + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldloc.s V_5 - IL_005b: ldloc.s V_6 - IL_005d: cgt - IL_005f: ret + IL_0053: ldloc.s V_5 + IL_0055: ldloc.s V_6 + IL_0057: cgt + IL_0059: ret .line 16707566,16707566 : 0,0 '' - IL_0060: ldc.i4.1 - IL_0061: ret + IL_005a: ldc.i4.1 + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldarg.1 - IL_0063: ldnull - IL_0064: cgt.un - IL_0066: brfalse.s IL_006a + IL_005c: ldarg.1 + IL_005d: brfalse.s IL_0061 .line 16707566,16707566 : 0,0 '' - IL_0068: ldc.i4.m1 - IL_0069: ret + IL_005f: ldc.i4.m1 + IL_0060: ret .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.0 - IL_006b: ret + IL_0061: ldc.i4.0 + IL_0062: ret } // end of method Point::CompareTo .method public hidebysig virtual final @@ -270,7 +264,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 125 (0x7d) + // Code size 116 (0x74) .maxstack 4 .locals init ([0] class TestFunction24/Point V_0, [1] class TestFunction24/Point V_1, @@ -289,161 +283,153 @@ IL_0008: stloc.1 .line 16707566,16707566 : 0,0 '' IL_0009: ldarg.0 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse.s IL_006e + IL_000a: brfalse.s IL_0068 .line 16707566,16707566 : 0,0 '' - IL_000f: ldarg.1 - IL_0010: unbox.any TestFunction24/Point - IL_0015: ldnull - IL_0016: cgt.un - IL_0018: brfalse.s IL_006c + IL_000c: ldarg.1 + IL_000d: unbox.any TestFunction24/Point + IL_0012: brfalse.s IL_0066 .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.2 - IL_001b: stloc.3 - IL_001c: ldarg.0 - IL_001d: ldfld int32 TestFunction24/Point::x@ - IL_0022: stloc.s V_4 - IL_0024: ldloc.1 - IL_0025: ldfld int32 TestFunction24/Point::x@ - IL_002a: stloc.s V_5 + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 TestFunction24/Point::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 TestFunction24/Point::x@ + IL_0024: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002c: ldloc.s V_4 - IL_002e: ldloc.s V_5 - IL_0030: bge.s IL_0036 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.s V_5 + IL_002a: bge.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0032: ldc.i4.m1 + IL_002c: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0033: nop - IL_0034: br.s IL_003d + IL_002d: nop + IL_002e: br.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0036: ldloc.s V_4 - IL_0038: ldloc.s V_5 - IL_003a: cgt + IL_0030: ldloc.s V_4 + IL_0032: ldloc.s V_5 + IL_0034: cgt .line 16707566,16707566 : 0,0 '' - IL_003c: nop + IL_0036: nop .line 16707566,16707566 : 0,0 '' - IL_003d: stloc.2 + IL_0037: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ldc.i4.0 - IL_0040: bge.s IL_0044 + IL_0038: ldloc.2 + IL_0039: ldc.i4.0 + IL_003a: bge.s IL_003e .line 16707566,16707566 : 0,0 '' - IL_0042: ldloc.2 - IL_0043: ret + IL_003c: ldloc.2 + IL_003d: ret .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ldc.i4.0 - IL_0046: ble.s IL_004a + IL_003e: ldloc.2 + IL_003f: ldc.i4.0 + IL_0040: ble.s IL_0044 .line 16707566,16707566 : 0,0 '' - IL_0048: ldloc.2 - IL_0049: ret + IL_0042: ldloc.2 + IL_0043: ret .line 16707566,16707566 : 0,0 '' - IL_004a: ldarg.2 - IL_004b: stloc.s V_6 - IL_004d: ldarg.0 - IL_004e: ldfld int32 TestFunction24/Point::y@ - IL_0053: stloc.s V_7 - IL_0055: ldloc.1 - IL_0056: ldfld int32 TestFunction24/Point::y@ - IL_005b: stloc.s V_8 + IL_0044: ldarg.2 + IL_0045: stloc.s V_6 + IL_0047: ldarg.0 + IL_0048: ldfld int32 TestFunction24/Point::y@ + IL_004d: stloc.s V_7 + IL_004f: ldloc.1 + IL_0050: ldfld int32 TestFunction24/Point::y@ + IL_0055: stloc.s V_8 .line 16707566,16707566 : 0,0 '' - IL_005d: ldloc.s V_7 - IL_005f: ldloc.s V_8 - IL_0061: bge.s IL_0065 + IL_0057: ldloc.s V_7 + IL_0059: ldloc.s V_8 + IL_005b: bge.s IL_005f .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_005d: ldc.i4.m1 + IL_005e: ret .line 16707566,16707566 : 0,0 '' - IL_0065: ldloc.s V_7 - IL_0067: ldloc.s V_8 - IL_0069: cgt - IL_006b: ret + IL_005f: ldloc.s V_7 + IL_0061: ldloc.s V_8 + IL_0063: cgt + IL_0065: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_0066: ldc.i4.1 + IL_0067: ret .line 16707566,16707566 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: unbox.any TestFunction24/Point - IL_0074: ldnull - IL_0075: cgt.un - IL_0077: brfalse.s IL_007b + IL_0068: ldarg.1 + IL_0069: unbox.any TestFunction24/Point + IL_006e: brfalse.s IL_0072 .line 16707566,16707566 : 0,0 '' - IL_0079: ldc.i4.m1 - IL_007a: ret + IL_0070: ldc.i4.m1 + IL_0071: ret .line 16707566,16707566 : 0,0 '' - IL_007b: ldc.i4.0 - IL_007c: ret + IL_0072: ldc.i4.0 + IL_0073: ret } // end of method Point::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 58 (0x3a) + // Code size 55 (0x37) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0038 + IL_0001: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: ldfld int32 TestFunction24/Point::y@ + 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 TestFunction24/Point::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl IL_0015: ldloc.0 - IL_0016: ldc.i4.6 - IL_0017: shl - IL_0018: ldloc.0 - IL_0019: ldc.i4.2 - IL_001a: shr - IL_001b: add - IL_001c: add - IL_001d: add - IL_001e: stloc.0 - IL_001f: ldc.i4 0x9e3779b9 - IL_0024: ldarg.1 - IL_0025: stloc.2 - IL_0026: ldarg.0 - IL_0027: ldfld int32 TestFunction24/Point::x@ + 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 TestFunction24/Point::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl IL_002c: ldloc.0 - IL_002d: ldc.i4.6 - IL_002e: shl - IL_002f: ldloc.0 - IL_0030: ldc.i4.2 - IL_0031: shr - IL_0032: add - IL_0033: add - IL_0034: add - IL_0035: stloc.0 - IL_0036: ldloc.0 - IL_0037: ret - - .line 16707566,16707566 : 0,0 '' - IL_0038: ldc.i4.0 - IL_0039: ret + 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 + + .line 16707566,16707566 : 0,0 '' + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Point::GetHashCode .method public hidebysig virtual final @@ -463,7 +449,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 65 (0x41) + // Code size 62 (0x3e) .maxstack 4 .locals init ([0] class TestFunction24/Point V_0, [1] class TestFunction24/Point V_1, @@ -471,106 +457,100 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0039 + IL_0001: brfalse.s IL_0036 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst TestFunction24/Point - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst TestFunction24/Point + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0037 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.2 - IL_0013: stloc.2 - IL_0014: ldarg.0 - IL_0015: ldfld int32 TestFunction24/Point::x@ - IL_001a: ldloc.1 - IL_001b: ldfld int32 TestFunction24/Point::x@ - IL_0020: ceq - IL_0022: brfalse.s IL_0035 + IL_000f: ldarg.2 + IL_0010: stloc.2 + IL_0011: ldarg.0 + IL_0012: ldfld int32 TestFunction24/Point::x@ + IL_0017: ldloc.1 + IL_0018: ldfld int32 TestFunction24/Point::x@ + IL_001d: ceq + IL_001f: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0024: ldarg.2 - IL_0025: stloc.3 - IL_0026: ldarg.0 - IL_0027: ldfld int32 TestFunction24/Point::y@ - IL_002c: ldloc.1 - IL_002d: ldfld int32 TestFunction24/Point::y@ - IL_0032: ceq - IL_0034: ret + IL_0021: ldarg.2 + IL_0022: stloc.3 + IL_0023: ldarg.0 + IL_0024: ldfld int32 TestFunction24/Point::y@ + IL_0029: ldloc.1 + IL_002a: ldfld int32 TestFunction24/Point::y@ + IL_002f: ceq + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldarg.1 - IL_003a: ldnull - IL_003b: cgt.un - IL_003d: ldc.i4.0 - IL_003e: ceq - IL_0040: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method Point::Equals .method public hidebysig virtual final instance bool Equals(class TestFunction24/Point obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 47 (0x2f) .maxstack 8 .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: brfalse.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 + IL_0006: ldarg.0 + IL_0007: ldfld int32 TestFunction24/Point::x@ + IL_000c: ldarg.1 IL_000d: ldfld int32 TestFunction24/Point::x@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 TestFunction24/Point::x@ - IL_0018: bne.un.s IL_0029 + IL_0012: bne.un.s IL_0023 .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 + IL_0014: ldarg.0 + IL_0015: ldfld int32 TestFunction24/Point::y@ + IL_001a: ldarg.1 IL_001b: ldfld int32 TestFunction24/Point::y@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 TestFunction24/Point::y@ - IL_0026: ceq - IL_0028: ret + IL_0020: ceq + IL_0022: ret .line 16707566,16707566 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_0023: ldc.i4.0 + IL_0024: ret .line 16707566,16707566 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_0025: ldc.i4.0 + IL_0026: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret } // end of method Point::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl index 65774ed275a..f6dc2201cd4 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000278 Length: 0x000000BA } .module Testfunction22h.exe -// MVID: {620E3B70-0266-39F6-A745-0383703B0E62} +// MVID: {621FED72-0266-39F6-A745-038372ED1F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x073A0000 +// Image base: 0x05900000 // =============== CLASS MEMBERS DECLARATION =================== @@ -306,126 +306,77 @@ .method public static void test5() cil managed { - // Code size 158 (0x9e) - .maxstack 4 + // Code size 96 (0x60) + .maxstack 3 .locals init ([0] class [mscorlib]System.Exception V_0, - [1] class [mscorlib]System.ArgumentException V_1, - [2] class [mscorlib]System.ArgumentException a, - [3] class [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException V_3, - [4] string msg, - [5] class [mscorlib]System.Exception V_5, - [6] class [mscorlib]System.ArgumentException V_6, - [7] class [mscorlib]System.ArgumentException V_7, - [8] class [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException V_8, - [9] string V_9) + [1] object V_1, + [2] object V_2, + [3] class [mscorlib]System.ArgumentException a, + [4] string msg) .line 32,32 : 4,7 '' .try { IL_0000: nop .line 33,33 : 7,33 '' IL_0001: call void [mscorlib]System.Console::WriteLine() - IL_0006: leave IL_009d + IL_0006: leave.s IL_005f .line 34,34 : 4,8 '' } // end .try - filter + catch [mscorlib]System.Object { - IL_000b: castclass [mscorlib]System.Exception - IL_0010: stloc.0 - IL_0011: ldloc.0 - IL_0012: isinst [mscorlib]System.ArgumentException - IL_0017: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0018: ldloc.1 - IL_0019: brfalse.s IL_001d - - IL_001b: br.s IL_0029 - - IL_001d: ldloc.0 - IL_001e: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0023: stloc.3 - .line 100001,100001 : 0,0 '' - IL_0024: ldloc.3 - IL_0025: brfalse.s IL_0040 - - IL_0027: br.s IL_002f - - .line 100001,100001 : 0,0 '' - IL_0029: ldloc.1 - IL_002a: stloc.2 - .line 36,36 : 9,80 '' - IL_002b: ldc.i4.1 - .line 100001,100001 : 0,0 '' - IL_002c: nop - IL_002d: br.s IL_0042 - - .line 100001,100001 : 0,0 '' - IL_002f: ldloc.0 - IL_0030: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0035: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_003a: stloc.s msg - .line 37,37 : 9,76 '' - IL_003c: ldc.i4.1 - .line 100001,100001 : 0,0 '' - IL_003d: nop - IL_003e: br.s IL_0042 - - .line 100001,100001 : 0,0 '' - IL_0040: ldc.i4.0 - .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: endfilter - } // end filter - { // handler - IL_0044: castclass [mscorlib]System.Exception - IL_0049: stloc.s V_5 - IL_004b: ldloc.s V_5 - IL_004d: isinst [mscorlib]System.ArgumentException - IL_0052: stloc.s V_6 + IL_0008: castclass [mscorlib]System.Exception + IL_000d: stloc.0 .line 100001,100001 : 0,0 '' - IL_0054: ldloc.s V_6 - IL_0056: brfalse.s IL_005a - - IL_0058: br.s IL_0069 + IL_000e: ldloc.0 + IL_000f: stloc.1 + IL_0010: ldloc.1 + IL_0011: isinst [mscorlib]System.ArgumentException + IL_0016: ldnull + IL_0017: cgt.un + IL_0019: brtrue.s IL_002a - IL_005a: ldloc.s V_5 - IL_005c: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0061: stloc.s V_8 .line 100001,100001 : 0,0 '' - IL_0063: ldloc.s V_8 - IL_0065: brfalse.s IL_0092 + IL_001b: ldloc.0 + IL_001c: stloc.2 + IL_001d: ldloc.2 + IL_001e: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0023: ldnull + IL_0024: cgt.un + IL_0026: brfalse.s IL_0054 - IL_0067: br.s IL_007b + IL_0028: br.s IL_003e .line 100001,100001 : 0,0 '' - IL_0069: ldloc.s V_6 - IL_006b: stloc.s V_7 + IL_002a: ldloc.0 + IL_002b: unbox.any [mscorlib]System.ArgumentException + IL_0030: stloc.3 .line 36,36 : 45,80 '' - IL_006d: ldloc.s V_7 - IL_006f: callvirt instance string [mscorlib]System.Exception::get_Message() - IL_0074: call void [mscorlib]System.Console::WriteLine(string) - IL_0079: leave.s IL_009d + IL_0031: ldloc.3 + IL_0032: callvirt instance string [mscorlib]System.Exception::get_Message() + IL_0037: call void [mscorlib]System.Console::WriteLine(string) + IL_003c: leave.s IL_005f .line 100001,100001 : 0,0 '' - IL_007b: ldloc.s V_5 - IL_007d: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0082: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_0087: stloc.s V_9 + IL_003e: ldloc.0 + IL_003f: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0044: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0049: stloc.s msg .line 37,37 : 47,76 '' - IL_0089: ldloc.s V_9 - IL_008b: call void [mscorlib]System.Console::WriteLine(string) - IL_0090: leave.s IL_009d + IL_004b: ldloc.s msg + IL_004d: call void [mscorlib]System.Console::WriteLine(string) + IL_0052: leave.s IL_005f .line 100001,100001 : 0,0 '' - IL_0092: rethrow - IL_0094: ldnull - IL_0095: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_009a: pop - IL_009b: leave.s IL_009d + IL_0054: rethrow + IL_0056: ldnull + IL_0057: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_005c: pop + IL_005d: leave.s IL_005f .line 100001,100001 : 0,0 '' } // end handler - IL_009d: ret + IL_005f: ret } // end of method Testfunction22h::test5 } // end of class Testfunction22h diff --git a/tests/fsharpqa/Source/Conformance/Expressions/ExpressionQuotations/Baselines/TryWith.fs b/tests/fsharpqa/Source/Conformance/Expressions/ExpressionQuotations/Baselines/TryWith.fs index 9f56dadfef2..fc6a9008b88 100644 --- a/tests/fsharpqa/Source/Conformance/Expressions/ExpressionQuotations/Baselines/TryWith.fs +++ b/tests/fsharpqa/Source/Conformance/Expressions/ExpressionQuotations/Baselines/TryWith.fs @@ -18,38 +18,26 @@ let r1 = verify q (|TryWith|_|) "TryWith (Let (x, Value (1), Call (None, Raise, [Coerce (NewObject (E, Value (3)), Exception)])), matchValue, IfThenElse (TypeTest (ArgumentException, matchValue), - IfThenElse (Let (e, Call (None, UnboxGeneric, [matchValue]), + IfThenElse (Let (e, Call (None, UnboxFast, [matchValue]), Call (None, op_Inequality, [PropertyGet (Some (e), InnerException, []), Value ()])), - Let (e, Call (None, UnboxGeneric, [matchValue]), - Value (1)), - IfThenElse (TypeTest (E, matchValue), - Let (x, - PropertyGet (Some (Coerce (matchValue, - E)), - Data0, []), - Value (1)), Value (0))), + Let (e, Call (None, UnboxFast, [matchValue]), + Value (1)), Value (0)), IfThenElse (TypeTest (E, matchValue), Let (x, PropertyGet (Some (Coerce (matchValue, E)), Data0, []), Value (1)), Value (0))), matchValue, IfThenElse (TypeTest (ArgumentException, matchValue), - IfThenElse (Let (e, Call (None, UnboxGeneric, [matchValue]), + IfThenElse (Let (e, Call (None, UnboxFast, [matchValue]), Call (None, op_Inequality, [PropertyGet (Some (e), InnerException, []), Value ()])), - Let (e, Call (None, UnboxGeneric, [matchValue]), - Value (-1)), - IfThenElse (TypeTest (E, matchValue), - Let (x, - PropertyGet (Some (Coerce (matchValue, - E)), - Data0, []), x), - Call (None, Reraise, []))), + Let (e, Call (None, UnboxFast, [matchValue]), + Value (-1)), Call (None, Reraise, [])), IfThenElse (TypeTest (E, matchValue), Let (x, PropertyGet (Some (Coerce (matchValue, E)), diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl index aaa09da6b40..c5ea752be6d 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x000002F0 Length: 0x000000DB } .module ForEachOnList01.dll -// MVID: {61EFEE9C-56DF-F74F-A745-03839CEEEF61} +// MVID: {6220E4F8-56DF-F74F-A745-0383F8E42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05180000 +// Image base: 0x06C70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -139,7 +139,7 @@ .method public static void test1(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 lst) cil managed { - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 4 .locals init ([0] int32 z, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -156,33 +156,31 @@ IL_000a: stloc.2 .line 9,9 : 12,14 '' IL_000b: ldloc.2 - IL_000c: ldnull - IL_000d: cgt.un - IL_000f: brfalse.s IL_0028 + IL_000c: brfalse.s IL_0025 - IL_0011: ldloc.1 - IL_0012: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0017: stloc.3 + IL_000e: ldloc.1 + IL_000f: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0014: stloc.3 .line 10,10 : 10,20 '' - IL_0018: ldloc.0 - IL_0019: ldloc.3 - IL_001a: add - IL_001b: stloc.0 - IL_001c: ldloc.2 - IL_001d: stloc.1 - IL_001e: ldloc.1 - IL_001f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0024: stloc.2 + IL_0015: ldloc.0 + IL_0016: ldloc.3 + IL_0017: add + IL_0018: stloc.0 + IL_0019: ldloc.2 + IL_001a: stloc.1 + IL_001b: ldloc.1 + IL_001c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0021: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_000b + IL_0022: nop + IL_0023: br.s IL_000b - IL_0028: ret + IL_0025: ret } // end of method ForEachOnList01::test1 .method public static void test2() cil managed { - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 6 .locals init ([0] int32 z, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -208,33 +206,31 @@ IL_0020: stloc.2 .line 14,14 : 12,14 '' IL_0021: ldloc.2 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: brfalse.s IL_003e + IL_0022: brfalse.s IL_003b - IL_0027: ldloc.1 - IL_0028: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_002d: stloc.3 + IL_0024: ldloc.1 + IL_0025: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_002a: stloc.3 .line 15,15 : 10,20 '' - IL_002e: ldloc.0 - IL_002f: ldloc.3 - IL_0030: add - IL_0031: stloc.0 - IL_0032: ldloc.2 - IL_0033: stloc.1 - IL_0034: ldloc.1 - 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.2 + IL_002b: ldloc.0 + IL_002c: ldloc.3 + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.2 + IL_0030: stloc.1 + IL_0031: ldloc.1 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0037: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003b: nop - IL_003c: br.s IL_0021 + IL_0038: nop + IL_0039: br.s IL_0021 - IL_003e: ret + IL_003b: ret } // end of method ForEachOnList01::test2 .method public static void test3() cil managed { - // Code size 67 (0x43) + // Code size 64 (0x40) .maxstack 6 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 xs, [1] int32 z, @@ -264,33 +260,31 @@ IL_0022: stloc.3 .line 20,20 : 12,14 '' IL_0023: ldloc.3 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: brfalse.s IL_0042 + IL_0024: brfalse.s IL_003f - IL_0029: ldloc.2 - IL_002a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_002f: stloc.s x + IL_0026: ldloc.2 + IL_0027: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_002c: stloc.s x .line 21,21 : 10,20 '' - IL_0031: ldloc.1 - IL_0032: ldloc.s x - IL_0034: add - IL_0035: stloc.1 - IL_0036: ldloc.3 - IL_0037: stloc.2 - IL_0038: ldloc.2 - IL_0039: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003e: stloc.3 + IL_002e: ldloc.1 + IL_002f: ldloc.s x + IL_0031: add + IL_0032: stloc.1 + IL_0033: ldloc.3 + IL_0034: stloc.2 + IL_0035: ldloc.2 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003b: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_003f: nop - IL_0040: br.s IL_0023 + IL_003c: nop + IL_003d: br.s IL_0023 - IL_0042: ret + IL_003f: ret } // end of method ForEachOnList01::test3 .method public static void test4() cil managed { - // Code size 67 (0x43) + // Code size 64 (0x40) .maxstack 6 .locals init ([0] int32 z, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 xs, @@ -320,33 +314,31 @@ IL_0022: stloc.3 .line 26,26 : 12,14 '' IL_0023: ldloc.3 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: brfalse.s IL_0042 + IL_0024: brfalse.s IL_003f - IL_0029: ldloc.2 - IL_002a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_002f: stloc.s x + IL_0026: ldloc.2 + IL_0027: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_002c: stloc.s x .line 27,27 : 10,20 '' - IL_0031: ldloc.0 - IL_0032: ldloc.s x - IL_0034: add - IL_0035: stloc.0 - IL_0036: ldloc.3 - IL_0037: stloc.2 - IL_0038: ldloc.2 - IL_0039: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003e: stloc.3 + IL_002e: ldloc.0 + IL_002f: ldloc.s x + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.3 + IL_0034: stloc.2 + IL_0035: ldloc.2 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003b: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_003f: nop - IL_0040: br.s IL_0023 + IL_003c: nop + IL_003d: br.s IL_0023 - IL_0042: ret + IL_003f: ret } // end of method ForEachOnList01::test4 .method public static void test5() cil managed { - // Code size 90 (0x5a) + // Code size 87 (0x57) .maxstack 6 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 xs, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -373,39 +365,37 @@ IL_0020: stloc.2 .line 31,31 : 12,14 '' IL_0021: ldloc.2 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: brfalse.s IL_0059 + IL_0022: brfalse.s IL_0056 - IL_0027: ldloc.1 - IL_0028: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_002d: stloc.3 + IL_0024: ldloc.1 + IL_0025: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_002a: stloc.3 .line 32,32 : 10,24 '' - IL_002e: ldstr "%A" - IL_0033: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) - IL_0038: stloc.s V_4 - IL_003a: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_003f: ldloc.s V_4 - IL_0041: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, + IL_002b: ldstr "%A" + IL_0030: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_0035: stloc.s V_4 + IL_0037: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_003c: ldloc.s V_4 + IL_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0046: ldloc.3 - IL_0047: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_004c: pop - IL_004d: ldloc.2 - IL_004e: stloc.1 - IL_004f: ldloc.1 - IL_0050: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0055: stloc.2 + IL_0043: ldloc.3 + IL_0044: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0049: pop + IL_004a: ldloc.2 + IL_004b: stloc.1 + IL_004c: ldloc.1 + IL_004d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0052: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0056: nop - IL_0057: br.s IL_0021 + IL_0053: nop + IL_0054: br.s IL_0021 - IL_0059: ret + IL_0056: ret } // end of method ForEachOnList01::test5 .method public static void test6() cil managed { - // Code size 102 (0x66) + // Code size 99 (0x63) .maxstack 8 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -434,39 +424,37 @@ IL_002e: stloc.1 .line 36,36 : 11,13 '' IL_002f: ldloc.1 - IL_0030: ldnull - IL_0031: cgt.un - IL_0033: brfalse.s IL_0065 + IL_0030: brfalse.s IL_0062 - IL_0035: ldloc.0 - IL_0036: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_003b: stloc.2 + IL_0032: ldloc.0 + IL_0033: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0038: stloc.2 .line 41,41 : 9,23 '' - IL_003c: ldstr "%O" - IL_0041: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) - IL_0046: stloc.3 - IL_0047: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_004c: ldloc.3 - IL_004d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, + IL_0039: ldstr "%O" + IL_003e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_0043: stloc.3 + IL_0044: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0049: ldloc.3 + IL_004a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0052: ldloc.2 - IL_0053: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0058: pop - IL_0059: ldloc.1 - IL_005a: stloc.0 - IL_005b: ldloc.0 - IL_005c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0061: stloc.1 + IL_004f: ldloc.2 + IL_0050: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0055: pop + IL_0056: ldloc.1 + IL_0057: stloc.0 + IL_0058: ldloc.0 + IL_0059: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_005e: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0062: nop - IL_0063: br.s IL_002f + IL_005f: nop + IL_0060: br.s IL_002f - IL_0065: ret + IL_0062: ret } // end of method ForEachOnList01::test6 .method public static void test7() cil managed { - // Code size 108 (0x6c) + // Code size 105 (0x69) .maxstack 8 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -496,39 +484,37 @@ IL_002e: stloc.1 .line 45,45 : 11,13 '' IL_002f: ldloc.1 - IL_0030: ldnull - IL_0031: cgt.un - IL_0033: brfalse.s IL_006b + IL_0030: brfalse.s IL_0068 - IL_0035: ldloc.0 - IL_0036: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_003b: stloc.2 + IL_0032: ldloc.0 + IL_0033: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0038: stloc.2 .line 50,50 : 9,24 '' - IL_003c: ldloc.2 - IL_003d: ldc.i4.1 - IL_003e: add - IL_003f: stloc.3 + IL_0039: ldloc.2 + IL_003a: ldc.i4.1 + IL_003b: add + IL_003c: stloc.3 .line 51,51 : 9,25 '' - IL_0040: ldstr "%O" - IL_0045: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) - IL_004a: stloc.s V_4 - IL_004c: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0051: ldloc.s V_4 - IL_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, + IL_003d: ldstr "%O" + IL_0042: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_0047: stloc.s V_4 + IL_0049: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_004e: ldloc.s V_4 + IL_0050: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0058: ldloc.3 - IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_005e: pop - IL_005f: ldloc.1 - IL_0060: stloc.0 - IL_0061: ldloc.0 - IL_0062: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0067: stloc.1 + IL_0055: ldloc.3 + IL_0056: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_005b: pop + IL_005c: ldloc.1 + IL_005d: stloc.0 + IL_005e: ldloc.0 + IL_005f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0064: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0068: nop - IL_0069: br.s IL_002f + IL_0065: nop + IL_0066: br.s IL_002f - IL_006b: ret + IL_0068: ret } // end of method ForEachOnList01::test7 } // end of class ForEachOnList01 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl index ec8dc44767d..6831a0c3df9 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006E0 Length: 0x000003BA } .module Compare05.dll -// MVID: {61E0712B-051C-F88E-A745-03832B71E061} +// MVID: {6220E4FA-051C-F88E-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05910000 +// Image base: 0x06E50000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Compare05/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare05.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Compare05/CompareMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Compare05/CompareMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Compare05/CompareMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Compare05/CompareMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + 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 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + 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 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1, [2] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Compare05/CompareMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Compare05/CompareMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Compare05/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl index 3b8f86e9aae..acd50e0b748 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006D8 Length: 0x000003BC } .module Compare06.dll -// MVID: {61E0712B-04FD-F88E-A745-03832B71E061} +// MVID: {6220E4FA-04FD-F88E-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04EF0000 +// Image base: 0x071C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -123,7 +123,7 @@ instance int32 CompareTo(class Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 101 (0x65) + // Code size 92 (0x5c) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -132,103 +132,97 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare06.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_005b + IL_0001: brfalse.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0059 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001f: stloc.3 + IL_0006: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: bge.s IL_0022 .line 16707566,16707566 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_001e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_001f: nop + IL_0020: br.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0022: ldloc.2 + IL_0023: ldloc.3 + IL_0024: cgt .line 16707566,16707566 : 0,0 '' - IL_002c: nop + IL_0026: nop + .line 16707566,16707566 : 0,0 '' + IL_0027: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0028: ldloc.0 + IL_0029: ldc.i4.0 + IL_002a: bge.s IL_002e + .line 16707566,16707566 : 0,0 '' - IL_002d: stloc.0 + IL_002c: ldloc.0 + IL_002d: ret + .line 16707566,16707566 : 0,0 '' IL_002e: ldloc.0 IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_0030: ble.s IL_0034 .line 16707566,16707566 : 0,0 '' IL_0032: ldloc.0 IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a - + IL_0034: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0039: stloc.1 + IL_003a: ldarg.0 + IL_003b: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0040: stloc.2 + IL_0041: ldarg.1 + IL_0042: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: bge.s IL_004e .line 16707566,16707566 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.1 - IL_0040: ldarg.0 - IL_0041: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldarg.1 - IL_0048: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 + IL_004c: ldc.i4.m1 + IL_004d: ret + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 - - .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret - - .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0050: cgt + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_0053: ldc.i4.1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: ldnull - IL_005d: cgt.un - IL_005f: brfalse.s IL_0063 + IL_0055: ldarg.1 + IL_0056: brfalse.s IL_005a .line 16707566,16707566 : 0,0 '' - IL_0061: ldc.i4.m1 - IL_0062: ret + IL_0058: ldc.i4.m1 + IL_0059: ret .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.0 - IL_0064: ret + IL_005a: ldc.i4.0 + IL_005b: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final @@ -249,7 +243,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 106 (0x6a) + // Code size 97 (0x61) .maxstack 4 .locals init ([0] class Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR V_0, [1] int32 V_1, @@ -261,151 +255,143 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_005b + IL_0008: brfalse.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0059 + IL_000a: ldarg.1 + IL_000b: unbox.any Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0010: brfalse.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001e: stloc.2 - IL_001f: ldloc.0 - IL_0020: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: stloc.3 + IL_0012: ldarg.0 + IL_0013: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001f: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0026: ldloc.2 - IL_0027: ldloc.3 - IL_0028: bge.s IL_002e + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: bge.s IL_0028 .line 16707566,16707566 : 0,0 '' - IL_002a: ldc.i4.m1 + IL_0024: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002b: nop - IL_002c: br.s IL_0033 + IL_0025: nop + IL_0026: br.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.2 - IL_002f: ldloc.3 - IL_0030: cgt + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: cgt + .line 16707566,16707566 : 0,0 '' + IL_002c: nop .line 16707566,16707566 : 0,0 '' - IL_0032: nop + IL_002d: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0033: stloc.1 + IL_002e: ldloc.1 + IL_002f: ldc.i4.0 + IL_0030: bge.s IL_0034 + + .line 16707566,16707566 : 0,0 '' + IL_0032: ldloc.1 + IL_0033: ret + .line 16707566,16707566 : 0,0 '' IL_0034: ldloc.1 IL_0035: ldc.i4.0 - IL_0036: bge.s IL_003a + IL_0036: ble.s IL_003a .line 16707566,16707566 : 0,0 '' IL_0038: ldloc.1 IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.1 - IL_003b: ldc.i4.0 - IL_003c: ble.s IL_0040 - + IL_003a: ldarg.0 + IL_003b: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0040: stloc.2 + IL_0041: ldloc.0 + IL_0042: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.1 - IL_003f: ret + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: bge.s IL_004e .line 16707566,16707566 : 0,0 '' - IL_0040: ldarg.0 - IL_0041: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldloc.0 - IL_0048: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 + IL_004c: ldc.i4.m1 + IL_004d: ret + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 - - .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret + IL_0050: cgt + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0053: ldc.i4.1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_0055: ldarg.1 + IL_0056: unbox.any Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_005b: brfalse.s IL_005f .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: unbox.any Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR - IL_0061: ldnull - IL_0062: cgt.un - IL_0064: brfalse.s IL_0068 + IL_005d: ldc.i4.m1 + IL_005e: ret .line 16707566,16707566 : 0,0 '' - IL_0066: ldc.i4.m1 - IL_0067: ret - - .line 16707566,16707566 : 0,0 '' - IL_0068: ldc.i4.0 - IL_0069: ret + IL_005f: ldc.i4.0 + IL_0060: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 54 (0x36) + // Code size 51 (0x33) .maxstack 7 .locals init ([0] int32 V_0) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0034 + IL_0001: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.0 - IL_000e: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl 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: ldc.i4 0x9e3779b9 - IL_0022: ldarg.0 - IL_0023: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + 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 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl IL_0028: ldloc.0 - IL_0029: ldc.i4.6 - IL_002a: shl - IL_002b: ldloc.0 - IL_002c: ldc.i4.2 - IL_002d: shr - IL_002e: add - IL_002f: add - IL_0030: add - IL_0031: stloc.0 - IL_0032: ldloc.0 - IL_0033: ret + 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 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0031: ldc.i4.0 + IL_0032: ret } // end of method KeyR::GetHashCode .method public hidebysig virtual final @@ -425,103 +411,97 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 57 (0x39) + // Code size 54 (0x36) .maxstack 4 .locals init ([0] class Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR V_0) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0031 + IL_0001: brfalse.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002f + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0016: ldloc.0 - IL_0017: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001c: bne.un.s IL_002d + IL_000d: ldarg.0 + IL_000e: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldloc.0 + IL_0014: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0024: ldloc.0 - IL_0025: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_002a: ceq - IL_002c: ret + IL_001b: ldarg.0 + IL_001c: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldloc.0 + IL_0022: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldc.i4.0 - IL_002e: ret + IL_002a: ldc.i4.0 + IL_002b: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldarg.1 - IL_0032: ldnull - IL_0033: cgt.un - IL_0035: ldc.i4.0 - IL_0036: ceq - IL_0038: ret + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret } // end of method KeyR::Equals .method public hidebysig virtual final instance bool Equals(class Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 47 (0x2f) .maxstack 8 .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: brfalse.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 + IL_0006: ldarg.0 + IL_0007: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000c: ldarg.1 IL_000d: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: bne.un.s IL_0029 + IL_0012: bne.un.s IL_0023 .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 + IL_0014: ldarg.0 + IL_0015: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_001a: ldarg.1 IL_001b: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0026: ceq - IL_0028: ret + IL_0020: ceq + IL_0022: ret .line 16707566,16707566 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_0023: ldc.i4.0 + IL_0024: ret .line 16707566,16707566 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_0025: ldc.i4.0 + IL_0026: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret } // end of method KeyR::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl index 58e70310db2..fba7d38dbf2 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000890 Length: 0x0000068C } .module Compare07.dll -// MVID: {61E0712B-05DE-F88E-A745-03832B71E061} +// MVID: {6220E4FA-05DE-F88E-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07590000 +// Image base: 0x06990000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 110 (0x6e) + // Code size 101 (0x65) .maxstack 5 .locals init ([0] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -189,92 +189,86 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare07.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0064 + IL_0001: brfalse.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0062 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_005c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.3 + IL_0023: ldloc.s V_4 + IL_0025: ldloc.s V_5 + IL_0027: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0032: stloc.2 + IL_002c: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.2 - IL_0034: ldc.i4.0 - IL_0035: bge.s IL_0039 + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: bge.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0037: ldloc.2 - IL_0038: ret + IL_0031: ldloc.2 + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: ble.s IL_003f + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: ble.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0044: stloc.3 - IL_0045: ldloc.0 - IL_0046: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.1 - IL_004e: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldloc.3 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0039: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_003e: stloc.3 + IL_003f: ldloc.0 + IL_0040: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0045: stloc.s V_4 + IL_0047: ldloc.1 + IL_0048: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004d: stloc.s V_5 + IL_004f: ldloc.3 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.s V_5 + IL_0054: tail. + IL_0056: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_005c: ldc.i4.1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: ldnull - IL_0066: cgt.un - IL_0068: brfalse.s IL_006c + IL_005e: ldarg.1 + IL_005f: brfalse.s IL_0063 .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.m1 - IL_006b: ret + IL_0061: ldc.i4.m1 + IL_0062: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.0 - IL_006d: ret + IL_0063: ldc.i4.0 + IL_0064: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final @@ -296,7 +290,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 115 (0x73) + // Code size 106 (0x6a) .maxstack 5 .locals init ([0] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -310,160 +304,152 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0064 - - .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0062 - - .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop - .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_002c: stloc.s V_5 - IL_002e: ldarg.2 - IL_002f: ldloc.s V_4 - IL_0031: ldloc.s V_5 - IL_0033: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0008: brfalse.s IL_005e + + .line 16707566,16707566 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0010: brfalse.s IL_005c + + .line 16707566,16707566 : 0,0 '' + IL_0012: ldarg.0 + IL_0013: pop + .line 16707566,16707566 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0026: stloc.s V_5 + IL_0028: ldarg.2 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0038: stloc.3 + IL_0032: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.3 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0033: ldloc.3 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.3 - IL_003e: ret + IL_0037: ldloc.3 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.3 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0039: ldloc.3 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.3 - IL_0044: ret + IL_003d: ldloc.3 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.1 - IL_0046: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.2 - IL_004e: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldarg.2 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_003f: ldloc.1 + IL_0040: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0045: stloc.s V_4 + IL_0047: ldloc.2 + IL_0048: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004d: stloc.s V_5 + IL_004f: ldarg.2 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.s V_5 + IL_0054: tail. + IL_0056: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_005c: ldc.i4.1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: unbox.any class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_006a: ldnull - IL_006b: cgt.un - IL_006d: brfalse.s IL_0071 + IL_005e: ldarg.1 + IL_005f: unbox.any class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0064: brfalse.s IL_0068 .line 16707566,16707566 : 0,0 '' - IL_006f: ldc.i4.m1 - IL_0070: ret + IL_0066: ldc.i4.m1 + IL_0067: ret .line 16707566,16707566 : 0,0 '' - IL_0071: ldc.i4.0 - IL_0072: ret + IL_0068: ldc.i4.0 + IL_0069: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 76 (0x4c) + // Code size 73 (0x49) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004a + IL_0001: brfalse.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0019: stloc.2 - IL_001a: ldarg.1 - IL_001b: ldloc.2 - IL_001c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + 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 Compare07/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 [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_001e: ldloc.0 + IL_001f: ldc.i4.6 + IL_0020: shl 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: ldc.i4 0x9e3779b9 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0036: stloc.2 - IL_0037: ldarg.1 - IL_0038: ldloc.2 - IL_0039: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + 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 Compare07/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 [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_003b: ldloc.0 + IL_003c: ldc.i4.6 + IL_003d: shl IL_003e: ldloc.0 - IL_003f: ldc.i4.6 - IL_0040: shl - IL_0041: ldloc.0 - IL_0042: ldc.i4.2 - IL_0043: shr - IL_0044: add - IL_0045: add - IL_0046: add - IL_0047: stloc.0 - IL_0048: ldloc.0 - IL_0049: ret + 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 .line 16707566,16707566 : 0,0 '' - IL_004a: ldc.i4.0 - IL_004b: ret + IL_0047: ldc.i4.0 + IL_0048: ret } // end of method GenericKey`1::GetHashCode .method public hidebysig virtual final @@ -483,7 +469,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 87 (0x57) + // Code size 84 (0x54) .maxstack 5 .locals init ([0] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -492,79 +478,77 @@ [4] !a V_4) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004f + IL_0001: brfalse.s IL_004c .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_004d + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_004a .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001c: stloc.3 - IL_001d: ldloc.2 - IL_001e: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0023: stloc.s V_4 - IL_0025: ldarg.2 - IL_0026: ldloc.3 - IL_0027: ldloc.s V_4 - IL_0029: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.1 + IL_0014: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.s V_4 + IL_0022: ldarg.2 + IL_0023: ldloc.3 + IL_0024: ldloc.s V_4 + IL_0026: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_002e: brfalse.s IL_004b + IL_002b: brfalse.s IL_0048 .line 16707566,16707566 : 0,0 '' - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_003d: stloc.s V_4 - IL_003f: ldarg.2 - IL_0040: ldloc.3 - IL_0041: ldloc.s V_4 - IL_0043: tail. - IL_0045: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_002d: ldloc.1 + IL_002e: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0033: stloc.3 + IL_0034: ldloc.2 + IL_0035: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_003a: stloc.s V_4 + IL_003c: ldarg.2 + IL_003d: ldloc.3 + IL_003e: ldloc.s V_4 + IL_0040: tail. + IL_0042: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_004a: ret + IL_0047: ret .line 16707566,16707566 : 0,0 '' - IL_004b: ldc.i4.0 - IL_004c: ret + IL_0048: ldc.i4.0 + IL_0049: ret .line 16707566,16707566 : 0,0 '' - IL_004d: ldc.i4.0 - IL_004e: ret + IL_004a: ldc.i4.0 + IL_004b: ret .line 16707566,16707566 : 0,0 '' - IL_004f: ldarg.1 - IL_0050: ldnull - IL_0051: cgt.un - IL_0053: ldc.i4.0 - IL_0054: ceq - IL_0056: ret + IL_004c: ldarg.1 + IL_004d: ldnull + IL_004e: cgt.un + IL_0050: ldc.i4.0 + IL_0051: ceq + IL_0053: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final instance bool Equals(class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 77 (0x4d) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -572,66 +556,62 @@ [3] !a V_3) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0045 + IL_0001: brfalse.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0043 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_003d .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_000c: ldloc.0 + IL_000d: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0027: brfalse.s IL_0041 - - .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.0 - IL_002a: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_002f: stloc.2 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldloc.3 - IL_0039: tail. - IL_003b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_0021: brfalse.s IL_003b + + .line 16707566,16707566 : 0,0 '' + IL_0023: ldloc.0 + IL_0024: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0029: stloc.2 + IL_002a: ldloc.1 + IL_002b: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0030: stloc.3 + IL_0031: ldloc.2 + IL_0032: ldloc.3 + IL_0033: tail. + IL_0035: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0040: ret + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldc.i4.0 - IL_0042: ret + IL_003b: ldc.i4.0 + IL_003c: ret .line 16707566,16707566 : 0,0 '' - IL_0043: ldc.i4.0 - IL_0044: ret + IL_003d: ldc.i4.0 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldarg.1 - IL_0046: ldnull - IL_0047: cgt.un - IL_0049: ldc.i4.0 - IL_004a: ceq - IL_004c: ret + IL_003f: ldarg.1 + IL_0040: ldnull + IL_0041: cgt.un + IL_0043: ldc.i4.0 + IL_0044: ceq + IL_0046: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl index 8da7724afcf..0a051d5133e 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000A98 Length: 0x0000058E } .module Compare10.dll -// MVID: {61E0712B-04BF-1753-A745-03832B71E061} +// MVID: {6220E4FA-04BF-1753-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F10000 +// Image base: 0x07050000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Compare10/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare10.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + 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 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + 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 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1, [2] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Compare10/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -802,7 +782,7 @@ instance int32 CompareTo(class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 169 (0xa9) + // Code size 160 (0xa0) .maxstack 5 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -817,116 +797,110 @@ [10] int32 V_10) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_009f + IL_0001: brfalse IL_0099 .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse IL_009d + IL_0006: ldarg.1 + IL_0007: brfalse IL_0097 .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.0 - IL_0016: ldarg.1 - IL_0017: stloc.1 - IL_0018: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_001d: stloc.3 - IL_001e: ldloc.0 - IL_001f: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.1 - IL_0027: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002c: stloc.s V_5 - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: ldloc.3 - IL_0033: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0017: stloc.3 + IL_0018: ldloc.0 + IL_0019: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.1 + IL_0021: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: ldloc.3 + IL_002d: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0038: stloc.2 + IL_0032: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0039: ldloc.2 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.2 - IL_0044: ret + IL_003d: ldloc.2 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004a: stloc.3 - IL_004b: ldloc.0 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.1 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldloc.3 - IL_0084: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0044: stloc.3 + IL_0045: ldloc.0 + IL_0046: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_004b: stloc.s V_6 + IL_004d: ldloc.1 + IL_004e: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_4 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_5 + IL_0067: ldloc.s V_7 + IL_0069: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_006e: stloc.s V_8 + IL_0070: ldloc.s V_7 + IL_0072: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0077: stloc.s V_9 + IL_0079: ldloc.s V_4 + IL_007b: ldloc.s V_8 + IL_007d: ldloc.3 + IL_007e: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 + IL_0083: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_0085: ldloc.s V_10 + IL_0087: brfalse.s IL_008c .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0089: ldloc.s V_10 + IL_008b: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldloc.3 - IL_0097: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_9 + IL_0090: ldloc.3 + IL_0091: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_0096: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_0097: ldc.i4.1 + IL_0098: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: ldnull - IL_00a1: cgt.un - IL_00a3: brfalse.s IL_00a7 + IL_0099: ldarg.1 + IL_009a: brfalse.s IL_009e .line 16707566,16707566 : 0,0 '' - IL_00a5: ldc.i4.m1 - IL_00a6: ret + IL_009c: ldc.i4.m1 + IL_009d: ret .line 16707566,16707566 : 0,0 '' - IL_00a7: ldc.i4.0 - IL_00a8: ret + IL_009e: ldc.i4.0 + IL_009f: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final @@ -947,7 +921,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 174 (0xae) + // Code size 165 (0xa5) .maxstack 5 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -966,121 +940,115 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse IL_009f + IL_0008: brfalse IL_0099 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.1 - IL_0011: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_0016: ldnull - IL_0017: cgt.un - IL_0019: brfalse IL_009d - - .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: pop - .line 16707566,16707566 : 0,0 '' - IL_0020: ldarg.0 - IL_0021: stloc.1 - IL_0022: ldloc.0 - IL_0023: stloc.2 - IL_0024: ldloc.1 - IL_0025: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002a: stloc.s V_4 - IL_002c: ldloc.2 - IL_002d: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0032: stloc.s V_5 - IL_0034: ldloc.s V_4 - IL_0036: ldloc.s V_5 - IL_0038: ldarg.2 - IL_0039: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_000d: ldarg.1 + IL_000e: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_0013: brfalse IL_0097 + + .line 16707566,16707566 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: pop + .line 16707566,16707566 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: stloc.1 + IL_001c: ldloc.0 + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0024: stloc.s V_4 + IL_0026: ldloc.2 + IL_0027: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_002c: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: ldarg.2 + IL_0033: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_003e: stloc.3 + IL_0038: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_0039: ldloc.3 + IL_003a: ldc.i4.0 + IL_003b: bge.s IL_003f + + .line 16707566,16707566 : 0,0 '' + IL_003d: ldloc.3 + IL_003e: ret + .line 16707566,16707566 : 0,0 '' IL_003f: ldloc.3 IL_0040: ldc.i4.0 - IL_0041: bge.s IL_0045 + IL_0041: ble.s IL_0045 .line 16707566,16707566 : 0,0 '' IL_0043: ldloc.3 IL_0044: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.3 - IL_0046: ldc.i4.0 - IL_0047: ble.s IL_004b - - .line 16707566,16707566 : 0,0 '' - IL_0049: ldloc.3 - IL_004a: ret - - .line 16707566,16707566 : 0,0 '' - IL_004b: ldloc.1 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.2 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldarg.2 - IL_0084: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0045: ldloc.1 + IL_0046: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_004b: stloc.s V_6 + IL_004d: ldloc.2 + IL_004e: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_4 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_5 + IL_0067: ldloc.s V_7 + IL_0069: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_006e: stloc.s V_8 + IL_0070: ldloc.s V_7 + IL_0072: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0077: stloc.s V_9 + IL_0079: ldloc.s V_4 + IL_007b: ldloc.s V_8 + IL_007d: ldarg.2 + IL_007e: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 + IL_0083: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_0085: ldloc.s V_10 + IL_0087: brfalse.s IL_008c .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0089: ldloc.s V_10 + IL_008b: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldarg.2 - IL_0097: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_9 + IL_0090: ldarg.2 + IL_0091: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_0096: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_0097: ldc.i4.1 + IL_0098: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_00a5: ldnull - IL_00a6: cgt.un - IL_00a8: brfalse.s IL_00ac + IL_0099: ldarg.1 + IL_009a: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_009f: brfalse.s IL_00a3 .line 16707566,16707566 : 0,0 '' - IL_00aa: ldc.i4.m1 - IL_00ab: ret + IL_00a1: ldc.i4.m1 + IL_00a2: ret .line 16707566,16707566 : 0,0 '' - IL_00ac: ldc.i4.0 - IL_00ad: ret + IL_00a3: ldc.i4.0 + IL_00a4: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 107 (0x6b) + // Code size 104 (0x68) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1090,75 +1058,73 @@ [5] int32 V_5) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0069 + IL_0001: brfalse.s IL_0066 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0019: stloc.2 - IL_001a: ldloc.2 - IL_001b: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0020: stloc.3 - IL_0021: ldloc.2 - IL_0022: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0027: stloc.s V_4 - IL_0029: ldloc.3 - IL_002a: ldarg.1 - IL_002b: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: ldc.i4.5 - IL_0035: shl - IL_0036: ldloc.s V_5 - IL_0038: add - IL_0039: ldloc.s V_4 - IL_003b: ldarg.1 - IL_003c: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0041: xor + 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 [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0024: stloc.s V_4 + IL_0026: ldloc.3 + IL_0027: ldarg.1 + IL_0028: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]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 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]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.6 - IL_0044: shl - IL_0045: ldloc.0 - IL_0046: ldc.i4.2 - IL_0047: shr - IL_0048: add - IL_0049: add - IL_004a: add - IL_004b: stloc.0 - IL_004c: ldc.i4 0x9e3779b9 - IL_0051: ldloc.1 - IL_0052: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0057: ldarg.1 - IL_0058: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + 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 Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0054: ldarg.1 + IL_0055: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_005a: ldloc.0 + IL_005b: ldc.i4.6 + IL_005c: shl IL_005d: ldloc.0 - IL_005e: ldc.i4.6 - IL_005f: shl - IL_0060: ldloc.0 - IL_0061: ldc.i4.2 - IL_0062: shr - IL_0063: add - IL_0064: add - IL_0065: add - IL_0066: stloc.0 - IL_0067: ldloc.0 - IL_0068: ret - - .line 16707566,16707566 : 0,0 '' - IL_0069: ldc.i4.0 - IL_006a: ret + 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 + + .line 16707566,16707566 : 0,0 '' + IL_0066: ldc.i4.0 + IL_0067: ret } // end of method KeyWithInnerKeys::GetHashCode .method public hidebysig virtual final @@ -1178,7 +1144,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 138 (0x8a) + // Code size 135 (0x87) .maxstack 5 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1191,157 +1157,151 @@ [8] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_8) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_0082 + IL_0001: brfalse IL_007f .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_000f: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: brfalse.s IL_0080 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_007d .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0015: ldarg.0 - IL_0016: stloc.1 - IL_0017: ldloc.0 - IL_0018: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0019: ldloc.1 - IL_001a: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0026: stloc.s V_4 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldarg.2 - IL_002c: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0016: ldloc.1 + IL_0017: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001c: stloc.3 + IL_001d: ldloc.2 + IL_001e: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0023: stloc.s V_4 + IL_0025: ldloc.3 + IL_0026: ldloc.s V_4 + IL_0028: ldarg.2 + IL_0029: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_0031: brfalse.s IL_007e - - .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.1 - IL_0034: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0039: stloc.s V_5 - IL_003b: ldloc.2 - IL_003c: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0041: stloc.s V_6 - IL_0043: ldloc.s V_5 - IL_0045: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_004a: stloc.3 - IL_004b: ldloc.s V_5 - IL_004d: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0052: stloc.s V_4 - IL_0054: ldloc.s V_6 - IL_0056: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_005b: stloc.s V_7 - IL_005d: ldloc.s V_6 - IL_005f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0064: stloc.s V_8 - .line 16707566,16707566 : 0,0 '' - IL_0066: ldloc.3 - IL_0067: ldloc.s V_7 - IL_0069: ldarg.2 - IL_006a: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_002e: brfalse.s IL_007b + + .line 16707566,16707566 : 0,0 '' + IL_0030: ldloc.1 + IL_0031: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0036: stloc.s V_5 + IL_0038: ldloc.2 + IL_0039: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_003e: stloc.s V_6 + IL_0040: ldloc.s V_5 + IL_0042: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0047: stloc.3 + IL_0048: ldloc.s V_5 + IL_004a: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_004f: stloc.s V_4 + IL_0051: ldloc.s V_6 + IL_0053: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0058: stloc.s V_7 + IL_005a: ldloc.s V_6 + IL_005c: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0061: stloc.s V_8 + .line 16707566,16707566 : 0,0 '' + IL_0063: ldloc.3 + IL_0064: ldloc.s V_7 + IL_0066: ldarg.2 + IL_0067: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_006f: brfalse.s IL_007c + IL_006c: brfalse.s IL_0079 .line 16707566,16707566 : 0,0 '' - IL_0071: ldloc.s V_4 - IL_0073: ldloc.s V_8 - IL_0075: ldarg.2 - IL_0076: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_006e: ldloc.s V_4 + IL_0070: ldloc.s V_8 + IL_0072: ldarg.2 + IL_0073: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_007b: ret + IL_0078: ret .line 16707566,16707566 : 0,0 '' - IL_007c: ldc.i4.0 - IL_007d: ret + IL_0079: ldc.i4.0 + IL_007a: ret .line 16707566,16707566 : 0,0 '' - IL_007e: ldc.i4.0 - IL_007f: ret + IL_007b: ldc.i4.0 + IL_007c: ret .line 16707566,16707566 : 0,0 '' - IL_0080: ldc.i4.0 - IL_0081: ret + IL_007d: ldc.i4.0 + IL_007e: ret .line 16707566,16707566 : 0,0 '' - IL_0082: ldarg.1 - IL_0083: ldnull - IL_0084: cgt.un - IL_0086: ldc.i4.0 - IL_0087: ceq - IL_0089: ret + IL_007f: ldarg.1 + IL_0080: ldnull + IL_0081: cgt.un + IL_0083: ldc.i4.0 + IL_0084: ceq + IL_0086: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final instance bool Equals(class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 69 (0x45) + // Code size 63 (0x3f) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003d + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_003b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0012: ldloc.1 IL_0013: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0018: ldloc.1 - IL_0019: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001e: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(class Compare10/CompareMicroPerfAndCodeGenerationTests/Key) - IL_0023: brfalse.s IL_0039 + IL_0018: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(class Compare10/CompareMicroPerfAndCodeGenerationTests/Key) + IL_001d: brfalse.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0025: ldloc.0 + IL_001f: ldloc.0 + IL_0020: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0025: ldloc.1 IL_0026: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_002b: ldloc.1 - IL_002c: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0031: tail. - IL_0033: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, + IL_002b: tail. + IL_002d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, !!0) - IL_0038: ret + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_003d: ldarg.1 - IL_003e: ldnull - IL_003f: cgt.un - IL_0041: ldc.i4.0 - IL_0042: ceq - IL_0044: ret + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: ldc.i4.0 + IL_003c: ceq + IL_003e: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl index 233ebf4b5d6..cab49924b5d 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006E0 Length: 0x000003B7 } .module Equals04.dll -// MVID: {61E0712B-0759-EA8A-A745-03832B71E061} +// MVID: {6220E4FA-0759-EA8A-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05A30000 +// Image base: 0x06980000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals04.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Equals04/EqualsMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Equals04/EqualsMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Equals04/EqualsMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Equals04/EqualsMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + 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 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + 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 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1, [2] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Equals04/EqualsMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Equals04/EqualsMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl index 5a5cbc04fa0..b0c17b08fc5 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006D0 Length: 0x000003B9 } .module Equals05.dll -// MVID: {61E0712B-0759-CBC5-A745-03832B71E061} +// MVID: {6220E4FA-0759-CBC5-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05A70000 +// Image base: 0x067F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -123,7 +123,7 @@ instance int32 CompareTo(class Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 101 (0x65) + // Code size 92 (0x5c) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -132,103 +132,97 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals05.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_005b + IL_0001: brfalse.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0059 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001f: stloc.3 + IL_0006: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: bge.s IL_0022 .line 16707566,16707566 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_001e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_001f: nop + IL_0020: br.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0022: ldloc.2 + IL_0023: ldloc.3 + IL_0024: cgt .line 16707566,16707566 : 0,0 '' - IL_002c: nop + IL_0026: nop + .line 16707566,16707566 : 0,0 '' + IL_0027: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0028: ldloc.0 + IL_0029: ldc.i4.0 + IL_002a: bge.s IL_002e + .line 16707566,16707566 : 0,0 '' - IL_002d: stloc.0 + IL_002c: ldloc.0 + IL_002d: ret + .line 16707566,16707566 : 0,0 '' IL_002e: ldloc.0 IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_0030: ble.s IL_0034 .line 16707566,16707566 : 0,0 '' IL_0032: ldloc.0 IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a - + IL_0034: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0039: stloc.1 + IL_003a: ldarg.0 + IL_003b: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0040: stloc.2 + IL_0041: ldarg.1 + IL_0042: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: bge.s IL_004e .line 16707566,16707566 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.1 - IL_0040: ldarg.0 - IL_0041: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldarg.1 - IL_0048: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 + IL_004c: ldc.i4.m1 + IL_004d: ret + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 - - .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret - - .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0050: cgt + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_0053: ldc.i4.1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: ldnull - IL_005d: cgt.un - IL_005f: brfalse.s IL_0063 + IL_0055: ldarg.1 + IL_0056: brfalse.s IL_005a .line 16707566,16707566 : 0,0 '' - IL_0061: ldc.i4.m1 - IL_0062: ret + IL_0058: ldc.i4.m1 + IL_0059: ret .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.0 - IL_0064: ret + IL_005a: ldc.i4.0 + IL_005b: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final @@ -249,7 +243,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 106 (0x6a) + // Code size 97 (0x61) .maxstack 4 .locals init ([0] class Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0, [1] int32 V_1, @@ -261,151 +255,143 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_005b + IL_0008: brfalse.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0059 + IL_000a: ldarg.1 + IL_000b: unbox.any Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0010: brfalse.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001e: stloc.2 - IL_001f: ldloc.0 - IL_0020: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: stloc.3 + IL_0012: ldarg.0 + IL_0013: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001f: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0026: ldloc.2 - IL_0027: ldloc.3 - IL_0028: bge.s IL_002e + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: bge.s IL_0028 .line 16707566,16707566 : 0,0 '' - IL_002a: ldc.i4.m1 + IL_0024: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002b: nop - IL_002c: br.s IL_0033 + IL_0025: nop + IL_0026: br.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.2 - IL_002f: ldloc.3 - IL_0030: cgt + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: cgt + .line 16707566,16707566 : 0,0 '' + IL_002c: nop .line 16707566,16707566 : 0,0 '' - IL_0032: nop + IL_002d: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0033: stloc.1 + IL_002e: ldloc.1 + IL_002f: ldc.i4.0 + IL_0030: bge.s IL_0034 + + .line 16707566,16707566 : 0,0 '' + IL_0032: ldloc.1 + IL_0033: ret + .line 16707566,16707566 : 0,0 '' IL_0034: ldloc.1 IL_0035: ldc.i4.0 - IL_0036: bge.s IL_003a + IL_0036: ble.s IL_003a .line 16707566,16707566 : 0,0 '' IL_0038: ldloc.1 IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.1 - IL_003b: ldc.i4.0 - IL_003c: ble.s IL_0040 - + IL_003a: ldarg.0 + IL_003b: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0040: stloc.2 + IL_0041: ldloc.0 + IL_0042: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.1 - IL_003f: ret + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: bge.s IL_004e .line 16707566,16707566 : 0,0 '' - IL_0040: ldarg.0 - IL_0041: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldloc.0 - IL_0048: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 + IL_004c: ldc.i4.m1 + IL_004d: ret + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 - - .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret + IL_0050: cgt + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0053: ldc.i4.1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_0055: ldarg.1 + IL_0056: unbox.any Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_005b: brfalse.s IL_005f .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: unbox.any Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR - IL_0061: ldnull - IL_0062: cgt.un - IL_0064: brfalse.s IL_0068 + IL_005d: ldc.i4.m1 + IL_005e: ret .line 16707566,16707566 : 0,0 '' - IL_0066: ldc.i4.m1 - IL_0067: ret - - .line 16707566,16707566 : 0,0 '' - IL_0068: ldc.i4.0 - IL_0069: ret + IL_005f: ldc.i4.0 + IL_0060: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 54 (0x36) + // Code size 51 (0x33) .maxstack 7 .locals init ([0] int32 V_0) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0034 + IL_0001: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.0 - IL_000e: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl 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: ldc.i4 0x9e3779b9 - IL_0022: ldarg.0 - IL_0023: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + 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 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl IL_0028: ldloc.0 - IL_0029: ldc.i4.6 - IL_002a: shl - IL_002b: ldloc.0 - IL_002c: ldc.i4.2 - IL_002d: shr - IL_002e: add - IL_002f: add - IL_0030: add - IL_0031: stloc.0 - IL_0032: ldloc.0 - IL_0033: ret + 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 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0031: ldc.i4.0 + IL_0032: ret } // end of method KeyR::GetHashCode .method public hidebysig virtual final @@ -425,103 +411,97 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 57 (0x39) + // Code size 54 (0x36) .maxstack 4 .locals init ([0] class Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0031 + IL_0001: brfalse.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002f + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0016: ldloc.0 - IL_0017: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001c: bne.un.s IL_002d + IL_000d: ldarg.0 + IL_000e: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldloc.0 + IL_0014: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0024: ldloc.0 - IL_0025: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_002a: ceq - IL_002c: ret + IL_001b: ldarg.0 + IL_001c: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldloc.0 + IL_0022: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldc.i4.0 - IL_002e: ret + IL_002a: ldc.i4.0 + IL_002b: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldarg.1 - IL_0032: ldnull - IL_0033: cgt.un - IL_0035: ldc.i4.0 - IL_0036: ceq - IL_0038: ret + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret } // end of method KeyR::Equals .method public hidebysig virtual final instance bool Equals(class Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 47 (0x2f) .maxstack 8 .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: brfalse.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 + IL_0006: ldarg.0 + IL_0007: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000c: ldarg.1 IL_000d: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: bne.un.s IL_0029 + IL_0012: bne.un.s IL_0023 .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 + IL_0014: ldarg.0 + IL_0015: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_001a: ldarg.1 IL_001b: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0026: ceq - IL_0028: ret + IL_0020: ceq + IL_0022: ret .line 16707566,16707566 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_0023: ldc.i4.0 + IL_0024: ret .line 16707566,16707566 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_0025: ldc.i4.0 + IL_0026: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret } // end of method KeyR::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl index e468f464a09..de363af55d2 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000890 Length: 0x00000688 } .module Equals06.dll -// MVID: {61E0712B-0759-31EC-A745-03832B71E061} +// MVID: {6220E4FA-0759-31EC-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07210000 +// Image base: 0x067E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 110 (0x6e) + // Code size 101 (0x65) .maxstack 5 .locals init ([0] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -189,92 +189,86 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals06.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0064 + IL_0001: brfalse.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0062 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_005c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.3 + IL_0023: ldloc.s V_4 + IL_0025: ldloc.s V_5 + IL_0027: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0032: stloc.2 + IL_002c: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.2 - IL_0034: ldc.i4.0 - IL_0035: bge.s IL_0039 + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: bge.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0037: ldloc.2 - IL_0038: ret + IL_0031: ldloc.2 + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: ble.s IL_003f + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: ble.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0044: stloc.3 - IL_0045: ldloc.0 - IL_0046: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.1 - IL_004e: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldloc.3 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0039: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_003e: stloc.3 + IL_003f: ldloc.0 + IL_0040: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0045: stloc.s V_4 + IL_0047: ldloc.1 + IL_0048: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004d: stloc.s V_5 + IL_004f: ldloc.3 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.s V_5 + IL_0054: tail. + IL_0056: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_005c: ldc.i4.1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: ldnull - IL_0066: cgt.un - IL_0068: brfalse.s IL_006c + IL_005e: ldarg.1 + IL_005f: brfalse.s IL_0063 .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.m1 - IL_006b: ret + IL_0061: ldc.i4.m1 + IL_0062: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.0 - IL_006d: ret + IL_0063: ldc.i4.0 + IL_0064: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final @@ -296,7 +290,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 115 (0x73) + // Code size 106 (0x6a) .maxstack 5 .locals init ([0] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -310,160 +304,152 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0064 - - .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0062 - - .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop - .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_002c: stloc.s V_5 - IL_002e: ldarg.2 - IL_002f: ldloc.s V_4 - IL_0031: ldloc.s V_5 - IL_0033: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0008: brfalse.s IL_005e + + .line 16707566,16707566 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0010: brfalse.s IL_005c + + .line 16707566,16707566 : 0,0 '' + IL_0012: ldarg.0 + IL_0013: pop + .line 16707566,16707566 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0026: stloc.s V_5 + IL_0028: ldarg.2 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0038: stloc.3 + IL_0032: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.3 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0033: ldloc.3 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.3 - IL_003e: ret + IL_0037: ldloc.3 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.3 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0039: ldloc.3 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.3 - IL_0044: ret + IL_003d: ldloc.3 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.1 - IL_0046: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.2 - IL_004e: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldarg.2 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_003f: ldloc.1 + IL_0040: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0045: stloc.s V_4 + IL_0047: ldloc.2 + IL_0048: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004d: stloc.s V_5 + IL_004f: ldarg.2 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.s V_5 + IL_0054: tail. + IL_0056: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_005c: ldc.i4.1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: unbox.any class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_006a: ldnull - IL_006b: cgt.un - IL_006d: brfalse.s IL_0071 + IL_005e: ldarg.1 + IL_005f: unbox.any class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0064: brfalse.s IL_0068 .line 16707566,16707566 : 0,0 '' - IL_006f: ldc.i4.m1 - IL_0070: ret + IL_0066: ldc.i4.m1 + IL_0067: ret .line 16707566,16707566 : 0,0 '' - IL_0071: ldc.i4.0 - IL_0072: ret + IL_0068: ldc.i4.0 + IL_0069: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 76 (0x4c) + // Code size 73 (0x49) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004a + IL_0001: brfalse.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0019: stloc.2 - IL_001a: ldarg.1 - IL_001b: ldloc.2 - IL_001c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + 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 Equals06/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 [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_001e: ldloc.0 + IL_001f: ldc.i4.6 + IL_0020: shl 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: ldc.i4 0x9e3779b9 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0036: stloc.2 - IL_0037: ldarg.1 - IL_0038: ldloc.2 - IL_0039: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + 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 Equals06/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 [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_003b: ldloc.0 + IL_003c: ldc.i4.6 + IL_003d: shl IL_003e: ldloc.0 - IL_003f: ldc.i4.6 - IL_0040: shl - IL_0041: ldloc.0 - IL_0042: ldc.i4.2 - IL_0043: shr - IL_0044: add - IL_0045: add - IL_0046: add - IL_0047: stloc.0 - IL_0048: ldloc.0 - IL_0049: ret + 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 .line 16707566,16707566 : 0,0 '' - IL_004a: ldc.i4.0 - IL_004b: ret + IL_0047: ldc.i4.0 + IL_0048: ret } // end of method GenericKey`1::GetHashCode .method public hidebysig virtual final @@ -483,7 +469,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 87 (0x57) + // Code size 84 (0x54) .maxstack 5 .locals init ([0] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -492,79 +478,77 @@ [4] !a V_4) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004f + IL_0001: brfalse.s IL_004c .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_004d + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_004a .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001c: stloc.3 - IL_001d: ldloc.2 - IL_001e: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0023: stloc.s V_4 - IL_0025: ldarg.2 - IL_0026: ldloc.3 - IL_0027: ldloc.s V_4 - IL_0029: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.1 + IL_0014: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.s V_4 + IL_0022: ldarg.2 + IL_0023: ldloc.3 + IL_0024: ldloc.s V_4 + IL_0026: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_002e: brfalse.s IL_004b + IL_002b: brfalse.s IL_0048 .line 16707566,16707566 : 0,0 '' - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_003d: stloc.s V_4 - IL_003f: ldarg.2 - IL_0040: ldloc.3 - IL_0041: ldloc.s V_4 - IL_0043: tail. - IL_0045: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_002d: ldloc.1 + IL_002e: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0033: stloc.3 + IL_0034: ldloc.2 + IL_0035: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_003a: stloc.s V_4 + IL_003c: ldarg.2 + IL_003d: ldloc.3 + IL_003e: ldloc.s V_4 + IL_0040: tail. + IL_0042: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_004a: ret + IL_0047: ret .line 16707566,16707566 : 0,0 '' - IL_004b: ldc.i4.0 - IL_004c: ret + IL_0048: ldc.i4.0 + IL_0049: ret .line 16707566,16707566 : 0,0 '' - IL_004d: ldc.i4.0 - IL_004e: ret + IL_004a: ldc.i4.0 + IL_004b: ret .line 16707566,16707566 : 0,0 '' - IL_004f: ldarg.1 - IL_0050: ldnull - IL_0051: cgt.un - IL_0053: ldc.i4.0 - IL_0054: ceq - IL_0056: ret + IL_004c: ldarg.1 + IL_004d: ldnull + IL_004e: cgt.un + IL_0050: ldc.i4.0 + IL_0051: ceq + IL_0053: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final instance bool Equals(class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 77 (0x4d) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -572,66 +556,62 @@ [3] !a V_3) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0045 + IL_0001: brfalse.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0043 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_003d .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_000c: ldloc.0 + IL_000d: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0027: brfalse.s IL_0041 - - .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.0 - IL_002a: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_002f: stloc.2 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldloc.3 - IL_0039: tail. - IL_003b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_0021: brfalse.s IL_003b + + .line 16707566,16707566 : 0,0 '' + IL_0023: ldloc.0 + IL_0024: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0029: stloc.2 + IL_002a: ldloc.1 + IL_002b: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0030: stloc.3 + IL_0031: ldloc.2 + IL_0032: ldloc.3 + IL_0033: tail. + IL_0035: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0040: ret + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldc.i4.0 - IL_0042: ret + IL_003b: ldc.i4.0 + IL_003c: ret .line 16707566,16707566 : 0,0 '' - IL_0043: ldc.i4.0 - IL_0044: ret + IL_003d: ldc.i4.0 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldarg.1 - IL_0046: ldnull - IL_0047: cgt.un - IL_0049: ldc.i4.0 - IL_004a: ceq - IL_004c: ret + IL_003f: ldarg.1 + IL_0040: ldnull + IL_0041: cgt.un + IL_0043: ldc.i4.0 + IL_0044: ceq + IL_0046: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl index b20d3357b04..1f195ecf0a9 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000A98 Length: 0x0000058B } .module Equals09.dll -// MVID: {61E0712B-0759-46D9-A745-03832B71E061} +// MVID: {6220E4FA-0759-46D9-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B60000 +// Image base: 0x06F20000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals09.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + 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 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + 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 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1, [2] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -802,7 +782,7 @@ instance int32 CompareTo(class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 169 (0xa9) + // Code size 160 (0xa0) .maxstack 5 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -817,116 +797,110 @@ [10] int32 V_10) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_009f + IL_0001: brfalse IL_0099 .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse IL_009d + IL_0006: ldarg.1 + IL_0007: brfalse IL_0097 .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.0 - IL_0016: ldarg.1 - IL_0017: stloc.1 - IL_0018: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_001d: stloc.3 - IL_001e: ldloc.0 - IL_001f: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.1 - IL_0027: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002c: stloc.s V_5 - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: ldloc.3 - IL_0033: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0017: stloc.3 + IL_0018: ldloc.0 + IL_0019: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.1 + IL_0021: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: ldloc.3 + IL_002d: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0038: stloc.2 + IL_0032: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0039: ldloc.2 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.2 - IL_0044: ret + IL_003d: ldloc.2 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004a: stloc.3 - IL_004b: ldloc.0 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.1 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldloc.3 - IL_0084: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0044: stloc.3 + IL_0045: ldloc.0 + IL_0046: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_004b: stloc.s V_6 + IL_004d: ldloc.1 + IL_004e: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_4 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_5 + IL_0067: ldloc.s V_7 + IL_0069: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_006e: stloc.s V_8 + IL_0070: ldloc.s V_7 + IL_0072: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0077: stloc.s V_9 + IL_0079: ldloc.s V_4 + IL_007b: ldloc.s V_8 + IL_007d: ldloc.3 + IL_007e: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 + IL_0083: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_0085: ldloc.s V_10 + IL_0087: brfalse.s IL_008c .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0089: ldloc.s V_10 + IL_008b: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldloc.3 - IL_0097: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_9 + IL_0090: ldloc.3 + IL_0091: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_0096: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_0097: ldc.i4.1 + IL_0098: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: ldnull - IL_00a1: cgt.un - IL_00a3: brfalse.s IL_00a7 + IL_0099: ldarg.1 + IL_009a: brfalse.s IL_009e .line 16707566,16707566 : 0,0 '' - IL_00a5: ldc.i4.m1 - IL_00a6: ret + IL_009c: ldc.i4.m1 + IL_009d: ret .line 16707566,16707566 : 0,0 '' - IL_00a7: ldc.i4.0 - IL_00a8: ret + IL_009e: ldc.i4.0 + IL_009f: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final @@ -947,7 +921,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 174 (0xae) + // Code size 165 (0xa5) .maxstack 5 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -966,121 +940,115 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse IL_009f + IL_0008: brfalse IL_0099 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.1 - IL_0011: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_0016: ldnull - IL_0017: cgt.un - IL_0019: brfalse IL_009d - - .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: pop - .line 16707566,16707566 : 0,0 '' - IL_0020: ldarg.0 - IL_0021: stloc.1 - IL_0022: ldloc.0 - IL_0023: stloc.2 - IL_0024: ldloc.1 - IL_0025: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002a: stloc.s V_4 - IL_002c: ldloc.2 - IL_002d: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0032: stloc.s V_5 - IL_0034: ldloc.s V_4 - IL_0036: ldloc.s V_5 - IL_0038: ldarg.2 - IL_0039: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_000d: ldarg.1 + IL_000e: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_0013: brfalse IL_0097 + + .line 16707566,16707566 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: pop + .line 16707566,16707566 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: stloc.1 + IL_001c: ldloc.0 + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0024: stloc.s V_4 + IL_0026: ldloc.2 + IL_0027: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_002c: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: ldarg.2 + IL_0033: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_003e: stloc.3 + IL_0038: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_0039: ldloc.3 + IL_003a: ldc.i4.0 + IL_003b: bge.s IL_003f + + .line 16707566,16707566 : 0,0 '' + IL_003d: ldloc.3 + IL_003e: ret + .line 16707566,16707566 : 0,0 '' IL_003f: ldloc.3 IL_0040: ldc.i4.0 - IL_0041: bge.s IL_0045 + IL_0041: ble.s IL_0045 .line 16707566,16707566 : 0,0 '' IL_0043: ldloc.3 IL_0044: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.3 - IL_0046: ldc.i4.0 - IL_0047: ble.s IL_004b - - .line 16707566,16707566 : 0,0 '' - IL_0049: ldloc.3 - IL_004a: ret - - .line 16707566,16707566 : 0,0 '' - IL_004b: ldloc.1 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.2 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldarg.2 - IL_0084: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0045: ldloc.1 + IL_0046: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_004b: stloc.s V_6 + IL_004d: ldloc.2 + IL_004e: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_4 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_5 + IL_0067: ldloc.s V_7 + IL_0069: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_006e: stloc.s V_8 + IL_0070: ldloc.s V_7 + IL_0072: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0077: stloc.s V_9 + IL_0079: ldloc.s V_4 + IL_007b: ldloc.s V_8 + IL_007d: ldarg.2 + IL_007e: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 + IL_0083: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_0085: ldloc.s V_10 + IL_0087: brfalse.s IL_008c .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0089: ldloc.s V_10 + IL_008b: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldarg.2 - IL_0097: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_9 + IL_0090: ldarg.2 + IL_0091: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_0096: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_0097: ldc.i4.1 + IL_0098: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_00a5: ldnull - IL_00a6: cgt.un - IL_00a8: brfalse.s IL_00ac + IL_0099: ldarg.1 + IL_009a: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_009f: brfalse.s IL_00a3 .line 16707566,16707566 : 0,0 '' - IL_00aa: ldc.i4.m1 - IL_00ab: ret + IL_00a1: ldc.i4.m1 + IL_00a2: ret .line 16707566,16707566 : 0,0 '' - IL_00ac: ldc.i4.0 - IL_00ad: ret + IL_00a3: ldc.i4.0 + IL_00a4: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 107 (0x6b) + // Code size 104 (0x68) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1090,75 +1058,73 @@ [5] int32 V_5) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0069 + IL_0001: brfalse.s IL_0066 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0019: stloc.2 - IL_001a: ldloc.2 - IL_001b: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0020: stloc.3 - IL_0021: ldloc.2 - IL_0022: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0027: stloc.s V_4 - IL_0029: ldloc.3 - IL_002a: ldarg.1 - IL_002b: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: ldc.i4.5 - IL_0035: shl - IL_0036: ldloc.s V_5 - IL_0038: add - IL_0039: ldloc.s V_4 - IL_003b: ldarg.1 - IL_003c: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0041: xor + 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 [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0024: stloc.s V_4 + IL_0026: ldloc.3 + IL_0027: ldarg.1 + IL_0028: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]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 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]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.6 - IL_0044: shl - IL_0045: ldloc.0 - IL_0046: ldc.i4.2 - IL_0047: shr - IL_0048: add - IL_0049: add - IL_004a: add - IL_004b: stloc.0 - IL_004c: ldc.i4 0x9e3779b9 - IL_0051: ldloc.1 - IL_0052: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0057: ldarg.1 - IL_0058: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + 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 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0054: ldarg.1 + IL_0055: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_005a: ldloc.0 + IL_005b: ldc.i4.6 + IL_005c: shl IL_005d: ldloc.0 - IL_005e: ldc.i4.6 - IL_005f: shl - IL_0060: ldloc.0 - IL_0061: ldc.i4.2 - IL_0062: shr - IL_0063: add - IL_0064: add - IL_0065: add - IL_0066: stloc.0 - IL_0067: ldloc.0 - IL_0068: ret - - .line 16707566,16707566 : 0,0 '' - IL_0069: ldc.i4.0 - IL_006a: ret + 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 + + .line 16707566,16707566 : 0,0 '' + IL_0066: ldc.i4.0 + IL_0067: ret } // end of method KeyWithInnerKeys::GetHashCode .method public hidebysig virtual final @@ -1178,7 +1144,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 138 (0x8a) + // Code size 135 (0x87) .maxstack 5 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1191,157 +1157,151 @@ [8] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_8) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_0082 + IL_0001: brfalse IL_007f .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_000f: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: brfalse.s IL_0080 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_007d .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0015: ldarg.0 - IL_0016: stloc.1 - IL_0017: ldloc.0 - IL_0018: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0019: ldloc.1 - IL_001a: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0026: stloc.s V_4 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldarg.2 - IL_002c: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0016: ldloc.1 + IL_0017: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001c: stloc.3 + IL_001d: ldloc.2 + IL_001e: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0023: stloc.s V_4 + IL_0025: ldloc.3 + IL_0026: ldloc.s V_4 + IL_0028: ldarg.2 + IL_0029: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_0031: brfalse.s IL_007e - - .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.1 - IL_0034: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0039: stloc.s V_5 - IL_003b: ldloc.2 - IL_003c: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0041: stloc.s V_6 - IL_0043: ldloc.s V_5 - IL_0045: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_004a: stloc.3 - IL_004b: ldloc.s V_5 - IL_004d: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0052: stloc.s V_4 - IL_0054: ldloc.s V_6 - IL_0056: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_005b: stloc.s V_7 - IL_005d: ldloc.s V_6 - IL_005f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0064: stloc.s V_8 - .line 16707566,16707566 : 0,0 '' - IL_0066: ldloc.3 - IL_0067: ldloc.s V_7 - IL_0069: ldarg.2 - IL_006a: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_002e: brfalse.s IL_007b + + .line 16707566,16707566 : 0,0 '' + IL_0030: ldloc.1 + IL_0031: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0036: stloc.s V_5 + IL_0038: ldloc.2 + IL_0039: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_003e: stloc.s V_6 + IL_0040: ldloc.s V_5 + IL_0042: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0047: stloc.3 + IL_0048: ldloc.s V_5 + IL_004a: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_004f: stloc.s V_4 + IL_0051: ldloc.s V_6 + IL_0053: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0058: stloc.s V_7 + IL_005a: ldloc.s V_6 + IL_005c: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0061: stloc.s V_8 + .line 16707566,16707566 : 0,0 '' + IL_0063: ldloc.3 + IL_0064: ldloc.s V_7 + IL_0066: ldarg.2 + IL_0067: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_006f: brfalse.s IL_007c + IL_006c: brfalse.s IL_0079 .line 16707566,16707566 : 0,0 '' - IL_0071: ldloc.s V_4 - IL_0073: ldloc.s V_8 - IL_0075: ldarg.2 - IL_0076: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_006e: ldloc.s V_4 + IL_0070: ldloc.s V_8 + IL_0072: ldarg.2 + IL_0073: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_007b: ret + IL_0078: ret .line 16707566,16707566 : 0,0 '' - IL_007c: ldc.i4.0 - IL_007d: ret + IL_0079: ldc.i4.0 + IL_007a: ret .line 16707566,16707566 : 0,0 '' - IL_007e: ldc.i4.0 - IL_007f: ret + IL_007b: ldc.i4.0 + IL_007c: ret .line 16707566,16707566 : 0,0 '' - IL_0080: ldc.i4.0 - IL_0081: ret + IL_007d: ldc.i4.0 + IL_007e: ret .line 16707566,16707566 : 0,0 '' - IL_0082: ldarg.1 - IL_0083: ldnull - IL_0084: cgt.un - IL_0086: ldc.i4.0 - IL_0087: ceq - IL_0089: ret + IL_007f: ldarg.1 + IL_0080: ldnull + IL_0081: cgt.un + IL_0083: ldc.i4.0 + IL_0084: ceq + IL_0086: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final instance bool Equals(class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 69 (0x45) + // Code size 63 (0x3f) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003d + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_003b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0012: ldloc.1 IL_0013: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0018: ldloc.1 - IL_0019: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001e: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key) - IL_0023: brfalse.s IL_0039 + IL_0018: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key) + IL_001d: brfalse.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0025: ldloc.0 + IL_001f: ldloc.0 + IL_0020: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0025: ldloc.1 IL_0026: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_002b: ldloc.1 - IL_002c: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0031: tail. - IL_0033: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, + IL_002b: tail. + IL_002d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, !!0) - IL_0038: ret + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_003d: ldarg.1 - IL_003e: ldnull - IL_003f: cgt.un - IL_0041: ldc.i4.0 - IL_0042: ceq - IL_0044: ret + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: ldc.i4.0 + IL_003c: ceq + IL_003e: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl index 83743703bab..d7ae1be31ae 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006D8 Length: 0x000003B1 } .module Hash05.dll -// MVID: {61F0294F-9642-7857-A745-03834F29F061} +// MVID: {6220E4FA-9642-7857-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A20000 +// Image base: 0x053B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Hash05/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash05.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Hash05/HashMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Hash05/HashMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Hash05/HashMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Hash05/HashMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + 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 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + 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 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1, [2] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Hash05/HashMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Hash05/HashMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Hash05/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl index 123b3da4dc0..a1e7b24c811 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006D8 Length: 0x000003B2 } .module Hash06.dll -// MVID: {61F0294F-9642-78F2-A745-03834F29F061} +// MVID: {6220E4FA-9642-78F2-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B50000 +// Image base: 0x06FE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Hash06/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash06.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Hash06/HashMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Hash06/HashMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Hash06/HashMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Hash06/HashMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + 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 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + 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 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1, [2] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Hash06/HashMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Hash06/HashMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Hash06/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl index 367e8b2108b..4df8e882961 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006C8 Length: 0x000003B3 } .module Hash08.dll -// MVID: {61F0294F-9642-77BC-A745-03834F29F061} +// MVID: {6220E4FA-9642-77BC-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x073F0000 +// Image base: 0x066F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -123,7 +123,7 @@ instance int32 CompareTo(class Hash08/HashMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 101 (0x65) + // Code size 92 (0x5c) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -132,103 +132,97 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash08.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_005b + IL_0001: brfalse.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0059 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001f: stloc.3 + IL_0006: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: bge.s IL_0022 .line 16707566,16707566 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_001e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_001f: nop + IL_0020: br.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0022: ldloc.2 + IL_0023: ldloc.3 + IL_0024: cgt .line 16707566,16707566 : 0,0 '' - IL_002c: nop + IL_0026: nop + .line 16707566,16707566 : 0,0 '' + IL_0027: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0028: ldloc.0 + IL_0029: ldc.i4.0 + IL_002a: bge.s IL_002e + .line 16707566,16707566 : 0,0 '' - IL_002d: stloc.0 + IL_002c: ldloc.0 + IL_002d: ret + .line 16707566,16707566 : 0,0 '' IL_002e: ldloc.0 IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_0030: ble.s IL_0034 .line 16707566,16707566 : 0,0 '' IL_0032: ldloc.0 IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a - + IL_0034: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0039: stloc.1 + IL_003a: ldarg.0 + IL_003b: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0040: stloc.2 + IL_0041: ldarg.1 + IL_0042: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: bge.s IL_004e .line 16707566,16707566 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.1 - IL_0040: ldarg.0 - IL_0041: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldarg.1 - IL_0048: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 + IL_004c: ldc.i4.m1 + IL_004d: ret + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 - - .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret - - .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0050: cgt + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_0053: ldc.i4.1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: ldnull - IL_005d: cgt.un - IL_005f: brfalse.s IL_0063 + IL_0055: ldarg.1 + IL_0056: brfalse.s IL_005a .line 16707566,16707566 : 0,0 '' - IL_0061: ldc.i4.m1 - IL_0062: ret + IL_0058: ldc.i4.m1 + IL_0059: ret .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.0 - IL_0064: ret + IL_005a: ldc.i4.0 + IL_005b: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final @@ -249,7 +243,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 106 (0x6a) + // Code size 97 (0x61) .maxstack 4 .locals init ([0] class Hash08/HashMicroPerfAndCodeGenerationTests/KeyR V_0, [1] int32 V_1, @@ -261,151 +255,143 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_005b + IL_0008: brfalse.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Hash08/HashMicroPerfAndCodeGenerationTests/KeyR - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0059 + IL_000a: ldarg.1 + IL_000b: unbox.any Hash08/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0010: brfalse.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001e: stloc.2 - IL_001f: ldloc.0 - IL_0020: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: stloc.3 + IL_0012: ldarg.0 + IL_0013: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001f: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0026: ldloc.2 - IL_0027: ldloc.3 - IL_0028: bge.s IL_002e + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: bge.s IL_0028 .line 16707566,16707566 : 0,0 '' - IL_002a: ldc.i4.m1 + IL_0024: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002b: nop - IL_002c: br.s IL_0033 + IL_0025: nop + IL_0026: br.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.2 - IL_002f: ldloc.3 - IL_0030: cgt + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: cgt + .line 16707566,16707566 : 0,0 '' + IL_002c: nop .line 16707566,16707566 : 0,0 '' - IL_0032: nop + IL_002d: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0033: stloc.1 + IL_002e: ldloc.1 + IL_002f: ldc.i4.0 + IL_0030: bge.s IL_0034 + + .line 16707566,16707566 : 0,0 '' + IL_0032: ldloc.1 + IL_0033: ret + .line 16707566,16707566 : 0,0 '' IL_0034: ldloc.1 IL_0035: ldc.i4.0 - IL_0036: bge.s IL_003a + IL_0036: ble.s IL_003a .line 16707566,16707566 : 0,0 '' IL_0038: ldloc.1 IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.1 - IL_003b: ldc.i4.0 - IL_003c: ble.s IL_0040 - + IL_003a: ldarg.0 + IL_003b: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0040: stloc.2 + IL_0041: ldloc.0 + IL_0042: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.1 - IL_003f: ret + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: bge.s IL_004e .line 16707566,16707566 : 0,0 '' - IL_0040: ldarg.0 - IL_0041: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldloc.0 - IL_0048: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 + IL_004c: ldc.i4.m1 + IL_004d: ret + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 - - .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret + IL_0050: cgt + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0053: ldc.i4.1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_0055: ldarg.1 + IL_0056: unbox.any Hash08/HashMicroPerfAndCodeGenerationTests/KeyR + IL_005b: brfalse.s IL_005f .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: unbox.any Hash08/HashMicroPerfAndCodeGenerationTests/KeyR - IL_0061: ldnull - IL_0062: cgt.un - IL_0064: brfalse.s IL_0068 + IL_005d: ldc.i4.m1 + IL_005e: ret .line 16707566,16707566 : 0,0 '' - IL_0066: ldc.i4.m1 - IL_0067: ret - - .line 16707566,16707566 : 0,0 '' - IL_0068: ldc.i4.0 - IL_0069: ret + IL_005f: ldc.i4.0 + IL_0060: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 54 (0x36) + // Code size 51 (0x33) .maxstack 7 .locals init ([0] int32 V_0) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0034 + IL_0001: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.0 - IL_000e: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl 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: ldc.i4 0x9e3779b9 - IL_0022: ldarg.0 - IL_0023: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + 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 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl IL_0028: ldloc.0 - IL_0029: ldc.i4.6 - IL_002a: shl - IL_002b: ldloc.0 - IL_002c: ldc.i4.2 - IL_002d: shr - IL_002e: add - IL_002f: add - IL_0030: add - IL_0031: stloc.0 - IL_0032: ldloc.0 - IL_0033: ret + 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 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0031: ldc.i4.0 + IL_0032: ret } // end of method KeyR::GetHashCode .method public hidebysig virtual final @@ -425,103 +411,97 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 57 (0x39) + // Code size 54 (0x36) .maxstack 4 .locals init ([0] class Hash08/HashMicroPerfAndCodeGenerationTests/KeyR V_0) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0031 + IL_0001: brfalse.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Hash08/HashMicroPerfAndCodeGenerationTests/KeyR - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Hash08/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002f + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0016: ldloc.0 - IL_0017: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001c: bne.un.s IL_002d + IL_000d: ldarg.0 + IL_000e: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldloc.0 + IL_0014: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0024: ldloc.0 - IL_0025: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_002a: ceq - IL_002c: ret + IL_001b: ldarg.0 + IL_001c: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldloc.0 + IL_0022: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldc.i4.0 - IL_002e: ret + IL_002a: ldc.i4.0 + IL_002b: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldarg.1 - IL_0032: ldnull - IL_0033: cgt.un - IL_0035: ldc.i4.0 - IL_0036: ceq - IL_0038: ret + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret } // end of method KeyR::Equals .method public hidebysig virtual final instance bool Equals(class Hash08/HashMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 47 (0x2f) .maxstack 8 .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: brfalse.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 + IL_0006: ldarg.0 + IL_0007: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000c: ldarg.1 IL_000d: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: bne.un.s IL_0029 + IL_0012: bne.un.s IL_0023 .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 + IL_0014: ldarg.0 + IL_0015: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_001a: ldarg.1 IL_001b: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0026: ceq - IL_0028: ret + IL_0020: ceq + IL_0022: ret .line 16707566,16707566 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_0023: ldc.i4.0 + IL_0024: ret .line 16707566,16707566 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_0025: ldc.i4.0 + IL_0026: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret } // end of method KeyR::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl index c30b1196014..8ecc2bff4a1 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000888 Length: 0x00000680 } .module Hash09.dll -// MVID: {61F0294F-9642-77DB-A745-03834F29F061} +// MVID: {6220E4FA-9642-77DB-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x069F0000 +// Image base: 0x07390000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 110 (0x6e) + // Code size 101 (0x65) .maxstack 5 .locals init ([0] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -189,92 +189,86 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash09.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0064 + IL_0001: brfalse.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0062 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_005c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.3 + IL_0023: ldloc.s V_4 + IL_0025: ldloc.s V_5 + IL_0027: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0032: stloc.2 + IL_002c: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.2 - IL_0034: ldc.i4.0 - IL_0035: bge.s IL_0039 + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: bge.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0037: ldloc.2 - IL_0038: ret + IL_0031: ldloc.2 + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: ble.s IL_003f + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: ble.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0044: stloc.3 - IL_0045: ldloc.0 - IL_0046: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.1 - IL_004e: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldloc.3 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0039: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_003e: stloc.3 + IL_003f: ldloc.0 + IL_0040: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0045: stloc.s V_4 + IL_0047: ldloc.1 + IL_0048: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004d: stloc.s V_5 + IL_004f: ldloc.3 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.s V_5 + IL_0054: tail. + IL_0056: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_005c: ldc.i4.1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: ldnull - IL_0066: cgt.un - IL_0068: brfalse.s IL_006c + IL_005e: ldarg.1 + IL_005f: brfalse.s IL_0063 .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.m1 - IL_006b: ret + IL_0061: ldc.i4.m1 + IL_0062: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.0 - IL_006d: ret + IL_0063: ldc.i4.0 + IL_0064: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final @@ -296,7 +290,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 115 (0x73) + // Code size 106 (0x6a) .maxstack 5 .locals init ([0] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -310,160 +304,152 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0064 - - .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0062 - - .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop - .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_002c: stloc.s V_5 - IL_002e: ldarg.2 - IL_002f: ldloc.s V_4 - IL_0031: ldloc.s V_5 - IL_0033: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0008: brfalse.s IL_005e + + .line 16707566,16707566 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0010: brfalse.s IL_005c + + .line 16707566,16707566 : 0,0 '' + IL_0012: ldarg.0 + IL_0013: pop + .line 16707566,16707566 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0026: stloc.s V_5 + IL_0028: ldarg.2 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0038: stloc.3 + IL_0032: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.3 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0033: ldloc.3 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.3 - IL_003e: ret + IL_0037: ldloc.3 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.3 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0039: ldloc.3 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.3 - IL_0044: ret + IL_003d: ldloc.3 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.1 - IL_0046: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.2 - IL_004e: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldarg.2 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_003f: ldloc.1 + IL_0040: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0045: stloc.s V_4 + IL_0047: ldloc.2 + IL_0048: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004d: stloc.s V_5 + IL_004f: ldarg.2 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.s V_5 + IL_0054: tail. + IL_0056: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_005c: ldc.i4.1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: unbox.any class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_006a: ldnull - IL_006b: cgt.un - IL_006d: brfalse.s IL_0071 + IL_005e: ldarg.1 + IL_005f: unbox.any class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0064: brfalse.s IL_0068 .line 16707566,16707566 : 0,0 '' - IL_006f: ldc.i4.m1 - IL_0070: ret + IL_0066: ldc.i4.m1 + IL_0067: ret .line 16707566,16707566 : 0,0 '' - IL_0071: ldc.i4.0 - IL_0072: ret + IL_0068: ldc.i4.0 + IL_0069: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 76 (0x4c) + // Code size 73 (0x49) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004a + IL_0001: brfalse.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0019: stloc.2 - IL_001a: ldarg.1 - IL_001b: ldloc.2 - IL_001c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + 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 Hash09/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 [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_001e: ldloc.0 + IL_001f: ldc.i4.6 + IL_0020: shl 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: ldc.i4 0x9e3779b9 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0036: stloc.2 - IL_0037: ldarg.1 - IL_0038: ldloc.2 - IL_0039: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + 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 Hash09/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 [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_003b: ldloc.0 + IL_003c: ldc.i4.6 + IL_003d: shl IL_003e: ldloc.0 - IL_003f: ldc.i4.6 - IL_0040: shl - IL_0041: ldloc.0 - IL_0042: ldc.i4.2 - IL_0043: shr - IL_0044: add - IL_0045: add - IL_0046: add - IL_0047: stloc.0 - IL_0048: ldloc.0 - IL_0049: ret + 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 .line 16707566,16707566 : 0,0 '' - IL_004a: ldc.i4.0 - IL_004b: ret + IL_0047: ldc.i4.0 + IL_0048: ret } // end of method GenericKey`1::GetHashCode .method public hidebysig virtual final @@ -483,7 +469,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 87 (0x57) + // Code size 84 (0x54) .maxstack 5 .locals init ([0] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -492,79 +478,77 @@ [4] !a V_4) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004f + IL_0001: brfalse.s IL_004c .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_004d + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_004a .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001c: stloc.3 - IL_001d: ldloc.2 - IL_001e: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0023: stloc.s V_4 - IL_0025: ldarg.2 - IL_0026: ldloc.3 - IL_0027: ldloc.s V_4 - IL_0029: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.1 + IL_0014: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.s V_4 + IL_0022: ldarg.2 + IL_0023: ldloc.3 + IL_0024: ldloc.s V_4 + IL_0026: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_002e: brfalse.s IL_004b + IL_002b: brfalse.s IL_0048 .line 16707566,16707566 : 0,0 '' - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_003d: stloc.s V_4 - IL_003f: ldarg.2 - IL_0040: ldloc.3 - IL_0041: ldloc.s V_4 - IL_0043: tail. - IL_0045: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_002d: ldloc.1 + IL_002e: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0033: stloc.3 + IL_0034: ldloc.2 + IL_0035: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_003a: stloc.s V_4 + IL_003c: ldarg.2 + IL_003d: ldloc.3 + IL_003e: ldloc.s V_4 + IL_0040: tail. + IL_0042: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_004a: ret + IL_0047: ret .line 16707566,16707566 : 0,0 '' - IL_004b: ldc.i4.0 - IL_004c: ret + IL_0048: ldc.i4.0 + IL_0049: ret .line 16707566,16707566 : 0,0 '' - IL_004d: ldc.i4.0 - IL_004e: ret + IL_004a: ldc.i4.0 + IL_004b: ret .line 16707566,16707566 : 0,0 '' - IL_004f: ldarg.1 - IL_0050: ldnull - IL_0051: cgt.un - IL_0053: ldc.i4.0 - IL_0054: ceq - IL_0056: ret + IL_004c: ldarg.1 + IL_004d: ldnull + IL_004e: cgt.un + IL_0050: ldc.i4.0 + IL_0051: ceq + IL_0053: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final instance bool Equals(class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 77 (0x4d) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -572,66 +556,62 @@ [3] !a V_3) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0045 + IL_0001: brfalse.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0043 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_003d .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_000c: ldloc.0 + IL_000d: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0027: brfalse.s IL_0041 - - .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.0 - IL_002a: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_002f: stloc.2 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldloc.3 - IL_0039: tail. - IL_003b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_0021: brfalse.s IL_003b + + .line 16707566,16707566 : 0,0 '' + IL_0023: ldloc.0 + IL_0024: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0029: stloc.2 + IL_002a: ldloc.1 + IL_002b: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0030: stloc.3 + IL_0031: ldloc.2 + IL_0032: ldloc.3 + IL_0033: tail. + IL_0035: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0040: ret + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldc.i4.0 - IL_0042: ret + IL_003b: ldc.i4.0 + IL_003c: ret .line 16707566,16707566 : 0,0 '' - IL_0043: ldc.i4.0 - IL_0044: ret + IL_003d: ldc.i4.0 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldarg.1 - IL_0046: ldnull - IL_0047: cgt.un - IL_0049: ldc.i4.0 - IL_004a: ceq - IL_004c: ret + IL_003f: ldarg.1 + IL_0040: ldnull + IL_0041: cgt.un + IL_0043: ldc.i4.0 + IL_0044: ceq + IL_0046: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl index 074c977668d..514de1155d5 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000A90 Length: 0x00000585 } .module Hash12.dll -// MVID: {61F0294F-9661-796E-A745-03834F29F061} +// MVID: {6220E4FA-9661-796E-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07540000 +// Image base: 0x07040000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Hash12/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash12.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + 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 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + 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 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1, [2] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Hash12/HashMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Hash12/HashMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Hash12/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -802,7 +782,7 @@ instance int32 CompareTo(class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 169 (0xa9) + // Code size 160 (0xa0) .maxstack 5 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -817,116 +797,110 @@ [10] int32 V_10) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_009f + IL_0001: brfalse IL_0099 .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse IL_009d + IL_0006: ldarg.1 + IL_0007: brfalse IL_0097 .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.0 - IL_0016: ldarg.1 - IL_0017: stloc.1 - IL_0018: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_001d: stloc.3 - IL_001e: ldloc.0 - IL_001f: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.1 - IL_0027: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002c: stloc.s V_5 - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: ldloc.3 - IL_0033: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0017: stloc.3 + IL_0018: ldloc.0 + IL_0019: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.1 + IL_0021: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: ldloc.3 + IL_002d: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0038: stloc.2 + IL_0032: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0039: ldloc.2 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.2 - IL_0044: ret + IL_003d: ldloc.2 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004a: stloc.3 - IL_004b: ldloc.0 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.1 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldloc.3 - IL_0084: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0044: stloc.3 + IL_0045: ldloc.0 + IL_0046: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_004b: stloc.s V_6 + IL_004d: ldloc.1 + IL_004e: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_4 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_5 + IL_0067: ldloc.s V_7 + IL_0069: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_006e: stloc.s V_8 + IL_0070: ldloc.s V_7 + IL_0072: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0077: stloc.s V_9 + IL_0079: ldloc.s V_4 + IL_007b: ldloc.s V_8 + IL_007d: ldloc.3 + IL_007e: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 + IL_0083: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_0085: ldloc.s V_10 + IL_0087: brfalse.s IL_008c .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0089: ldloc.s V_10 + IL_008b: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldloc.3 - IL_0097: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_9 + IL_0090: ldloc.3 + IL_0091: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_0096: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_0097: ldc.i4.1 + IL_0098: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: ldnull - IL_00a1: cgt.un - IL_00a3: brfalse.s IL_00a7 + IL_0099: ldarg.1 + IL_009a: brfalse.s IL_009e .line 16707566,16707566 : 0,0 '' - IL_00a5: ldc.i4.m1 - IL_00a6: ret + IL_009c: ldc.i4.m1 + IL_009d: ret .line 16707566,16707566 : 0,0 '' - IL_00a7: ldc.i4.0 - IL_00a8: ret + IL_009e: ldc.i4.0 + IL_009f: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final @@ -947,7 +921,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 174 (0xae) + // Code size 165 (0xa5) .maxstack 5 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -966,121 +940,115 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse IL_009f + IL_0008: brfalse IL_0099 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.1 - IL_0011: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_0016: ldnull - IL_0017: cgt.un - IL_0019: brfalse IL_009d - - .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: pop - .line 16707566,16707566 : 0,0 '' - IL_0020: ldarg.0 - IL_0021: stloc.1 - IL_0022: ldloc.0 - IL_0023: stloc.2 - IL_0024: ldloc.1 - IL_0025: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002a: stloc.s V_4 - IL_002c: ldloc.2 - IL_002d: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0032: stloc.s V_5 - IL_0034: ldloc.s V_4 - IL_0036: ldloc.s V_5 - IL_0038: ldarg.2 - IL_0039: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_000d: ldarg.1 + IL_000e: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_0013: brfalse IL_0097 + + .line 16707566,16707566 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: pop + .line 16707566,16707566 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: stloc.1 + IL_001c: ldloc.0 + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0024: stloc.s V_4 + IL_0026: ldloc.2 + IL_0027: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_002c: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: ldarg.2 + IL_0033: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_003e: stloc.3 + IL_0038: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_0039: ldloc.3 + IL_003a: ldc.i4.0 + IL_003b: bge.s IL_003f + + .line 16707566,16707566 : 0,0 '' + IL_003d: ldloc.3 + IL_003e: ret + .line 16707566,16707566 : 0,0 '' IL_003f: ldloc.3 IL_0040: ldc.i4.0 - IL_0041: bge.s IL_0045 + IL_0041: ble.s IL_0045 .line 16707566,16707566 : 0,0 '' IL_0043: ldloc.3 IL_0044: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.3 - IL_0046: ldc.i4.0 - IL_0047: ble.s IL_004b - - .line 16707566,16707566 : 0,0 '' - IL_0049: ldloc.3 - IL_004a: ret - - .line 16707566,16707566 : 0,0 '' - IL_004b: ldloc.1 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.2 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldarg.2 - IL_0084: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0045: ldloc.1 + IL_0046: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_004b: stloc.s V_6 + IL_004d: ldloc.2 + IL_004e: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_4 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_5 + IL_0067: ldloc.s V_7 + IL_0069: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_006e: stloc.s V_8 + IL_0070: ldloc.s V_7 + IL_0072: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0077: stloc.s V_9 + IL_0079: ldloc.s V_4 + IL_007b: ldloc.s V_8 + IL_007d: ldarg.2 + IL_007e: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 + IL_0083: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_0085: ldloc.s V_10 + IL_0087: brfalse.s IL_008c .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0089: ldloc.s V_10 + IL_008b: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldarg.2 - IL_0097: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_9 + IL_0090: ldarg.2 + IL_0091: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_0096: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_0097: ldc.i4.1 + IL_0098: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_00a5: ldnull - IL_00a6: cgt.un - IL_00a8: brfalse.s IL_00ac + IL_0099: ldarg.1 + IL_009a: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_009f: brfalse.s IL_00a3 .line 16707566,16707566 : 0,0 '' - IL_00aa: ldc.i4.m1 - IL_00ab: ret + IL_00a1: ldc.i4.m1 + IL_00a2: ret .line 16707566,16707566 : 0,0 '' - IL_00ac: ldc.i4.0 - IL_00ad: ret + IL_00a3: ldc.i4.0 + IL_00a4: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 107 (0x6b) + // Code size 104 (0x68) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1090,75 +1058,73 @@ [5] int32 V_5) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0069 + IL_0001: brfalse.s IL_0066 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0019: stloc.2 - IL_001a: ldloc.2 - IL_001b: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0020: stloc.3 - IL_0021: ldloc.2 - IL_0022: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0027: stloc.s V_4 - IL_0029: ldloc.3 - IL_002a: ldarg.1 - IL_002b: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: ldc.i4.5 - IL_0035: shl - IL_0036: ldloc.s V_5 - IL_0038: add - IL_0039: ldloc.s V_4 - IL_003b: ldarg.1 - IL_003c: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0041: xor + 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 [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0024: stloc.s V_4 + IL_0026: ldloc.3 + IL_0027: ldarg.1 + IL_0028: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]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 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]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.6 - IL_0044: shl - IL_0045: ldloc.0 - IL_0046: ldc.i4.2 - IL_0047: shr - IL_0048: add - IL_0049: add - IL_004a: add - IL_004b: stloc.0 - IL_004c: ldc.i4 0x9e3779b9 - IL_0051: ldloc.1 - IL_0052: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0057: ldarg.1 - IL_0058: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + 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 Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0054: ldarg.1 + IL_0055: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_005a: ldloc.0 + IL_005b: ldc.i4.6 + IL_005c: shl IL_005d: ldloc.0 - IL_005e: ldc.i4.6 - IL_005f: shl - IL_0060: ldloc.0 - IL_0061: ldc.i4.2 - IL_0062: shr - IL_0063: add - IL_0064: add - IL_0065: add - IL_0066: stloc.0 - IL_0067: ldloc.0 - IL_0068: ret - - .line 16707566,16707566 : 0,0 '' - IL_0069: ldc.i4.0 - IL_006a: ret + 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 + + .line 16707566,16707566 : 0,0 '' + IL_0066: ldc.i4.0 + IL_0067: ret } // end of method KeyWithInnerKeys::GetHashCode .method public hidebysig virtual final @@ -1178,7 +1144,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 138 (0x8a) + // Code size 135 (0x87) .maxstack 5 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1191,157 +1157,151 @@ [8] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_8) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_0082 + IL_0001: brfalse IL_007f .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: isinst Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_000f: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: brfalse.s IL_0080 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_007d .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0015: ldarg.0 - IL_0016: stloc.1 - IL_0017: ldloc.0 - IL_0018: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0019: ldloc.1 - IL_001a: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0026: stloc.s V_4 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldarg.2 - IL_002c: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0016: ldloc.1 + IL_0017: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001c: stloc.3 + IL_001d: ldloc.2 + IL_001e: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0023: stloc.s V_4 + IL_0025: ldloc.3 + IL_0026: ldloc.s V_4 + IL_0028: ldarg.2 + IL_0029: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_0031: brfalse.s IL_007e - - .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.1 - IL_0034: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0039: stloc.s V_5 - IL_003b: ldloc.2 - IL_003c: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0041: stloc.s V_6 - IL_0043: ldloc.s V_5 - IL_0045: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_004a: stloc.3 - IL_004b: ldloc.s V_5 - IL_004d: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0052: stloc.s V_4 - IL_0054: ldloc.s V_6 - IL_0056: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_005b: stloc.s V_7 - IL_005d: ldloc.s V_6 - IL_005f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0064: stloc.s V_8 - .line 16707566,16707566 : 0,0 '' - IL_0066: ldloc.3 - IL_0067: ldloc.s V_7 - IL_0069: ldarg.2 - IL_006a: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_002e: brfalse.s IL_007b + + .line 16707566,16707566 : 0,0 '' + IL_0030: ldloc.1 + IL_0031: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0036: stloc.s V_5 + IL_0038: ldloc.2 + IL_0039: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_003e: stloc.s V_6 + IL_0040: ldloc.s V_5 + IL_0042: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0047: stloc.3 + IL_0048: ldloc.s V_5 + IL_004a: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_004f: stloc.s V_4 + IL_0051: ldloc.s V_6 + IL_0053: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0058: stloc.s V_7 + IL_005a: ldloc.s V_6 + IL_005c: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0061: stloc.s V_8 + .line 16707566,16707566 : 0,0 '' + IL_0063: ldloc.3 + IL_0064: ldloc.s V_7 + IL_0066: ldarg.2 + IL_0067: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_006f: brfalse.s IL_007c + IL_006c: brfalse.s IL_0079 .line 16707566,16707566 : 0,0 '' - IL_0071: ldloc.s V_4 - IL_0073: ldloc.s V_8 - IL_0075: ldarg.2 - IL_0076: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_006e: ldloc.s V_4 + IL_0070: ldloc.s V_8 + IL_0072: ldarg.2 + IL_0073: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_007b: ret + IL_0078: ret .line 16707566,16707566 : 0,0 '' - IL_007c: ldc.i4.0 - IL_007d: ret + IL_0079: ldc.i4.0 + IL_007a: ret .line 16707566,16707566 : 0,0 '' - IL_007e: ldc.i4.0 - IL_007f: ret + IL_007b: ldc.i4.0 + IL_007c: ret .line 16707566,16707566 : 0,0 '' - IL_0080: ldc.i4.0 - IL_0081: ret + IL_007d: ldc.i4.0 + IL_007e: ret .line 16707566,16707566 : 0,0 '' - IL_0082: ldarg.1 - IL_0083: ldnull - IL_0084: cgt.un - IL_0086: ldc.i4.0 - IL_0087: ceq - IL_0089: ret + IL_007f: ldarg.1 + IL_0080: ldnull + IL_0081: cgt.un + IL_0083: ldc.i4.0 + IL_0084: ceq + IL_0086: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final instance bool Equals(class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 69 (0x45) + // Code size 63 (0x3f) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003d + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_003b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0012: ldloc.1 IL_0013: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0018: ldloc.1 - IL_0019: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001e: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(class Hash12/HashMicroPerfAndCodeGenerationTests/Key) - IL_0023: brfalse.s IL_0039 + IL_0018: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(class Hash12/HashMicroPerfAndCodeGenerationTests/Key) + IL_001d: brfalse.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0025: ldloc.0 + IL_001f: ldloc.0 + IL_0020: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0025: ldloc.1 IL_0026: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_002b: ldloc.1 - IL_002c: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0031: tail. - IL_0033: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, + IL_002b: tail. + IL_002d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, !!0) - IL_0038: ret + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_003d: ldarg.1 - IL_003e: ldnull - IL_003f: cgt.un - IL_0041: ldc.i4.0 - IL_0042: ceq - IL_0044: ret + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: ldc.i4.0 + IL_003c: ceq + IL_003e: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/Inlining/Match01.il.bsl b/tests/fsharpqa/Source/Optimizations/Inlining/Match01.il.bsl index cc844fbd85e..593b363fecc 100644 --- a/tests/fsharpqa/Source/Optimizations/Inlining/Match01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/Inlining/Match01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 5:0:0:0 + .ver 6:0:0:0 } .assembly Match01 { @@ -32,13 +32,13 @@ // Offset: 0x000006F0 Length: 0x000003B7 } .module Match01.dll -// MVID: {60BE1F16-FAFE-C8E4-A745-0383161FBE60} +// MVID: {6220E4FA-FAFE-C8E4-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x09680000 +// Image base: 0x074A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -623,39 +623,33 @@ instance int32 CompareTo(class Match01/Test1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 33 (0x21) + // Code size 24 (0x18) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0017 + IL_0001: brfalse.s IL_0011 - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0015 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_000f - IL_000c: ldarg.0 - IL_000d: ldarg.1 - IL_000e: ldnull - IL_000f: call int32 Match01::CompareTo$cont@4(class Match01/Test1, + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: call int32 Match01::CompareTo$cont@4(class Match01/Test1, class Match01/Test1, class [FSharp.Core]Microsoft.FSharp.Core.Unit) - IL_0014: ret + IL_000e: ret - IL_0015: ldc.i4.1 - IL_0016: ret + IL_000f: ldc.i4.1 + IL_0010: ret - IL_0017: ldarg.1 - IL_0018: ldnull - IL_0019: cgt.un - IL_001b: brfalse.s IL_001f + IL_0011: ldarg.1 + IL_0012: brfalse.s IL_0016 - IL_001d: ldc.i4.m1 - IL_001e: ret + IL_0014: ldc.i4.m1 + IL_0015: ret - IL_001f: ldc.i4.0 - IL_0020: ret + IL_0016: ldc.i4.0 + IL_0017: ret } // end of method Test1::CompareTo .method public hidebysig virtual final @@ -676,52 +670,46 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 50 (0x32) + // Code size 41 (0x29) .maxstack 5 .locals init (class Match01/Test1 V_0) IL_0000: ldarg.1 IL_0001: unbox.any Match01/Test1 IL_0006: stloc.0 IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0023 - - IL_000d: ldarg.1 - IL_000e: unbox.any Match01/Test1 - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0021 - - IL_0018: ldarg.0 - IL_0019: ldloc.0 - IL_001a: ldnull - IL_001b: call int32 Match01::'CompareTo$cont@4-1'(class Match01/Test1, + IL_0008: brfalse.s IL_001d + + IL_000a: ldarg.1 + IL_000b: unbox.any Match01/Test1 + IL_0010: brfalse.s IL_001b + + IL_0012: ldarg.0 + IL_0013: ldloc.0 + IL_0014: ldnull + IL_0015: call int32 Match01::'CompareTo$cont@4-1'(class Match01/Test1, class Match01/Test1, class [FSharp.Core]Microsoft.FSharp.Core.Unit) - IL_0020: ret + IL_001a: ret - IL_0021: ldc.i4.1 - IL_0022: ret + IL_001b: ldc.i4.1 + IL_001c: ret - IL_0023: ldarg.1 - IL_0024: unbox.any Match01/Test1 - IL_0029: ldnull - IL_002a: cgt.un - IL_002c: brfalse.s IL_0030 + IL_001d: ldarg.1 + IL_001e: unbox.any Match01/Test1 + IL_0023: brfalse.s IL_0027 - IL_002e: ldc.i4.m1 - IL_002f: ret + IL_0025: ldc.i4.m1 + IL_0026: ret - IL_0030: ldc.i4.0 - IL_0031: ret + IL_0027: ldc.i4.0 + IL_0028: ret } // end of method Test1::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 170 (0xaa) + // Code size 167 (0xa7) .maxstack 7 .locals init (int32 V_0, class Match01/Test1/X11 V_1, @@ -729,105 +717,103 @@ class Match01/Test1/X13 V_3, class Match01/Test1/X14 V_4) IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_00a8 - - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldarg.0 - IL_000c: call instance int32 Match01/Test1::get_Tag() - IL_0011: switch ( - IL_0026, - IL_0046, - IL_0066, - IL_0086) - IL_0026: ldarg.0 - IL_0027: castclass Match01/Test1/X11 - IL_002c: stloc.1 - IL_002d: ldc.i4.0 - IL_002e: stloc.0 - IL_002f: ldc.i4 0x9e3779b9 - IL_0034: ldloc.1 - IL_0035: ldfld int32 Match01/Test1/X11::item + 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.6 - IL_003c: shl - IL_003d: ldloc.0 - IL_003e: ldc.i4.2 - IL_003f: shr - IL_0040: add - IL_0041: add - IL_0042: add - IL_0043: stloc.0 - IL_0044: ldloc.0 - IL_0045: ret - - IL_0046: ldarg.0 - IL_0047: castclass Match01/Test1/X12 - IL_004c: stloc.2 - IL_004d: ldc.i4.1 - IL_004e: stloc.0 - IL_004f: ldc.i4 0x9e3779b9 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Match01/Test1/X12::item + 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.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: ldarg.0 - IL_0067: castclass Match01/Test1/X13 - IL_006c: stloc.3 - IL_006d: ldc.i4.2 - IL_006e: stloc.0 - IL_006f: ldc.i4 0x9e3779b9 - IL_0074: ldloc.3 - IL_0075: ldfld int32 Match01/Test1/X13::item + 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.6 - IL_007c: shl - IL_007d: ldloc.0 - IL_007e: ldc.i4.2 - IL_007f: shr - IL_0080: add - IL_0081: add - IL_0082: add - IL_0083: stloc.0 - IL_0084: ldloc.0 - IL_0085: ret - - IL_0086: ldarg.0 - IL_0087: castclass Match01/Test1/X14 - IL_008c: stloc.s V_4 - IL_008e: ldc.i4.3 - IL_008f: stloc.0 - IL_0090: ldc.i4 0x9e3779b9 - IL_0095: ldloc.s V_4 - IL_0097: ldfld int32 Match01/Test1/X14::item + 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.6 - IL_009e: shl - IL_009f: ldloc.0 - IL_00a0: ldc.i4.2 - IL_00a1: shr - IL_00a2: add - IL_00a3: add - IL_00a4: add - IL_00a5: stloc.0 - IL_00a6: ldloc.0 - IL_00a7: ret - - IL_00a8: ldc.i4.0 - IL_00a9: ret + 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 } // end of method Test1::GetHashCode .method public hidebysig virtual final @@ -847,7 +833,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 212 (0xd4) + // Code size 209 (0xd1) .maxstack 4 .locals init (class Match01/Test1 V_0, int32 V_1, @@ -861,104 +847,102 @@ class Match01/Test1/X14 V_9, class Match01/Test1/X14 V_10) IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_00cc - - IL_0009: ldarg.1 - IL_000a: isinst Match01/Test1 - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: brfalse IL_00ca - - IL_0016: ldarg.0 - IL_0017: ldfld int32 Match01/Test1::_tag - IL_001c: stloc.1 - IL_001d: ldloc.0 - IL_001e: ldfld int32 Match01/Test1::_tag - IL_0023: stloc.2 - IL_0024: ldloc.1 - IL_0025: ldloc.2 - IL_0026: bne.un IL_00c8 - - IL_002b: ldarg.0 - IL_002c: call instance int32 Match01/Test1::get_Tag() - IL_0031: switch ( - IL_0046, - IL_0065, - IL_0086, - IL_00a7) - IL_0046: ldarg.0 - IL_0047: castclass Match01/Test1/X11 - IL_004c: stloc.3 - IL_004d: ldloc.0 - IL_004e: castclass Match01/Test1/X11 - IL_0053: stloc.s V_4 - IL_0055: ldloc.3 - IL_0056: ldfld int32 Match01/Test1/X11::item - IL_005b: ldloc.s V_4 - IL_005d: ldfld int32 Match01/Test1/X11::item - IL_0062: ceq - IL_0064: ret - - IL_0065: ldarg.0 - IL_0066: castclass Match01/Test1/X12 - IL_006b: stloc.s V_5 - IL_006d: ldloc.0 - IL_006e: castclass Match01/Test1/X12 - IL_0073: stloc.s V_6 - IL_0075: ldloc.s V_5 - IL_0077: ldfld int32 Match01/Test1/X12::item - IL_007c: ldloc.s V_6 - IL_007e: ldfld int32 Match01/Test1/X12::item - IL_0083: ceq - IL_0085: ret - - IL_0086: ldarg.0 - IL_0087: castclass Match01/Test1/X13 - IL_008c: stloc.s V_7 - IL_008e: ldloc.0 - IL_008f: castclass Match01/Test1/X13 - IL_0094: stloc.s V_8 - IL_0096: ldloc.s V_7 - IL_0098: ldfld int32 Match01/Test1/X13::item - IL_009d: ldloc.s V_8 - IL_009f: ldfld int32 Match01/Test1/X13::item - IL_00a4: ceq - IL_00a6: ret + IL_0001: brfalse IL_00c9 - IL_00a7: ldarg.0 - IL_00a8: castclass Match01/Test1/X14 - IL_00ad: stloc.s V_9 - IL_00af: ldloc.0 - IL_00b0: castclass Match01/Test1/X14 - IL_00b5: stloc.s V_10 - IL_00b7: ldloc.s V_9 - IL_00b9: ldfld int32 Match01/Test1/X14::item - IL_00be: ldloc.s V_10 - IL_00c0: ldfld int32 Match01/Test1/X14::item - IL_00c5: ceq - IL_00c7: ret - - IL_00c8: ldc.i4.0 - IL_00c9: ret - - IL_00ca: ldc.i4.0 - IL_00cb: ret - - IL_00cc: ldarg.1 - IL_00cd: ldnull - IL_00ce: cgt.un - IL_00d0: ldc.i4.0 - IL_00d1: ceq - IL_00d3: ret + IL_0006: ldarg.1 + IL_0007: isinst Match01/Test1 + IL_000c: stloc.0 + IL_000d: ldloc.0 + IL_000e: brfalse IL_00c7 + + IL_0013: ldarg.0 + IL_0014: ldfld int32 Match01/Test1::_tag + IL_0019: stloc.1 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Match01/Test1::_tag + IL_0020: stloc.2 + IL_0021: ldloc.1 + IL_0022: ldloc.2 + IL_0023: bne.un IL_00c5 + + IL_0028: ldarg.0 + IL_0029: call instance int32 Match01/Test1::get_Tag() + IL_002e: switch ( + IL_0043, + IL_0062, + IL_0083, + IL_00a4) + IL_0043: ldarg.0 + IL_0044: castclass Match01/Test1/X11 + IL_0049: stloc.3 + IL_004a: ldloc.0 + IL_004b: castclass Match01/Test1/X11 + IL_0050: stloc.s V_4 + IL_0052: ldloc.3 + IL_0053: ldfld int32 Match01/Test1/X11::item + IL_0058: ldloc.s V_4 + IL_005a: ldfld int32 Match01/Test1/X11::item + IL_005f: ceq + IL_0061: ret + + IL_0062: ldarg.0 + IL_0063: castclass Match01/Test1/X12 + IL_0068: stloc.s V_5 + IL_006a: ldloc.0 + IL_006b: castclass Match01/Test1/X12 + IL_0070: stloc.s V_6 + IL_0072: ldloc.s V_5 + IL_0074: ldfld int32 Match01/Test1/X12::item + IL_0079: ldloc.s V_6 + IL_007b: ldfld int32 Match01/Test1/X12::item + IL_0080: ceq + IL_0082: ret + + IL_0083: ldarg.0 + IL_0084: castclass Match01/Test1/X13 + IL_0089: stloc.s V_7 + IL_008b: ldloc.0 + IL_008c: castclass Match01/Test1/X13 + IL_0091: stloc.s V_8 + IL_0093: ldloc.s V_7 + IL_0095: ldfld int32 Match01/Test1/X13::item + IL_009a: ldloc.s V_8 + IL_009c: ldfld int32 Match01/Test1/X13::item + IL_00a1: ceq + IL_00a3: ret + + IL_00a4: ldarg.0 + IL_00a5: castclass Match01/Test1/X14 + IL_00aa: stloc.s V_9 + IL_00ac: ldloc.0 + IL_00ad: castclass Match01/Test1/X14 + IL_00b2: stloc.s V_10 + IL_00b4: ldloc.s V_9 + IL_00b6: ldfld int32 Match01/Test1/X14::item + IL_00bb: ldloc.s V_10 + IL_00bd: ldfld int32 Match01/Test1/X14::item + IL_00c2: ceq + IL_00c4: ret + + IL_00c5: ldc.i4.0 + IL_00c6: ret + + IL_00c7: ldc.i4.0 + IL_00c8: ret + + IL_00c9: ldarg.1 + IL_00ca: ldnull + IL_00cb: cgt.un + IL_00cd: ldc.i4.0 + IL_00ce: ceq + IL_00d0: ret } // end of method Test1::Equals .method public hidebysig virtual final instance bool Equals(class Match01/Test1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 206 (0xce) + // Code size 200 (0xc8) .maxstack 4 .locals init (int32 V_0, int32 V_1, @@ -971,96 +955,92 @@ class Match01/Test1/X14 V_8, class Match01/Test1/X14 V_9) IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_00c6 + IL_0001: brfalse IL_00c0 - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse IL_00c4 + IL_0006: ldarg.1 + IL_0007: brfalse IL_00be - IL_0012: ldarg.0 - IL_0013: ldfld int32 Match01/Test1::_tag - IL_0018: stloc.0 - IL_0019: ldarg.1 - IL_001a: ldfld int32 Match01/Test1::_tag - IL_001f: stloc.1 - IL_0020: ldloc.0 - IL_0021: ldloc.1 - IL_0022: bne.un IL_00c2 - - IL_0027: ldarg.0 - IL_0028: call instance int32 Match01/Test1::get_Tag() - IL_002d: switch ( - IL_0042, - IL_005f, - IL_0080, - IL_00a1) - IL_0042: ldarg.0 - IL_0043: castclass Match01/Test1/X11 - IL_0048: stloc.2 - IL_0049: ldarg.1 - IL_004a: castclass Match01/Test1/X11 - IL_004f: stloc.3 - IL_0050: ldloc.2 + IL_000c: ldarg.0 + IL_000d: ldfld int32 Match01/Test1::_tag + IL_0012: stloc.0 + IL_0013: ldarg.1 + IL_0014: ldfld int32 Match01/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_0027: switch ( + IL_003c, + IL_0059, + IL_007a, + IL_009b) + IL_003c: ldarg.0 + IL_003d: castclass Match01/Test1/X11 + IL_0042: stloc.2 + IL_0043: ldarg.1 + IL_0044: castclass Match01/Test1/X11 + IL_0049: stloc.3 + IL_004a: ldloc.2 + IL_004b: ldfld int32 Match01/Test1/X11::item + IL_0050: ldloc.3 IL_0051: ldfld int32 Match01/Test1/X11::item - IL_0056: ldloc.3 - IL_0057: ldfld int32 Match01/Test1/X11::item - IL_005c: ceq - IL_005e: ret - - IL_005f: ldarg.0 - IL_0060: castclass Match01/Test1/X12 - IL_0065: stloc.s V_4 - IL_0067: ldarg.1 - IL_0068: castclass Match01/Test1/X12 - IL_006d: stloc.s V_5 - IL_006f: ldloc.s V_4 - IL_0071: ldfld int32 Match01/Test1/X12::item - IL_0076: ldloc.s V_5 - IL_0078: ldfld int32 Match01/Test1/X12::item - IL_007d: ceq - IL_007f: ret - - IL_0080: ldarg.0 - IL_0081: castclass Match01/Test1/X13 - IL_0086: stloc.s V_6 - IL_0088: ldarg.1 - IL_0089: castclass Match01/Test1/X13 - IL_008e: stloc.s V_7 - IL_0090: ldloc.s V_6 - IL_0092: ldfld int32 Match01/Test1/X13::item - IL_0097: ldloc.s V_7 - IL_0099: ldfld int32 Match01/Test1/X13::item - IL_009e: ceq - IL_00a0: ret - - IL_00a1: ldarg.0 - IL_00a2: castclass Match01/Test1/X14 - IL_00a7: stloc.s V_8 - IL_00a9: ldarg.1 - IL_00aa: castclass Match01/Test1/X14 - IL_00af: stloc.s V_9 - IL_00b1: ldloc.s V_8 - IL_00b3: ldfld int32 Match01/Test1/X14::item - IL_00b8: ldloc.s V_9 - IL_00ba: ldfld int32 Match01/Test1/X14::item - IL_00bf: ceq - IL_00c1: ret - - IL_00c2: ldc.i4.0 - IL_00c3: ret - + IL_0056: ceq + IL_0058: ret + + IL_0059: ldarg.0 + IL_005a: castclass Match01/Test1/X12 + IL_005f: stloc.s V_4 + IL_0061: ldarg.1 + IL_0062: castclass Match01/Test1/X12 + IL_0067: stloc.s V_5 + IL_0069: ldloc.s V_4 + IL_006b: ldfld int32 Match01/Test1/X12::item + IL_0070: ldloc.s V_5 + IL_0072: ldfld int32 Match01/Test1/X12::item + IL_0077: ceq + IL_0079: ret + + IL_007a: ldarg.0 + IL_007b: castclass Match01/Test1/X13 + IL_0080: stloc.s V_6 + IL_0082: ldarg.1 + IL_0083: castclass Match01/Test1/X13 + IL_0088: stloc.s V_7 + IL_008a: ldloc.s V_6 + IL_008c: ldfld int32 Match01/Test1/X13::item + IL_0091: ldloc.s V_7 + IL_0093: ldfld int32 Match01/Test1/X13::item + IL_0098: ceq + IL_009a: ret + + IL_009b: ldarg.0 + IL_009c: castclass Match01/Test1/X14 + IL_00a1: stloc.s V_8 + IL_00a3: ldarg.1 + IL_00a4: castclass Match01/Test1/X14 + IL_00a9: stloc.s V_9 + IL_00ab: ldloc.s V_8 + IL_00ad: ldfld int32 Match01/Test1/X14::item + IL_00b2: ldloc.s V_9 + IL_00b4: ldfld int32 Match01/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: ret - - IL_00c6: ldarg.1 - IL_00c7: ldnull - IL_00c8: cgt.un - IL_00ca: ldc.i4.0 - IL_00cb: ceq - IL_00cd: ret + IL_00c5: ceq + IL_00c7: ret } // end of method Test1::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl b/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl index 32e3a02a228..462de29a875 100644 --- a/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 5:0:0:0 + .ver 6:0:0:0 } .assembly StructUnion01 { @@ -32,13 +32,13 @@ // Offset: 0x00000880 Length: 0x00000421 } .module StructUnion01.dll -// MVID: {60BE1F16-D3E9-6B24-A745-0383161FBE60} +// MVID: {6220E4FA-D3E9-6B24-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x065C0000 +// Image base: 0x072B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -374,38 +374,36 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 54 (0x36) + // Code size 52 (0x34) .maxstack 4 .locals init (valuetype StructUnion01/U V_0) IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a + IL_0001: isinst StructUnion01/U + IL_0006: brfalse.s IL_0032 - IL_0008: br.s IL_0034 - - IL_000a: ldarg.1 - IL_000b: unbox.any StructUnion01/U - IL_0010: stloc.0 + IL_0008: ldarg.1 + IL_0009: unbox.any StructUnion01/U + IL_000e: stloc.0 + IL_000f: ldarg.0 + IL_0010: pop IL_0011: ldarg.0 - IL_0012: pop - IL_0013: ldarg.0 - IL_0014: ldfld int32 StructUnion01/U::item1 - IL_0019: ldloca.s V_0 - IL_001b: ldfld int32 StructUnion01/U::item1 - IL_0020: bne.un.s IL_0032 - - IL_0022: ldarg.0 - IL_0023: ldfld int32 StructUnion01/U::item2 - IL_0028: ldloca.s V_0 - IL_002a: ldfld int32 StructUnion01/U::item2 - IL_002f: ceq + IL_0012: ldfld int32 StructUnion01/U::item1 + IL_0017: ldloca.s V_0 + IL_0019: ldfld int32 StructUnion01/U::item1 + IL_001e: bne.un.s IL_0030 + + IL_0020: ldarg.0 + IL_0021: ldfld int32 StructUnion01/U::item2 + IL_0026: ldloca.s V_0 + IL_0028: ldfld int32 StructUnion01/U::item2 + IL_002d: ceq + IL_002f: ret + + IL_0030: ldc.i4.0 IL_0031: ret IL_0032: ldc.i4.0 IL_0033: ret - - IL_0034: ldc.i4.0 - IL_0035: ret } // end of method U::Equals .method public hidebysig virtual final @@ -437,22 +435,20 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 25 (0x19) + // Code size 23 (0x17) .maxstack 8 IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a + IL_0001: isinst StructUnion01/U + IL_0006: brfalse.s IL_0015 - IL_0008: br.s IL_0017 + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: unbox.any StructUnion01/U + IL_000f: call instance bool StructUnion01/U::Equals(valuetype StructUnion01/U) + IL_0014: ret - IL_000a: ldarg.0 - IL_000b: ldarg.1 - IL_000c: unbox.any StructUnion01/U - IL_0011: call instance bool StructUnion01/U::Equals(valuetype StructUnion01/U) + IL_0015: ldc.i4.0 IL_0016: ret - - IL_0017: ldc.i4.0 - IL_0018: ret } // end of method U::Equals .property instance int32 Tag() diff --git a/tests/service/data/TestTP/ProvidedTypes.fs b/tests/service/data/TestTP/ProvidedTypes.fs index 878ef8ba0df..ec255740cf2 100644 --- a/tests/service/data/TestTP/ProvidedTypes.fs +++ b/tests/service/data/TestTP/ProvidedTypes.fs @@ -552,8 +552,6 @@ module UncheckedQuotations = ShapeCombinationUnchecked (Shape (function [cond; body] -> Expr.WhileLoopUnchecked (cond, body) | _ -> invalidArg "expr" "invalid shape"), [cond; body]) | IfThenElse (g, t, e) -> ShapeCombinationUnchecked (Shape (function [g; t; e] -> Expr.IfThenElseUnchecked (g, t, e) | _ -> invalidArg "expr" "invalid shape"), [g; t; e]) - | TupleGet (expr, i) -> - ShapeCombinationUnchecked (Shape (function [expr] -> Expr.TupleGetUnchecked (expr, i) | _ -> invalidArg "expr" "invalid shape"), [expr]) | ExprShape.ShapeCombination (comb, args) -> ShapeCombinationUnchecked (Shape (fun args -> ExprShape.RebuildShapeCombination(comb, args)), args) | ExprShape.ShapeVar v -> ShapeVarUnchecked v @@ -6519,8 +6517,8 @@ module internal AssemblyReader = // mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" // // Note that - // • Since we're only reading valid IL, we assume that the signature is properly formed - // • For type parameters, if the type is non-local, it will be wrapped in brackets ([]) + // � Since we're only reading valid IL, we assume that the signature is properly formed + // � For type parameters, if the type is non-local, it will be wrapped in brackets ([]) member x.ParseType() = // Does the type name start with a leading '['? If so, ignore it @@ -10258,7 +10256,6 @@ namespace ProviderImplementation.ProvidedTypes bb.EmitByte (if req then et_CMOD_REQD else et_CMOD_OPT) emitTypeInfoAsTypeDefOrRefEncoded cenv bb (tref.Scope, tref.Namespace, tref.Name) EmitType cenv env bb ty - | _ -> failwith "EmitType" and EmitLocalInfo cenv env (bb:ByteBuffer) (l:ILLocal) = if l.IsPinned then diff --git a/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fs b/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fs index d0921f566e4..87660d2542c 100644 --- a/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fs +++ b/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fs @@ -469,8 +469,6 @@ namespace ProviderImplementation.ProvidedTypes ShapeCombinationUnchecked (Shape (function [cond; body] -> Expr.WhileLoopUnchecked (cond, body) | _ -> invalidArg "expr" "invalid shape"), [cond; body]) | IfThenElse (g, t, e) -> ShapeCombinationUnchecked (Shape (function [g; t; e] -> Expr.IfThenElseUnchecked (g, t, e) | _ -> invalidArg "expr" "invalid shape"), [g; t; e]) - | TupleGet (expr, i) -> - ShapeCombinationUnchecked (Shape (function [expr] -> Expr.TupleGetUnchecked (expr, i) | _ -> invalidArg "expr" "invalid shape"), [expr]) | ExprShape.ShapeCombination (comb,args) -> ShapeCombinationUnchecked (Shape (fun args -> ExprShape.RebuildShapeCombination(comb, args)), args) | ExprShape.ShapeVar v -> ShapeVarUnchecked v @@ -9799,7 +9797,6 @@ namespace ProviderImplementation.ProvidedTypes bb.EmitByte (if req then et_CMOD_REQD else et_CMOD_OPT) emitTypeInfoAsTypeDefOrRefEncoded cenv bb (tref.Scope, tref.Namespace, tref.Name) EmitType cenv env bb ty - | _ -> failwith "EmitType" and EmitLocalInfo cenv env (bb:ByteBuffer) (l:ILLocal) = if l.IsPinned then