OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
11 // with the distribution. | 11 // with the distribution. |
12 // * Neither the name of Google Inc. nor the names of its | 12 // * Neither the name of Google Inc. nor the names of its |
13 // contributors may be used to endorse or promote products derived | 13 // contributors may be used to endorse or promote products derived |
14 // from this software without specific prior written permission. | 14 // from this software without specific prior written permission. |
15 // | 15 // |
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 // Flags: --expose-debug-as debug | 28 // Flags: --expose-debug-as debug --nostack-trace-on-abort |
29 | 29 |
30 function f() { | 30 function f() { |
31 var i = 0; | 31 var i = 0; |
32 f(1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0); | 32 |
| 33 // Stack-allocate to reach the end of stack quickly. |
| 34 var _A0 = 00; var _A1 = 01; var _A2 = 02; var _A3 = 03; var _A4 = 04; |
| 35 var _B0 = 05; var _B1 = 06; var _B2 = 07; var _B3 = 08; var _B4 = 09; |
| 36 var _C0 = 10; var _C1 = 11; var _C2 = 12; var _C3 = 13; var _C4 = 14; |
| 37 var _D0 = 15; var _D1 = 16; var _D2 = 17; var _D3 = 18; var _D4 = 19; |
| 38 var _E0 = 20; var _E1 = 21; var _E2 = 22; var _E3 = 23; var _E4 = 24; |
| 39 var _F0 = 25; var _F1 = 26; var _F2 = 27; var _F3 = 28; var _F4 = 29; |
| 40 var _G0 = 30; var _G1 = 31; var _G2 = 32; var _G3 = 33; var _G4 = 34; |
| 41 var _H0 = 35; var _H1 = 36; var _H2 = 37; var _H3 = 38; var _H4 = 39; |
| 42 var _I0 = 40; var _I1 = 41; var _I2 = 42; var _I3 = 43; var _I4 = 44; |
| 43 var _J0 = 45; var _J1 = 46; var _J2 = 47; var _J3 = 48; var _J4 = 49; |
| 44 var _K0 = 50; var _K1 = 51; var _K2 = 52; var _K3 = 53; var _K4 = 54; |
| 45 var _L0 = 55; var _L1 = 56; var _L2 = 57; var _L3 = 58; var _L4 = 59; |
| 46 var _M0 = 60; var _M1 = 61; var _M2 = 62; var _M3 = 63; var _M4 = 64; |
| 47 var _N0 = 65; var _N1 = 66; var _N2 = 67; var _N3 = 68; var _N4 = 69; |
| 48 var _O0 = 70; var _O1 = 71; var _O2 = 72; var _O3 = 73; var _O4 = 74; |
| 49 var _P0 = 75; var _P1 = 76; var _P2 = 77; var _P3 = 78; var _P4 = 79; |
| 50 var _Q0 = 80; var _Q1 = 81; var _Q2 = 82; var _Q3 = 83; var _Q4 = 84; |
| 51 var _R0 = 85; var _R1 = 86; var _R2 = 87; var _R3 = 88; var _R4 = 89; |
| 52 var _S0 = 90; var _S1 = 91; var _S2 = 92; var _S3 = 93; var _S4 = 94; |
| 53 var _T0 = 95; var _T1 = 96; var _T2 = 97; var _T3 = 98; var _T4 = 99; |
| 54 |
| 55 f(); |
33 }; | 56 }; |
34 | 57 |
35 Debug = debug.Debug; | 58 Debug = debug.Debug; |
36 var bp = Debug.setBreakPoint(f, 0); | 59 var bp = Debug.setBreakPoint(f, 0); |
37 | 60 |
38 function listener(event, exec_state, event_data, data) { | 61 function listener(event, exec_state, event_data, data) { |
39 result = exec_state.frame().evaluate("i").value(); | 62 result = exec_state.frame().evaluate("i").value(); |
40 }; | 63 }; |
41 | 64 |
42 Debug.setListener(listener); | 65 Debug.setListener(listener); |
43 assertThrows(function() { f(); }, RangeError); | 66 assertThrows(function() { f(); }, RangeError); |
44 | |
OLD | NEW |