nashorn/test/script/basic/runsunspider.js
author hannesw
Fri, 03 Feb 2017 13:28:00 +0100
changeset 43555 1bb10bccf057
parent 24778 2ff5d7041566
permissions -rw-r--r--
8173888: Test for JDK-8169481 causes stack overflows in parser tests Reviewed-by: jlaskey, sundar
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     1
/*
16151
97c1e756ae1e 8005663: Update copyright year to 2013
jlaskey
parents: 16147
diff changeset
     2
 * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
     4
 *
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     7
 * published by the Free Software Foundation.
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
     8
 *
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    13
 * accompanied this code).
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
    14
 *
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
    18
 *
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    21
 * questions.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    22
 */
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    23
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    24
/**
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    25
 * runsunspider : runs the sunspider tests and checks for compliance
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    26
 *
24743
138ee369abd8 8033105: Make sure Nashorn test harness can run zlib benchmark
lagergren
parents: 24719
diff changeset
    27
 * @test
138ee369abd8 8033105: Make sure Nashorn test harness can run zlib benchmark
lagergren
parents: 24719
diff changeset
    28
 * @option -timezone=PST
138ee369abd8 8033105: Make sure Nashorn test harness can run zlib benchmark
lagergren
parents: 24719
diff changeset
    29
 * @runif external.sunspider
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    30
 */
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    31
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    32
/**
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    33
 * This is not a test, but a test "framework" for running sunspider tests.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    34
 */
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    35
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    36
function assertEq(a, b) {
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    37
    if (a !== b) {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
    38
        throw "ASSERTION FAILED: " + a + " should be " + b;
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    39
    }
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    40
}
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    41
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    42
function pprint(x) {
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    43
    if (verbose_run) {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
    44
    print(x);
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    45
    }
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    46
}
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    47
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    48
var runs = 0;
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    49
var total_time = 0;
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    50
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    51
function runbench(name) {
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    52
    var filename = name.split("/").pop();
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    53
    pprint("Running (warmup/sanity) " + filename);
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    54
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    55
    var start = new Date;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    56
    load(name);
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
    57
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    58
    var stop = new Date - start;
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    59
    total_time += stop;
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
    60
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    61
    pprint(filename + " done in " + stop + " ms");
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    62
    runs++;
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    63
}
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
    64
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    65
var m_w;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    66
var m_z;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    67
var MAXINT;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
    68
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
    69
//produce deterministic random numbers for test suite
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
    70
function pseudorandom() {
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
    71
    m_z = 36969 * (m_z & 65535) + (m_z >> 16);
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
    72
    m_w = 18000 * (m_w & 65535) + (m_w >> 16);
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
    73
    return (Math.abs((m_z << 16) + m_w) & MAXINT) / MAXINT;
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
    74
}
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
    75
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    76
function initrandom() {
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    77
    m_w = 4711;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    78
    m_z = 17;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    79
    MAXINT = 0x7fffffff;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    80
    Math.random = pseudorandom;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    81
}
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    82
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    83
var rtimes = 0;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    84
var dir = (typeof(__DIR__) == 'undefined') ? "test/script/basic/" : __DIR__;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    85
var single;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    86
var verbose_run = false;
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
    87
