1594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// Copyright 2008 the V8 project authors. All rights reserved. 2594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// Redistribution and use in source and binary forms, with or without 3594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// modification, are permitted provided that the following conditions are 4594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// met: 5594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// 6594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// * Redistributions of source code must retain the above copyright 7594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// notice, this list of conditions and the following disclaimer. 8594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// * Redistributions in binary form must reproduce the above 9594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// copyright notice, this list of conditions and the following 10594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// disclaimer in the documentation and/or other materials provided 11594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// with the distribution. 12594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// * Neither the name of Google Inc. nor the names of its 13594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// contributors may be used to endorse or promote products derived 14594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// from this software without specific prior written permission. 15594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// 16594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 28594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// Flags: --expose-debug-as debug --nocrankshaft 29594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// Get the Debug object exposed from the debug context global object. 30594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.orgDebug = debug.Debug 31594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 32594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.orgfunction DebuggerStatement() { 33e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org debugger; /*pause*/ 34594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org} 35594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 36e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgfunction TestCase(fun, frame_number) { 37594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org var exception = false; 38594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org var codeSnippet = undefined; 39594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org var resultPositions = undefined; 40594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 41594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org function listener(event, exec_state, event_data, data) { 42594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org try { 43e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org if (event == Debug.DebugEvent.Break || 44e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org event == Debug.DebugEvent.Exception) { 45594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org Debug.setListener(null); 46e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org assertHasLineMark(/pause/, exec_state.frame(0)); 47e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org assertHasLineMark(/positions/, exec_state.frame(frame_number)); 48e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org var frame = exec_state.frame(frame_number); 49e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org codeSnippet = frame.sourceLineText(); 50e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org resultPositions = frame.stepInPositions(); 51594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org } 52594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org } catch (e) { 53594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org exception = e 54594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org } 55e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org 56e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org function assertHasLineMark(mark, frame) { 57e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org var line = frame.sourceLineText(); 58e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org if (!mark.exec(frame.sourceLineText())) { 59e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org throw new Error("Line " + line + " should contain mark " + mark); 60e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } 61e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } 62594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org } 63594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 64594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org Debug.setListener(listener); 65594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 66594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org fun(); 67594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 68594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org Debug.setListener(null); 69594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 70594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org assertTrue(!exception, exception); 71594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 72594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org var expectedPositions = {}; 73594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org var markPattern = new RegExp("/\\*#\\*/", "g"); 74594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 75594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org var matchResult; 76594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org while ( (matchResult = markPattern.exec(codeSnippet)) ) { 77594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org expectedPositions[matchResult.index] = true; 78594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org } 79594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 80594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org print(codeSnippet); 81594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 82594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org var decoratedResult = codeSnippet; 83594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 84594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org function replaceStringRange(s, pos, substitute) { 85594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org return s.substring(0, pos) + substitute + 86594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org s.substring(pos + substitute.length); 87594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org } 88594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 89594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org var markLength = 5; 90594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org var unexpectedPositionFound = false; 91594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 92594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org for (var i = 0; i < resultPositions.length; i++) { 93594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org var col = resultPositions[i].position.column - markLength; 94594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org if (expectedPositions[col]) { 95594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org delete expectedPositions[col]; 96594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org decoratedResult = replaceStringRange(decoratedResult, col, "*YES*"); 97594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org } else { 98594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org decoratedResult = replaceStringRange(decoratedResult, col, "!BAD!"); 99594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org unexpectedPositionFound = true; 100594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org } 101594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org } 102594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 103594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org print(decoratedResult); 104594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 105594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org for (var n in expectedPositions) { 106594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org assertTrue(false, "Some positions are not reported: " + decoratedResult); 107594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org break; 108594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org } 109594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org assertFalse(unexpectedPositionFound, "Found unexpected position: " + 110594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org decoratedResult); 111594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org} 112594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 113e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgfunction TestCaseWithDebugger(fun) { 114e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org TestCase(fun, 1); 115e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org} 116e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org 117e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgfunction TestCaseWithBreakpoint(fun, line_number, frame_number) { 118e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org var breakpointId = Debug.setBreakPoint(fun, line_number); 119e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org TestCase(fun, frame_number); 120e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org Debug.clearBreakPoint(breakpointId); 121e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org} 122e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org 123e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgfunction TestCaseWithException(fun, frame_number) { 124e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org Debug.setBreakOnException(); 125e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org TestCase(fun, frame_number); 126e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org Debug.clearBreakOnException(); 127e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org} 128e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org 129594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 130594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// Test cases. 131594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 132e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org// Step in position, when the function call that we are standing at is already 133e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org// being executed. 134e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgvar fun = function() { 135e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org function g(p) { 136e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org throw String(p); /*pause*/ 137e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } 138e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org try { 139e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org var res = [ g(1), /*#*/g(2) ]; /*positions*/ 140e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } catch (e) { 141e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } 142e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org}; 143e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgTestCaseWithBreakpoint(fun, 2, 1); 144e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgTestCaseWithException(fun, 1); 145e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org 146e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org 147e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org// Step in position, when the function call that we are standing at is raising 148e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org// an exception. 149e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgvar fun = function() { 150e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org var o = { 151e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org g: function(p) { 152e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org throw p; 153e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } 154e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org }; 155e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org try { 156e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org var res = [ /*#*/f(1), /*#*/g(2) ]; /*pause, positions*/ 157e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } catch (e) { 158e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } 159e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org}; 160e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgTestCaseWithException(fun, 0); 161e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org 162e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org 163e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org// Step-in position, when already paused almost on the first call site. 164e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgvar fun = function() { 165e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org function g(p) { 166e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org throw p; 167e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } 168e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org try { 169e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org var res = [ /*#*/g(Math.rand), /*#*/g(2) ]; /*pause, positions*/ 170e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } catch (e) { 171e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } 172e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org}; 173e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgTestCaseWithBreakpoint(fun, 5, 0); 174e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org 175e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org// Step-in position, when already paused on the first call site. 176e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgvar fun = function() { 177e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org function g() { 178e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org throw "Debug"; 179e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } 180e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org try { 181e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org var res = [ /*#*/g(), /*#*/g() ]; /*pause, positions*/ 182e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } catch (e) { 183e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org } 184e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org}; 185e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgTestCaseWithBreakpoint(fun, 5, 0); 186e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org 187e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org 188594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// Method calls. 189594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.orgvar fun = function() { 190594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org var data = { 191594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org a: function() {} 192594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org }; 193e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org var res = [ DebuggerStatement(), data./*#*/a(), data[/*#*/String("a")]/*#*/(), data["a"]/*#*/(), data.a, data["a"] ]; /*positions*/ 194594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org}; 195e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgTestCaseWithDebugger(fun); 196594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 197594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// Function call on a value. 198594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.orgvar fun = function() { 199594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org function g(p) { 200594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org return g; 201594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org } 202e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org var res = [ DebuggerStatement(), /*#*/g(2), /*#*/g(2)/*#*/(3), /*#*/g(0)/*#*/(0)/*#*/(g) ]; /*positions*/ 203594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org}; 204e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgTestCaseWithDebugger(fun); 205594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 206594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// Local function call, closure function call, 207594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// local function construction call. 208594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.orgvar fun = (function(p) { 209594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org return function() { 210594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org function f(a, b) { 211594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org } 212e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org var res = /*#*/f(DebuggerStatement(), /*#*/p(/*#*/new f())); /*positions*/ 213594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org }; 214594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org})(Object); 215e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgTestCaseWithDebugger(fun); 216594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org 217594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org// Global function, global object construction, calls before pause point. 218594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.orgvar fun = (function(p) { 219594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org return function() { 220e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.org var res = [ Math.abs(new Object()), DebuggerStatement(), Math./*#*/abs(4), /*#*/new Object()./*#*/toString() ]; /*positions*/ 221594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org }; 222594006017e46d82ed7146611dc12c20e3c509c7ddanno@chromium.org})(Object); 223e900018c7a2a695fde788911564da37535c7e736mstarzinger@chromium.orgTestCaseWithDebugger(fun); 224