[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-bugs
Subject:    [Mono-bugs] [Bug 76784][Wis] Changed - mjs miscompile switch
From:       bugzilla-daemon () bugzilla ! ximian ! com
Date:       2007-02-28 13:09:44
Message-ID: 20070228144723.C5E1A1AE50F () bugzilla ! ximian ! com
[Download RAW message or body]

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@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@ciencias.unam.mx                            
 ReportedBy: cnataren@novell.com               
 QAContact: mono-bugs@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@iinet.net.au  2007-02-28 09:37 -------
 Created an attachment (id=18794)
 Proposed patch
 
+
+------- Additional Comments From peter.dettman@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.
+
+
+
_______________________________________________
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic