Subj : Re: SpiderMonkey does not work when compiled with MSVC 6.0 in release To : Dmitriy Khodos From : Brendan Eich Date : Wed Nov 12 2003 11:24 am Dmitriy Khodos wrote: >Hello. I haven't really tried to see what happens on other platforms, >but here's what's going on Win32. I get any SpiderMonkey version >_after_ js-1.5-rc4a (including the current CVS snapshot), compile it >in the release mode (I use MSVC 6.0) and run jsshell against the >sample script: > >Release\jsshell.exe perfect.js > >Here's the error I get: > >perfect.js:16: ReferenceError: n is not defined > >In fact, the same will happen in any JS function, which refers to its >argument(s). > >It appears that the issue was introduced in js-1.5-rc5. But the most >surprising part is that even js-1.5-rc5 works fine when compiled in >the debug mode. > >Any comments? Thanks. > > You need to compile (link) with /OPT:NOICF to work around an MSVC bug. See http://bugzilla.mozilla.org/show_bug.cgi?id=151066, mentioned in http://www.mozilla.org/js/spidermonkey/release-notes/JS_150_RC5.html. See also many postings in this group. All of these are too hidden, though. We need a big release note about this in every release-notes update. I'll add that now. /be .