diff options
author | Jan Kotas <jkotas@microsoft.com> | 2019-06-26 18:25:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-26 18:25:21 -0700 |
commit | 2e6510fd823cd8eb4f223199feed9a46ee6f2feb (patch) | |
tree | 3c0d90a9a337d25a756863f1b54a9aaa74890ffc /src/System.Private.CoreLib/shared | |
parent | 928e6c8b16e1fb3653533eedd09b446c3ad3d668 (diff) | |
download | coreclr-2e6510fd823cd8eb4f223199feed9a46ee6f2feb.tar.gz coreclr-2e6510fd823cd8eb4f223199feed9a46ee6f2feb.tar.bz2 coreclr-2e6510fd823cd8eb4f223199feed9a46ee6f2feb.zip |
Fix typo & make the code leaner (#25442)
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.
Diffstat (limited to 'src/System.Private.CoreLib/shared')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Diagnostics/StackTrace.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Diagnostics/StackTrace.cs b/src/System.Private.CoreLib/shared/System/Diagnostics/StackTrace.cs index 3855a5c6de..5291c49fb5 100644 --- a/src/System.Private.CoreLib/shared/System/Diagnostics/StackTrace.cs +++ b/src/System.Private.CoreLib/shared/System/Diagnostics/StackTrace.cs @@ -340,11 +340,11 @@ namespace System.Diagnostics { 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; } |