projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #901 from Blewzman/FixAggregateExceptionGetBaseException
[mono.git]
/
mcs
/
class
/
corlib
/
System.Reflection.Emit
/
OpCode.cs
diff --git
a/mcs/class/corlib/System.Reflection.Emit/OpCode.cs
b/mcs/class/corlib/System.Reflection.Emit/OpCode.cs
index b0755484185bddc6e2a2dcc830b535b45dfba42b..e6cdf10b73785b36f1489c055c1de78dbf98cab8 100644
(file)
--- a/
mcs/class/corlib/System.Reflection.Emit/OpCode.cs
+++ b/
mcs/class/corlib/System.Reflection.Emit/OpCode.cs
@@
-26,12
+26,13
@@
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
-using System;
-using System.Reflection;
-using System.R
eflection.Emit
;
+#if !FULL_AOT_RUNTIME || IOS_REFLECTION
+
+using System.R
untime.InteropServices
;
namespace System.Reflection.Emit {
namespace System.Reflection.Emit {
+ [ComVisible (true)]
public struct OpCode {
internal byte op1, op2;
public struct OpCode {
internal byte op1, op2;
@@
-59,7
+60,7
@@
namespace System.Reflection.Emit {
public override int GetHashCode ()
{
public override int GetHashCode ()
{
- return
Value
;
+ return
Name.GetHashCode ()
;
}
public override bool Equals (Object obj)
}
public override bool Equals (Object obj)
@@
-72,6
+73,11
@@
namespace System.Reflection.Emit {
return v.op1 == op1 && v.op2 == op2;
}
return v.op1 == op1 && v.op2 == op2;
}
+ public bool Equals (OpCode obj)
+ {
+ return obj.op1 == op1 && obj.op2 == op2;
+ }
+
public override string ToString ()
{
return Name;
public override string ToString ()
{
return Name;
@@
-133,5
+139,16
@@
namespace System.Reflection.Emit {
}
}
}
}
}
}
+
+ public static bool operator == (OpCode a, OpCode b)
+ {
+ return a.op1 == b.op1 && a.op2 == b.op2;
+ }
+
+ public static bool operator != (OpCode a, OpCode b)
+ {
+ return a.op1 != b.op1 || a.op2 != b.op2;
+ }
}
}
}
}
+#endif