Debian Codegraph @

js/src/tests/non262/extensions/regress-416354.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 = 416354;
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(a, b, c)
24 {
25 return (-a) * ((-b) * (-c));
26 }
27
28 if (typeof gczeal == 'function')
29 {
30 expect = f(1.5, 1.25, 1.125);
31 gczeal(2);
32 actual = f(1.5, 1.25, 1.125);
33 }
34 else
35 {
36 expect = actual = 'Test requires gczeal, skipped.';
37 }
38
39 if (typeof gczeal == 'function')
40 {
41 gczeal(0);
42 }
43
44 reportCompare(expect, actual, summary);
45 }