[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 10:51:34 -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 lupus@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=61800

--- shadow/61800	2004-07-21 16:21:38.000000000 -0400
+++ shadow/61800.tmp.2708	2004-07-26 10:51:34.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 61800
 Product: Mono: Class Libraries
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: CORLIB
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: duncan@ximian.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -47,6 +47,22 @@
 means I need to go rearrange all the opcode index.
 
 ------- Additional Comments From duncan@ximian.com  2004-07-21 16:21 -------
 Created an attachment (id=8659)
 Patch for OpCode.cs and OpCodes.cs (plus 1 new file)
 
+
+------- Additional Comments From lupus@ximian.com  2004-07-26 10:51 -------
+Please make the index value the same as the opcode for 1 byte opcodes
+and 256+op2 for the others (you'll need to handle a few currently
+unassigned values).
+Since the index can be a short, you could have two bytes more in the
+struct to cache common fields, like op1 and size (and remove them from
+the array, too): they are trivially computed from the index value in
+the ctor.
+You should also make the arrays readonly.
+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.
+Thanks.
+