@ -150,7 +150,7 @@
CustomClassName("LdFld"), CustomArguments("target"), MemoryAccess, SupportsVolatilePrefix, SupportsUnalignedPrefix, MayThrow,
CustomClassName("LdFld"), CustomArguments("target"), MemoryAccess, SupportsVolatilePrefix, SupportsUnalignedPrefix, MayThrow,
HasFieldOperand, ResultType("field.Type.GetStackType()")),
HasFieldOperand, ResultType("field.Type.GetStackType()")),
new OpCode("ldflda", "Load address of instance field",
new OpCode("ldflda", "Load address of instance field",
CustomClassName("LdFlda"), CustomArguments("target"), MayThrow, HasFieldOperand, ResultType("Ref")),
CustomClassName("LdFlda"), CustomArguments("target"), MayThrowIfNotDelayed , HasFieldOperand, ResultType("Ref")),
new OpCode("stfld", "Store value to instance field",
new OpCode("stfld", "Store value to instance field",
CustomClassName("StFld"), CustomArguments("target", "value"),
CustomClassName("StFld"), CustomArguments("target", "value"),
MemoryAccess, SupportsVolatilePrefix, SupportsUnalignedPrefix, MayThrow, HasFieldOperand,
MemoryAccess, SupportsVolatilePrefix, SupportsUnalignedPrefix, MayThrow, HasFieldOperand,
@ -199,7 +199,7 @@
CustomClassName("LdLen"), CustomArguments("array"), CustomConstructor, CustomWriteTo, MayThrow),
CustomClassName("LdLen"), CustomArguments("array"), CustomConstructor, CustomWriteTo, MayThrow),
new OpCode("ldelema", "Load address of array element.",
new OpCode("ldelema", "Load address of array element.",
CustomClassName("LdElema"), HasTypeOperand, CustomChildren(new [] { new ArgumentInfo("array"), new ArgumentInfo("indices") { IsCollection = true } }, true),
CustomClassName("LdElema"), HasTypeOperand, CustomChildren(new [] { new ArgumentInfo("array"), new ArgumentInfo("indices") { IsCollection = true } }, true),
MayThrow, ResultType("Ref"), SupportsReadonlyPrefix),
MayThrowIfNotDelayed , ResultType("Ref"), SupportsReadonlyPrefix),
new OpCode("array.to.pointer", "Converts an array pointer (O) to a reference to the first element, or to a null reference if the array is null or empty." + Environment.NewLine
new OpCode("array.to.pointer", "Converts an array pointer (O) to a reference to the first element, or to a null reference if the array is null or empty." + Environment.NewLine
+ "Also used to convert a string to a reference to the first character.",
+ "Also used to convert a string to a reference to the first character.",
CustomArguments("array"), ResultType("Ref")),
CustomArguments("array"), ResultType("Ref")),
@ -534,6 +534,10 @@ namespace ICSharpCode.Decompiler.IL
// Instructions without this trait must evaluate all arguments left-to-right before having any effect of their own.
// Instructions without this trait must evaluate all arguments left-to-right before having any effect of their own.
static Action<OpCode> ControlFlow = HasFlag("InstructionFlags.ControlFlow");
static Action<OpCode> ControlFlow = HasFlag("InstructionFlags.ControlFlow");
static Action<OpCode> MayThrowIfNotDelayed = HasFlag("(DelayExceptions ? InstructionFlags.None : InstructionFlags.MayThrow)") + (opCode => {
opCode.Members.Add("public bool DelayExceptions;");
});
static Action<OpCode> BaseClass(string name)
static Action<OpCode> BaseClass(string name)
{
{
return opCode => {
return opCode => {