[Mono-bugs] [Bug 61800][Wis] Changed - [PATCH] Reduce initialization code in System.Reflection.Emit.OpCode
Tue, 27 Jul 2004 12:40:10 -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 email@example.com.
--- shadow/61800 2004-07-26 17:03:58.000000000 -0400
+++ shadow/61800.tmp.26945 2004-07-27 12:40:10.000000000 -0400
@@ -79,6 +79,21 @@
- 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
+------- Additional Comments From firstname.lastname@example.org 2004-07-27 12:40 -------
+push/pop cannot be combined in a single byte.
+A combined proposal could be:
+the ctor takes a single int which is op1, op2, push and pop in each
+byte and the ctor will set those fields (which should be readonly).
+The other four fields can go into an array (so mult by 4 can be
+optimized to a shift). As an alternative, the 4 fields could
+themselves be put in another int, so the ctor would take the two ints and
+set the proper fields. This would make for a 8 byte opcode struct
+which is fine and the generated code should remain small and there is
+no need for the byte array anymore. If we have a script that generates
+the code, we could experiment with the two options to measure and see
+the tradeoffs (the less used fields could be stored as an int, to
+reduce the time spen in the ctor if it turns out to be an issue).