Skip to content

Commit

Permalink
Fix typo & make the code leaner (dotnet/coreclr#25442)
Browse files Browse the repository at this point in the history
Enum.HasFlag generates bigger IL and depends on complex JIT optimization for a good code.
The classic bit check is strongly preferred accross CoreCLR and CoreFX.

Signed-off-by: dotnet-bot <[email protected]>
  • Loading branch information
jkotas committed Jun 27, 2019
1 parent 08977c9 commit bf0c913
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,11 @@ private static bool ShowInStackTrace(MethodBase mb)
{
Debug.Assert(mb != null);

if (mb.MethodImplementationFlags.HasFlag(MethodImplAttributes.AggressiveInlining))
if ((mb.MethodImplementationFlags & MethodImplAttributes.AggressiveInlining) != 0)
{
// Aggressive Inlines won't normally show in the StackTrace; however for Tier0 Jit and
// cross-assembly AoT/R2R these inlines will be blocked until Tier1 Jit re-Jits
// them when they will inline. We don't show them in the StackTrace to bring consitency
// them when they will inline. We don't show them in the StackTrace to bring consistency
// between this first-pass asm and fully optimized asm.
return false;
}
Expand Down

0 comments on commit bf0c913

Please sign in to comment.