PageRenderTime 12ms CodeModel.GetById 1ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/js/src/jit-test/tests/basic/bug657975.js

http://github.com/zpao/v8monkey
JavaScript | 79 lines | 55 code | 12 blank | 12 comment | 8 complexity | a42755f384278854633de5677f9e3ede MD5 | raw file
 1// |jit-test| debug
 2setDebug(true);
 3
 4// bug 657975
 5function f1(){ "use strict"; options('strict'); }
 6trap(f1, 0, '')
 7f1()
 8
 9// bug 657979
10function f2(){ with({a:0}){}; }
11trap(f2, 0, '')
12f2()
13
14x = 0;
15
16// bug 657984 #1
17function f3(){ for(y in x); }
18trap(f3, 5, '')
19f3()
20
21// bug 657984 #2
22function f4(){ for(y in x); }
23trap(f4, 8, '')
24f4()
25
26// bug 658464
27function f5() {
28  for ([, x] in 0) {}
29}
30trap(f5, 7, '')
31f5()
32
33// bug 658465
34function f6() {
35  "use strict";
36  print(Math.min(0, 1));
37}
38trap(f6, 10, '')
39f6()
40
41// bug 658491
42function f7() {
43  try { y = w; } catch(y) {}
44}
45trap(f7, 14, '')
46f7()
47
48// bug 658950
49f8 = (function() {
50  let x;
51  yield
52})
53trap(f8, 6, undefined);
54for (a in f8())
55  (function() {})()
56
57// bug 659043
58f9 = (function() {
59  for (let a = 0; a < 0; ++a) {
60    for each(let w in []) {}
61  }
62})
63trap(f9, 23, undefined);
64for (b in f9())
65  (function() {})()
66
67// bug 659233
68f10 = (function() {
69    while (h) {
70        continue
71    }
72})
73trap(f10, 0, '');
74try { f10() } catch (e) {}
75
76// bug 659337
77f11 = Function("for (x = 0; x < 6; x++) { gc() }");
78trap(f11, 23, '');
79f11()