[Mono-bugs] [Bug 76784][Wis] Changed - mjs miscompile switch statement which contains an assigment as expression.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Feb 28 09:47:23 EST 2007


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 peter.dettman at iinet.net.au.

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

--- shadow/76784	2007-02-28 09:37:27.000000000 -0500
+++ shadow/76784.tmp.18580	2007-02-28 09:47:23.000000000 -0500
@@ -10,13 +10,12 @@
 Component: JScript
 AssignedTo: cesar at ciencias.unam.mx                            
 ReportedBy: cnataren at novell.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
-Cc: 
 Summary: mjs miscompile switch statement which contains an assigment as expression.
 
 Description of Problem:
 
 mjs does not handle properly assignment expression inside a switch
 statement expression. 
@@ -60,6 +59,27 @@
 This bug breaks js1_2/statements/switch2.js
 
 ------- Additional Comments From peter.dettman at iinet.net.au  2007-02-28 09:37 -------
 Created an attachment (id=18794)
 Proposed patch
 
+
+------- Additional Comments From peter.dettman at iinet.net.au  2007-02-28 09:47 -------
+I have attached a proposed patch which fixes this issue and generally
+improves the handling of "expression statements".
+
+The primary fix was to Expression.Emit to correctly leave a value on
+the stack or not according to the "no_effect" field, including when
+the final AST in the list is an assignment (making use of
+CodeGenerator.EmitAssignAndReturnBuilder).
+
+Several other classes needed to be fixed to pass the correct
+"no_effect" value to child expressions.
+
+This fixes the IL for several of the 'Mozilla' test cases, and the
+patch modifies the test lists accordingly. I have run a full
+regression to verify that the patch doesn't break anything.
+
+Note: js1_2/statements/switch2.js still fails, but later on in the IL.
+
+
+


More information about the mono-bugs mailing list