var runall = false;
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
    88
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    89
var args = [];
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    90
if (typeof $ARGS !== 'undefined') {
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    91
    args = $ARGS;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    92
} else if (typeof arguments !== 'undefined' && arguments.length != 0) {
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    93
    args = arguments;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    94
}
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    95
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    96
for (var i = 0; i < args.length; i++) {
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    97
    if (args[i] === '--verbose') {
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    98
        verbose_run = true;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
    99
    } else if (args[i] === '--times') {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   100
    i++;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   101
    rtimes = +args[i];
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   102
    } else if (args[i] === '--single') {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   103
    i++;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   104
    single = args[i];
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   105
    } else if (args[i] === '--runall') {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   106
    i++;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   107
    runall = true;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   108
    }
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   109
}
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   110
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   111
function runsuite(tests) {
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   112
    var changed   = false;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   113
    var res       = [];
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   114
    var oldRandom = Math.random;
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   115
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   116
    try {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   117
    for (var n = 0; n < tests.length; n++) {
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   118
            try {
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   119
                path = dir + '../external/sunspider/tests/sunspider-1.0.2/' + tests[n].name
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   120
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   121
                initrandom();
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   122
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   123
                var dd = new Date;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   124
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   125
                runbench(path);
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   126
                if (typeof tests[n].actual !== 'undefined') {
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   127
                    assertEq(tests[n].actual(), tests[n].expected());
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   128
                }
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   129
24768
ae21f28f0ddc 8044102: Ensure bechmark exclude list for Octane benchmarks is in only one place, project.properties, and fix benchmark harness
lagergren
parents: 24751
diff changeset
   130
                var times = 0;
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   131
                if (typeof tests[n].rerun !== 'undefined' && tests[n].times > 0) {
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   132
                    pprint("rerunning " + tests[n].name + " " + tests[n].times + " times...");
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   133
                    var to = tests[n].times;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   134
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   135
                    var elemsPerPercent = to / 100;
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   136
                    var po = 0|(to / 10);
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   137
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   138
            pprint("Doing warmup.");
24768
ae21f28f0ddc 8044102: Ensure bechmark exclude list for Octane benchmarks is in only one place, project.properties, and fix benchmark harness
lagergren
parents: 24751
diff changeset
   139
                    for (times = 0; times < to; times++) {
ae21f28f0ddc 8044102: Ensure bechmark exclude list for Octane benchmarks is in only one place, project.properties, and fix benchmark harness
lagergren
parents: 24751
diff changeset
   140
                        initrandom();
ae21f28f0ddc 8044102: Ensure bechmark exclude list for Octane benchmarks is in only one place, project.properties, and fix benchmark harness
lagergren
parents: 24751
diff changeset
   141
                        tests[n].rerun();
ae21f28f0ddc 8044102: Ensure bechmark exclude list for Octane benchmarks is in only one place, project.properties, and fix benchmark harness
lagergren
parents: 24751
diff changeset
   142
                    }
ae21f28f0ddc 8044102: Ensure bechmark exclude list for Octane benchmarks is in only one place, project.properties, and fix benchmark harness
lagergren
parents: 24751
diff changeset
   143
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   144
            pprint("Doing hot runs.");
24768
ae21f28f0ddc 8044102: Ensure bechmark exclude list for Octane benchmarks is in only one place, project.properties, and fix benchmark harness
lagergren
parents: 24751
diff changeset
   145
                    for (times = 0; times < to; times++) {
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   146
                        initrandom();
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   147
                        tests[n].rerun();
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   148
                        if ((times % (po|0)) == 0) {
24768
ae21f28f0ddc 8044102: Ensure bechmark exclude list for Octane benchmarks is in only one place, project.properties, and fix benchmark harness
lagergren
parents: 24751
diff changeset
   149
                            pprint("\t" + times/to * 100 + "%");
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   150
                        }
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   151
                    }
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   152
                }
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   153
24768
ae21f28f0ddc 8044102: Ensure bechmark exclude list for Octane benchmarks is in only one place, project.properties, and fix benchmark harness
lagergren
parents: 24751
diff changeset
   154
                var t = Math.round(((new Date - dd) / (times == 0 ? 1 : times)) * 100 / 100);
ae21f28f0ddc 8044102: Ensure bechmark exclude list for Octane benchmarks is in only one place, project.properties, and fix benchmark harness
lagergren
parents: 24751
diff changeset
   155
                pprint("time per iteration: " + t + " ms");
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   156
                if (typeof tests[n].actual !== 'undefined') {
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   157
                    assertEq(tests[n].actual(), tests[n].expected());
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   158
                }
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   159
                res.push(t);
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   160
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   161
                pprint("");
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   162
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   163
                changed = true;
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   164
            } catch(e) {
24768
ae21f28f0ddc 8044102: Ensure bechmark exclude list for Octane benchmarks is in only one place, project.properties, and fix benchmark harness
lagergren
parents: 24751
diff changeset
   165
                if (runall) {
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   166
                    print("FAIL!");
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   167
                } else {
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   168
                    throw e;
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   169
                }
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   170
            }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   171
        }
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   172
    } catch (e) {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   173
    print("FAIL!");
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   174
    throw e;
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   175
        // no scripting or something, silently fail
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   176
    } finally {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   177
    Math.random = oldRandom;
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   178
    }
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   179
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   180
    for (var n = 0; n < tests.length; n++) {
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   181
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   182
    var time = "" + res[n];
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   183
    while (time.length < 6) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   184
        time = " " + time;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   185
    }
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   186
    time += " ms";
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   187
    if (res[n] == -1) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   188
        time = "<couldn't be rerun>";
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   189
    }
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   190
    var str = tests[n].name;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   191
    for (var spaces = str.length; spaces < 32; spaces++) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   192
        str += " ";
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   193
    }
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   194
    str += " ";
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   195
    str += time;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   196
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   197
    if (tests[n].times > 0) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   198
        str += " [";
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   199
        str += tests[n].times + " reruns]";
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   200
    }
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   201
    pprint(str);
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   202
    }
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   203
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   204
    return changed;
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   205
}
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   206
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   207
function hash(str) {
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   208
    var s = "" + str;
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   209
    var h = 0;
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   210
    var off = 0;
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   211
    for (var i = 0; i < s.length; i++) {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   212
        h = 31 * h + s.charCodeAt(off++);
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   213
        h &= 0x7fffffff;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   214
    }
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   215
    return h ^ s.length;
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   216
}
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   217
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   218
var tests = [
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   219
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   220
    { name: 'regexp-dna.js',
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   221
      actual: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   222
      return dnaOutputString + dnaInput;
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   223
      },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   224
      expected: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   225
      return expectedDNAOutputString + expectedDNAInput;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   226
      },
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   227
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   228
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   229
    { name: 'string-base64.js',
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   230
      actual: function() {
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   231
          return hash(str);
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   232
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   233
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   234
          return 1544571068;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   235
      },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   236
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   237
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   238
      toBinaryTable = [
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   239
          -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   240
          -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   241
          -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   242
              52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1, 0,-1,-1,
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   243
          -1, 0, 1, 2,  3, 4, 5, 6,  7, 8, 9,10, 11,12,13,14,
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   244
               15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   245
          -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   246
              41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   247
      ];
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   248
      var str = "";
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   249
      for (var i = 0; i < 8192; i++)
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   250
              str += String.fromCharCode((25 * Math.random()) + 97);
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   251
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   252
      for (var i = 8192; i <= 16384; i *= 2) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   253
          var base64;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   254
          base64 = toBase64(str);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   255
          var encoded = base64ToString(base64);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   256
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   257
          str += str;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   258
      }
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   259
      toBinaryTable = null;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   260
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   261
    },
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   262
    { name: 'date-format-xparb.js',
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   263
      actual: function() {
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   264
          return shortFormat + longFormat;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   265
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   266
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   267
          return "2017-09-05Tuesday, September 05, 2017 8:43:48 AM";
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   268
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   269
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   270
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   271
      date = new Date("1/1/2007 1:11:11");
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   272
      for (i = 0; i < 4000; ++i) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   273
          var shortFormat = date.dateFormat("Y-m-d");
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   274
          var longFormat = date.dateFormat("l, F d, Y g:i:s A");
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   275
          date.setTime(date.getTime() + 84266956);
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   276
      }
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   277
      }
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   278
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   279
    },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   280
    { name: 'string-validate-input.js',
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   281
      actual: function() {
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   282
          return hash(endResult);
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   283
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   284
      expected: function() {
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   285
          return 726038055;
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   286
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   287
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   288
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   289
      doTest();
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   290
      },
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   291
    },
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   292
    { name: '3d-morph.js',
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   293
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   294
          var acceptableDelta = 4e-15;
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   295
          return (testOutput - 6.394884621840902e-14) < acceptableDelta;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   296
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   297
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   298
          return true;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   299
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   300
      times: rtimes,
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   301
      rerun: function() {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   302
      a = Array()
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   303
      for (var i=0; i < nx*nz*3; ++i)
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   304
          a[i] = 0
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   305
      for (var i = 0; i < loops; ++i) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   306
          morph(a, i/loops)
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   307
      }
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   308
      testOutput = 0;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   309
      for (var i = 0; i < nx; i++)
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   310
          testOutput += a[3*(i*nx+i)+1];
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   311
      a = null;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   312
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   313
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   314
    },
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   315
    { name: 'crypto-aes.js',
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   316
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   317
          return plainText;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   318
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   319
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   320
          return decryptedText;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   321
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   322
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   323
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   324
      cipherText = AESEncryptCtr(plainText, password, 256);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   325
      decryptedText = AESDecryptCtr(cipherText, password, 256);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   326
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   327
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   328
    },
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   329
    { name: 'crypto-md5.js',
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   330
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   331
          return md5Output;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   332
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   333
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   334
          return "a831e91e0f70eddcb70dc61c6f82f6cd";
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   335
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   336
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   337
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   338
      md5Output = hex_md5(plainText);
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   339
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   340
    },
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   341
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   342
    { name: 'crypto-sha1.js',
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   343
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   344
          return sha1Output;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   345
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   346
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   347
          return "2524d264def74cce2498bf112bedf00e6c0b796d";
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   348
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   349
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   350
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   351
      sha1Output = hex_sha1(plainText);
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   352
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   353
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   354
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   355
    { name: 'bitops-bitwise-and.js',
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   356
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   357
          return result;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   358
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   359
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   360
          return 0;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   361
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   362
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   363
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   364
      bitwiseAndValue = 4294967296;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   365
      for (var i = 0; i < 600000; i++) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   366
          bitwiseAndValue = bitwiseAndValue & i;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   367
      }
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   368
      result = bitwiseAndValue;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   369
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   370
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   371
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   372
    { name: 'bitops-bits-in-byte.js',
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   373
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   374
          return result;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   375
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   376
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   377
          return 358400;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   378
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   379
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   380
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   381
      result = TimeFunc(bitsinbyte);
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   382
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   383
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   384
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   385
    { name: 'bitops-nsieve-bits.js',
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   386
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   387
          var ret = 0;
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   388
          for (var i = 0; i < result.length; ++i) {
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   389
              ret += result[i];
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   390
          }
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   391
          ret += result.length;
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   392
          return ret;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   393
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   394
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   395
          return -1286749539853;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   396
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   397
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   398
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   399
      result = sieve();
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   400
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   401
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   402
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   403
    { name: 'bitops-3bit-bits-in-byte.js',
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   404
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   405
          return sum;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   406
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   407
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   408
          return 512000;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   409
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   410
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   411
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   412
      sum = TimeFunc(fast3bitlookup);
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   413
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   414
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   415
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   416
    { name: 'access-nbody.js',
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   417
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   418
          return ret;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   419
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   420
      expected: function() {
20947
ab64f6cdcad0 8026498: Revert: latest runsunspider.js tests contains several bugs
jlaskey
parents: 20942
diff changeset
   421
            return -1.3524862408537381;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   422
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   423
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   424
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   425
      var ret = 0;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   426
      for (var n = 3; n <= 24; n *= 2) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   427
          (function(){
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   428
          var bodies = new NBodySystem( Array(
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   429
              Sun(),Jupiter(),Saturn(),Uranus(),Neptune()
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   430
          ));
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   431
          var max = n * 100;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   432
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   433
          ret += bodies.energy();
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   434
          for (var i=0; i<max; i++){
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   435
              bodies.advance(0.01);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   436
          }
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   437
          ret += bodies.energy();
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   438
          })();
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   439
      }
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   440
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   441
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   442
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   443
    { name: 'access-binary-trees.js',
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   444
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   445
          return ret;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   446
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   447
      expected: function() {
20947
ab64f6cdcad0 8026498: Revert: latest runsunspider.js tests contains several bugs
jlaskey
parents: 20942
diff changeset
   448
          return -4;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   449
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   450
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   451
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   452
      ret = 0;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   453
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   454
      for (var n = 4; n <= 7; n += 1) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   455
          var minDepth = 4;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   456
          var maxDepth = Math.max(minDepth + 2, n);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   457
          var stretchDepth = maxDepth + 1;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   458
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   459
          var check = bottomUpTree(0,stretchDepth).itemCheck();
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   460
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   461
          var longLivedTree = bottomUpTree(0,maxDepth);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   462
          for (var depth=minDepth; depth<=maxDepth; depth+=2){
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   463
          var iterations = 1 << (maxDepth - depth + minDepth);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   464
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   465
          check = 0;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   466
          for (var i=1; i<=iterations; i++){
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   467
              check += bottomUpTree(i,depth).itemCheck();
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   468
              check += bottomUpTree(-i,depth).itemCheck();
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   469
          }
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   470
          }
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   471
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   472
          ret += longLivedTree.itemCheck();
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   473
      }
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   474
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   475
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   476
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   477
    { name: 'access-fannkuch.js',
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   478
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   479
          return ret;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   480
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   481
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   482
          return 22;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   483
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   484
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   485
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   486
      n = 8;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   487
      ret = fannkuch(n);
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   488
      }
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   489
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   490
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   491
    { name: 'math-spectral-norm.js',
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   492
      actual: function() {
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   493
          var ret = '';
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   494
          for (var i = 6; i <= 48; i *= 2) {
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   495
              ret += spectralnorm(i) + ',';
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   496
          }
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   497
          return ret;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   498
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   499
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   500
          return "1.2657786149754053,1.2727355112619148,1.273989979775574,1.274190125290389,";
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   501
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   502
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   503
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   504
      total = 0;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   505
      for (var i = 6; i <= 48; i *= 2) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   506
          total += spectralnorm(i);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   507
      }
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   508
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   509
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   510
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   511
    { name: '3d-raytrace.js',
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   512
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   513
          return hash(testOutput);
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   514
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   515
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   516
          return 230692593;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   517
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   518
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   519
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   520
      testOutput = arrayToCanvasCommands(raytraceScene());
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   521
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   522
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   523
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   524
    { name: 'math-cordic.js',
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   525
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   526
          return total;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   527
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   528
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   529
          return 10362.570468755888;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   530
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   531
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   532
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   533
      total = 0;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   534
      cordic(25000);
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   535
      }
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   536
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   537
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   538
    { name: 'controlflow-recursive.js',
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   539
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   540
          var ret = 0;
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   541
          for (var i = 3; i <= 5; i++) {
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   542
              ret += ack(3,i);
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   543
              ret += fib(17.0+i);
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   544
              ret += tak(3*i+3,2*i+2,i+1);
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   545
          }
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   546
          return ret;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   547
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   548
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   549
          return 57775;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   550
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   551
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   552
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   553
      result = 0;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   554
      for (var i = 3; i <= 5; i++) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   555
          result += ack(3,i);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   556
          result += fib(17.0+i);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   557
          result += tak(3*i+3,2*i+2,i+1);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   558
      }
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   559
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   560
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   561
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   562
    { name: 'date-format-tofte.js',
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   563
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   564
          return shortFormat + longFormat;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   565
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   566
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   567
          return "2008-05-01Thursday, May 01, 2008 6:31:22 PM";
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   568
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   569
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   570
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   571
      date = new Date("1/1/2007 1:11:11");
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   572
      for (i = 0; i < 500; ++i) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   573
          var shortFormat = date.formatDate("Y-m-d");
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   574
          var longFormat = date.formatDate("l, F d, Y g:i:s A");
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   575
          date.setTime(date.getTime() + 84266956);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   576
      }
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   577
      }
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   578
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   579
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   580
    { name: 'string-tagcloud.js',
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   581
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   582
          // The result string embeds floating-point numbers, which can vary a bit on different platforms,
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   583
          // so we truncate them a bit before comparing.
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   584
          var tagcloud_norm = tagcloud.replace(/([0-9.]+)px/g, function(str, p1) { return p1.substr(0, 10) + 'px' })
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   585
          return tagcloud_norm.length;
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   586
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   587
      expected: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   588
          return 295906;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   589
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   590
      times: rtimes,
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   591
      rerun: function() {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   592
      tagInfo = tagInfoJSON.parseJSON(function(a, b) { if (a == "popularity") { return Math.log(b) / log2; } else {return b; } });
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   593
      tagcloud = makeTagCloud(tagInfo);
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   594
      }
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   595
    },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   596
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   597
    { name: 'math-partial-sums.js',
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   598
      actual: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   599
      return total;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   600
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   601
      expected: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   602
      return 60.08994194659945;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   603
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   604
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   605
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   606
      total = 0;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   607
      for (var i = 1024; i <= 16384; i *= 2) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   608
          total += partial(i);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   609
      }
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   610
      }
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   611
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   612
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   613
    { name: 'access-nsieve.js',
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   614
      actual: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   615
      return result;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   616
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   617
      expected: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   618
      return 14302;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   619
      },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   620
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   621
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   622
      result = sieve();
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   623
      }
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   624
    },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   625
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   626
    { name: '3d-cube.js',
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   627
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   628
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   629
      Q = new Array();
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   630
      MTrans = new Array();  // transformation matrix
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   631
      MQube = new Array();  // position information of qube
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   632
      I = new Array();      // entity matrix
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   633
      Origin = new Object();
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   634
      Testing = new Object();
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   635
      for ( var i = 20; i <= 160; i *= 2 ) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   636
          Init(i);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   637
      }
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   638
      }
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   639
    },
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   640
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   641
    //TODO no easy way to sanity check result
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   642
    { name: 'string-fasta.js',
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   643
      times: rtimes,
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   644
      rerun: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   645
      ret = 0;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   646
      count = 7;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   647
      fastaRepeat(2*count*100000, ALU);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   648
      fastaRandom(3*count*1000, IUB);
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   649
      fastaRandom(5*count*1000, HomoSap);
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   650
      }
24751
ccbd9cd3f720 8042118: Separate types from symbols
attila
parents: 24743
diff changeset
   651
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   652
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   653
    //TODO no easy way to sanity check result
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   654
    { name: 'string-unpack-code.js',
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   655
      actual: function() {
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   656
          return decompressedMochiKit.length == 106415 &&
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   657
              decompressedMochiKit[2000] == '5' &&
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   658
              decompressedMochiKit[12000] == '_' &&
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   659
              decompressedMochiKit[82556] == '>';
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   660
      },
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   661
      expected: function() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   662
      return true;
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   663
      },
19104
6fe18e748f74 8021321: Two runsunspider tests fail after updating sunspider to 1.0
jlaskey
parents: 17518
diff changeset
   664
    },
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   665
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   666
];
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   667
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   668
tests.sort(function(a,b) { return a.name.localeCompare(b.name); });
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   669
if (typeof single !== 'undefined') {
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   670
    for (i in tests) {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   671
    if (tests[i].name === single) {
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   672
        singleTest = tests[i];
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   673
        tests = [singleTest];
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   674
        break;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   675
    }
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   676
    }
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   677
    if (tests.length != 1) {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24768
diff changeset
   678
    throw "unknown single test '" + single + "'";
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   679
    }
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   680
}
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   681
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   682
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   683
// handle the case this script may be run by a JS engine that doesn't
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   684
// support __DIR__ global variable.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   685
16164
1899aada11f8 8005971: runsunspider.js should check results of benchmarks
lagergren
parents: 16163
diff changeset
   686
runsuite(tests);
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   687
24719
f726e9d67629 8035820: Optimistic recompilation
attila
parents: 20947
diff changeset
   688
pprint('\n' + runs + "/" + tests.length + " tests were successfully run in " + total_time + " ms ");
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   689
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   690
print("Sunspider finished!");