michael@0: // |jit-test| michael@0: gczeal(4); michael@0: var optionNames = options().split(','); michael@0: for (var i = 0; i < optionNames.length; i++) michael@0: var optionName = optionNames[i]; michael@0: evaluate("\ michael@0: function addDebug(g, id) {\ michael@0: var debuggerGlobal = newGlobal();\ michael@0: debuggerGlobal.debuggee = g;\ michael@0: debuggerGlobal.id = id;\ michael@0: debuggerGlobal.print = function (s) { (g) += s; };\ michael@0: debuggerGlobal.eval('var dbg = new Debugger(debuggee);dbg.onDebuggerStatement = function () { print(id); debugger; };');\ michael@0: return debuggerGlobal;\ michael@0: }\ michael@0: var base = newGlobal();\ michael@0: var top = base;\ michael@0: for (var i = 0; i < 8; i++ )\ michael@0: top = addDebug(top, i);\ michael@0: base.eval('debugger;');\ michael@0: ");