Subj : Problems building SpiderMonkey in release mode, MSVC.NET 2003 To : netscape.public.mozilla.jseng From : "Alan Kemp" Date : Fri Feb 13 2004 10:41 pm Hi, [I'm using Microsoft Visual Studio .NET 2003] Wanting to put SpiderMonkey through some speed tests I rebuilt in release mode. The build process completed successfully, although I noticed the file jsinterp.c took an inordinate amount of time to build (roughly 2 minutes, compared to under a second in debug mode). Dropping the release .lib/.dll in over the debug ones I rebuilt my test application, only to find a most bizarre problem. When calling from c to scripts with no parameters every thing works great, however if the script function takes arguments execution stops with a message "script.js (13) ReferenceError: a is not defined" Where "a" was the function argument. Putting back the debug .lib/.dll and it all started working again. Recalling the long build time for jsinterp.c I went back to the SpiderMonkey project and turned off all optimizations for that specific file (leaving every thing else with normal release settings). With this done the new ..lib/.dll files work perfectly again. To eliminate my code from the equation I just tried jsshell: * DEBUG BUILD * js> function printme(a) { print(a); } js> printme("hello world") hello world js> * RELEASE BUILD * js> function printme(a) { print(a); } js> printme("hello world") 1: ReferenceError: a is not defined js> My first question would be, has anyone else seen this behaviour? I am assuming this is going to turn out to be a compiler specific issue, in which case the solution is going to involve using a different compiler... Any thoughts? Alan .