[Mono-bugs] [Bug 33068][Wis] Changed - MCS should not use temporaries for x++

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
5 Nov 2002 20:09:06 -0000


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 miguel@ximian.com.

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

--- shadow/33068	Wed Oct 30 15:50:34 2002
+++ shadow/33068.tmp.26065	Tue Nov  5 15:09:06 2002
@@ -2,13 +2,13 @@
 Product: Mono/MCS
 Version: unspecified
 OS: other
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: Misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: miguel@ximian.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -18,6 +18,26 @@
 
 We use too many temporaries for doing things like:
 
 int i = 0;
 
 i++;
+
+------- Additional Comments From miguel@ximian.com  2002-11-05 15:09 -------
+More details.  Although I have done some work to support this, I never
+got a chance to take a look at the big picture.
+
+The further I have gone to is to implement an IStack interface that
+fields, parameters and locals would implement.   The interface
+provides a `compute address', `loadvaluefromaddress' and
+`storevaluetoaddress'.
+
+But there is a big problem with this design: for cases like:
+
+    a = x++
+
+The value of x needs to be stored into a, which would require a large
+number of changes in the compiler to make it work.
+
+So instead of using a nice and tuned dup/dup pair, I think I will
+reload the address when required.  Not as good as csc, but the JIT
+should be able to optimize this.