summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug1866502.js
blob: 25739cf8b2daf09eb6b3439d15747af986199d25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// |jit-test| --ion-offthread-compile=off 
// |jit-test| --fast-warmup 

this.__defineSetter__('sum', () => {})
sum=0;

options = {fileName: "test.js"}
evaluate("\
  function inline1(i)  { return i+0; }\
  function inline2(i)  { return i+1; }\
  function inline3(z,i){ return i+5; }\
  function a() {\
    for (let i=0; i<2000; i++) {\
      sum=inline1(i);\
      sum=inline2(i);\
      sum=inline3(sum,i);\
    }\
  }\
", options);
a();

evaluate("\
  function inline4(i)  { return i+0; }\
  function inline5(i)  { return i+1; }\
  function inline6(z,i){ return i+5; }\
  function b() {\
    for (let i=0; i<2000; i++) {\
      sum=sum+i;\
    }\
  }\
", options);
b();