OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --max-old-space-size=270 | |
6 | |
7 s1 = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; | 5 s1 = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; |
8 s1 += s1; | 6 s1 += s1; |
9 s1 += s1; | 7 s1 += s1; |
10 s1 += s1; | 8 s1 += s1; |
11 s1 += s1; | 9 s1 += s1; |
12 | 10 |
13 s0 = 'a'; | 11 s0 = 'a'; |
14 | 12 |
15 function g() { | 13 function g() { |
16 for (var j = 0; j < 1000000; j++) { | 14 for (var j = 0; j < 1000000; j++) { |
17 s0 += s1; | 15 s0 += s1; |
18 } | 16 } |
19 } | 17 } |
20 | 18 |
21 try { | 19 try { |
22 g(); | 20 g(); |
23 } catch (e) { | 21 } catch (e) { |
24 } | 22 } |
25 | 23 |
26 assertEquals('x', s0[10]); | 24 assertEquals('x', s0[10]); |
OLD | NEW |