summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/recover-inline-arguments.js
blob: 7daa3cba30420d6d830cd288873f91d8e3689d73 (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
33
34
35
36
37
38
// |jit-test| --inlining-entry-threshold=5

setJitCompilerOption("baseline.warmup.trigger", 9);
setJitCompilerOption("ion.warmup.trigger", 20);

// Prevent the GC from cancelling compilations, when we expect them to succeed.
gczeal(0);

function rcreate_arguments_object_nouse_inner() {
    assertRecoveredOnBailout(arguments, true);
}
function rcreate_arguments_object_nouse_outer() {
    rcreate_arguments_object_nouse_inner();
    trialInline();
}
function rcreate_arguments_object_oneuse_inner() {
    assertRecoveredOnBailout(arguments, true);
    return arguments.length;
}
function rcreate_arguments_object_oneuse_outer() {
    rcreate_arguments_object_oneuse_inner(0)
    trialInline();
}

function rcreate_arguments_object_oneuse_inner() {
  assertRecoveredOnBailout(arguments, true);
  return arguments.length;
}
function rcreate_arguments_object_oneuse_outer() {
    rcreate_arguments_object_oneuse_inner(0)
    trialInline();
}

with ({}) {}
for (var i = 0; i < 100; i++) {
    rcreate_arguments_object_nouse_outer();
    rcreate_arguments_object_oneuse_outer();
}