Debian Codegraph @

js/src/tests/non262/extensions/regress-414755.js

raw
1 // |reftest| skip-if(Android)
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 414755;
9 var summary = 'GC hazard due to missing SAVE_SP_AND_PC';
10 var actual = '';
11 var expect = '';
12
13
14 //-----------------------------------------------------------------------------
15 test();
16 //-----------------------------------------------------------------------------
17
18 function test()
19 {
20 printBugNumber(BUGNUMBER);
21 printStatus (summary);
22
23 function f()
24 {
25 var a = 1e10;
26 var b = 2e10;
27 var c = 3e10;
28
29 return (a*2) * ((b*2) * c);
30 }
31
32 if (typeof gczeal == 'function')
33 {
34 expect = f();
35
36 gczeal(2);
37
38 actual = f();
39 }
40 else
41 {
42 expect = actual = 'Test requires gczeal, skipped.';
43 }
44
45 if (typeof gczeal == 'function')
46 {
47 gczeal(0);
48 }
49
50 reportCompare(expect, actual, summary);
51 }