Subj : [Rhino] infinite loop when compiling with optimization To : netscape.public.mozilla.jseng From : Mike C. Date : Thu Jun 23 2005 07:42 pm Hi, I have some legacy code that gets the Rhino compiler in a infinite loop when compiled with -opt greather than zero, for example this file: ------------------------------------------ // infloop.js function infLoop(inStr) { var i = -1; while ((i = inStr.indexOf("%")) != -1) { inStr = inStr.replace("%", ""); } return inStr; } var str = infLoop("abc%def"); ------------------------------------------ I know that the function can be written in one line with regular expressions, the example is only to demonstrate the problem in the optimizer. I have tested with 1_5R5 and 1_6R1 and they hang the same way. Let me know if you want me to submit a bug. Mike .