[Mono-bugs] [Bug 76367][Wis] New - mjs does not generate CallValue invocation when eval used inside methods.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Oct 8 03:24:03 EDT 2005


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 cnataren at novell.com.

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

--- shadow/76367	2005-10-08 03:24:03.000000000 -0400
+++ shadow/76367.tmp.687	2005-10-08 03:24:03.000000000 -0400
@@ -0,0 +1,60 @@
+Bug#: 76367
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: JScript
+AssignedTo: cesar at ciencias.unam.mx                            
+ReportedBy: cnataren at novell.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mjs does not generate CallValue invocation when eval used inside methods.
+
+Description of Problem:
+Every time a 'eval' invocation is performed inside a method, if we
+want to invoke the method or nested methods we can't used OpCodes.Call
+directly, we need to generate the code similar to the one used when a
+variable defined in an outter scope is used in a nested context (aka CallValue)
+
+Steps to reproduce the problem:
+Compile this program:var x = "Yec";
+
+function f ()
+{
+    function g () {
+        eval ("print (\"hola\");");
+    }
+
+    g ();
+}
+
+f ();
+ 
+
+Actual Results:
+cesar at itaca:~/mono/mcs/jtests> mono evalYec.exe
+
+Unhandled Exception: System.InvalidCastException: Cannot cast from source
+type to destination type.
+in <0x0007f> JScript 0:f (System.Object , Microsoft.JScript.Vsa.VsaEngine )
+in <0x00148> JScript 0:Global Code ()
+in <0x00054> JScript Main:Main (System.String[] )
+
+
+Expected Results:
+cesar at itaca:~/mono/mcs/jtests> rmono evalYec.exe
+hola
+
+
+How often does this happen? 
+Always
+
+Additional Information:
+
+Sat Oct  8 01:45:23 CDT 2005


More information about the mono-bugs mailing list