mirror of
https://github.com/dnSpy/dnSpy.git
synced 2025-01-09 04:17:29 +08:00
Support AggressiveOptimization bit
This commit is contained in:
parent
f356505355
commit
656049809b
@ -1 +1 @@
|
||||
Subproject commit 71fcd34ad491803c0a8a657e8ce478308b03b0fb
|
||||
Subproject commit 8606c383d73c4159f8dc409d458c733cbeb654d7
|
@ -547,6 +547,7 @@ namespace dnSpy.AsmEditor.Hex.PE {
|
||||
field.Add(new BooleanHexBitField("NoOptimization", 6));
|
||||
field.Add(new BooleanHexBitField("PreserveSig", 7));
|
||||
field.Add(new BooleanHexBitField("AggressiveInlining", 8));
|
||||
field.Add(new BooleanHexBitField("AggressiveOptimization", 9));
|
||||
field.Add(new BooleanHexBitField("InternalCall", 12));
|
||||
return field;
|
||||
}
|
||||
|
@ -83,6 +83,7 @@
|
||||
<CheckBox Grid.Row="1" Grid.Column="1" Margin="5 5 0 0" IsChecked="{Binding NoInlining}" Content="{x:Static p:dnSpy_AsmEditor_Resources.Method_ImplFlags_NoInlining}" />
|
||||
<CheckBox Grid.Row="1" Grid.Column="2" Margin="5 5 0 0" IsChecked="{Binding AggressiveInlining}" Content="{x:Static p:dnSpy_AsmEditor_Resources.Method_ImplFlags_AggressiveInlining}" />
|
||||
<CheckBox Grid.Row="2" Grid.Column="0" Margin="0 5 0 0" IsChecked="{Binding NoOptimization}" Content="{x:Static p:dnSpy_AsmEditor_Resources.Method_ImplFlags_NoOptimization}" />
|
||||
<CheckBox Grid.Row="2" Grid.Column="1" Margin="5 5 0 0" IsChecked="{Binding AggressiveOptimization}" Content="AggressiveOptimization" />
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
|
@ -139,6 +139,11 @@ namespace dnSpy.AsmEditor.Method {
|
||||
set => SetFlagValue(MethodImplAttributes.NoOptimization, value);
|
||||
}
|
||||
|
||||
public bool AggressiveOptimization {
|
||||
get => GetFlagValue(MethodImplAttributes.AggressiveOptimization);
|
||||
set => SetFlagValue(MethodImplAttributes.AggressiveOptimization, value);
|
||||
}
|
||||
|
||||
bool GetFlagValue(MethodImplAttributes flag) => (ImplAttributes & flag) != 0;
|
||||
|
||||
void SetFlagValue(MethodImplAttributes flag, bool value) {
|
||||
|
@ -101,6 +101,7 @@ namespace dnSpy.Debugger.DotNet.Metadata {
|
||||
public bool IsNoInlining => (MethodImplementationFlags & DmdMethodImplAttributes.NoInlining) != 0;
|
||||
public bool IsAggressiveInlining => (MethodImplementationFlags & DmdMethodImplAttributes.AggressiveInlining) != 0;
|
||||
public bool IsNoOptimization => (MethodImplementationFlags & DmdMethodImplAttributes.NoOptimization) != 0;
|
||||
public bool IsAggressiveOptimization => (MethodImplementationFlags & DmdMethodImplAttributes.AggressiveOptimization) != 0;
|
||||
|
||||
public bool IsPublic => (Attributes & DmdMethodAttributes.MemberAccessMask) == DmdMethodAttributes.Public;
|
||||
public bool IsPrivate => (Attributes & DmdMethodAttributes.MemberAccessMask) == DmdMethodAttributes.Private;
|
||||
|
@ -26,21 +26,22 @@ namespace dnSpy.Debugger.DotNet.Metadata {
|
||||
[Flags]
|
||||
public enum DmdMethodImplAttributes : ushort {
|
||||
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
|
||||
CodeTypeMask = 0x0003,
|
||||
IL = 0x0000,
|
||||
Native = 0x0001,
|
||||
OPTIL = 0x0002,
|
||||
Runtime = 0x0003,
|
||||
ManagedMask = 0x0004,
|
||||
Unmanaged = 0x0004,
|
||||
Managed = 0x0000,
|
||||
ForwardRef = 0x0010,
|
||||
PreserveSig = 0x0080,
|
||||
InternalCall = 0x1000,
|
||||
Synchronized = 0x0020,
|
||||
NoInlining = 0x0008,
|
||||
AggressiveInlining = 0x0100,
|
||||
NoOptimization = 0x0040,
|
||||
CodeTypeMask = 0x0003,
|
||||
IL = 0x0000,
|
||||
Native = 0x0001,
|
||||
OPTIL = 0x0002,
|
||||
Runtime = 0x0003,
|
||||
ManagedMask = 0x0004,
|
||||
Unmanaged = 0x0004,
|
||||
Managed = 0x0000,
|
||||
ForwardRef = 0x0010,
|
||||
PreserveSig = 0x0080,
|
||||
InternalCall = 0x1000,
|
||||
Synchronized = 0x0020,
|
||||
NoInlining = 0x0008,
|
||||
AggressiveInlining = 0x0100,
|
||||
NoOptimization = 0x0040,
|
||||
AggressiveOptimization = 0x0200,
|
||||
#pragma warning restore 1591 // Missing XML comment for publicly visible type or member
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 3dc4caa43ef37a29e0260d0d0fa961a7a0a785e8
|
||||
Subproject commit 4fbb11e6dc762dc26788c1d999cb585038e2b83e
|
Loading…
Reference in New Issue
Block a user