[Mono-bugs] [Bug 61800][Wis] Changed - [PATCH] Reduce initialization code in System.Reflection.Emit.OpCode

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 26 Jul 2004 17:03:58 -0400 (EDT)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bmaurer@users.sf.net.


--- shadow/61800	2004-07-26 10:51:34.000000000 -0400
+++ shadow/61800.tmp.8182	2004-07-26 17:03:58.000000000 -0400
@@ -63,6 +63,22 @@
 Please use a OpCodeIndex.Last value instead of the magic 8 value (I
 would also drop the get method since it's used in so few places and
 it's so small.
 We also need the script used to generate the code in cvs.
+------- Additional Comments From bmaurer@users.sf.net  2004-07-26 17:03 -------
+Some additional thoughts about lupus' comments:
+- If you make the index values easily computateable from op1 and op2,
+there is no need to store the index value. So, you could make the
+first two bytes be op1 and op2
+- The push and pop behaviors can be combined into one byte (look at
+the enumeration -- the push behavior occupies seperate bits than the
+pop behavior)
+- Since you have one byte left, you can inline OperandType into the struct
+- if you inline these items, the ILGenerator can do all of its
+operations without indexing the array