nashorn/test/script/basic/JDK-8038945.js
author hannesw
Wed, 25 Jun 2014 14:36:24 +0200
changeset 25243 7a1edca6ce94
parent 24778 2ff5d7041566
permissions -rw-r--r--
8048079: Persistent code store is broken after optimistic types merge Reviewed-by: sundar, jlaskey, attila
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24735
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
     1
/*
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
     2
 * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
     4
 *
24735
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
     7
 * published by the Free Software Foundation.
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
     8
 *
24735
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    13
 * accompanied this code).
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
    14
 *
24735
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
    18
 *
24735
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    21
 * questions.
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    22
 */
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    23
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    24
/**
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    25
 * JDK-8038945.js : test various undefined strict intrinsics and that they
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    26
 * aren't erroneously applied when undefined is in any scope but global
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
    27
 *
24735
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    28
 * @test
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    29
 * @run
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    30
 */
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    31
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    32
//:program internals={print=0, f1=0, f2=0, f3=0, f4=0, undefined=0, f5=0} externals=null
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    33
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    34
//f1 internals={} externals={undefined=0}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    35
function f1(x) {
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    36
    return x === undefined;
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    37
}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    38
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    39
//f2 internals={} externals=null
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    40
function f2(x, undefined) {
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    41
    return x === undefined;
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    42
}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    43
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    44
//f3 internals={x=0} externals=null
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    45
function f3(x) {
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    46
    //f3$f3_2 internals={} externals={x=0}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    47
    function f3_2(undefined) {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
    48
    return x === undefined;
24735
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    49
    }
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    50
    return f3_2(17);
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    51
}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    52
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    53
//f4 internals={x=0} externals=null
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    54
function f4(x) {
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    55
    //f4$f4_2 internals={} externals={x=0}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    56
    function f4_2() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
    57
    var undefined = 17;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
    58
    return x === undefined;
24735
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    59
    }
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    60
    return f4_2();
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    61
}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    62
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    63
//f5 internals={x=0, undefined=0} externals=null
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    64
function f5(x) {
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    65
    var undefined = 17;
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    66
    //f5$f5_2 internals={} externals={x=0, undefined=0}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    67
    function f5_2() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
    68
    return x === undefined;
24735
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    69
    }
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    70
    return f5_2();
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    71
}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    72
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    73
print(" 1: " + f1(17) + " === false");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    74
print(" 2: " + f2(17) + " === false");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    75
print(" 3: " + f3(17) + " === true");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    76
print(" 4: " + f4(17) + " === true");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    77
print(" 5: " + f5(17) + " === true");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    78
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    79
//recompile
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    80
print(" 6: " + f1("17") + " === false");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    81
print(" 7: " + f2("17") + " === false");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    82
print(" 8: " + f3("17") + " === false");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    83
print(" 9: " + f4("17") + " === false");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    84
print("10: " + f5("17") + " === false");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    85
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    86
//g1 internals={} externals={undefined=0}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    87
function g1(x) {
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    88
    return x !== undefined;
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    89
}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    90
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    91
//g2 internals={} externals=null
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    92
function g2(x, undefined) {
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    93
    return x !== undefined;
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    94
}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    95
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    96
//g3 internals={x=0} externals=null
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    97
function g3(x) {
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    98
    //g3$g3_2 internals={} externals={x=0}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
    99
    function g3_2(undefined) {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
   100
    return x !== undefined;
24735
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   101
    }
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   102
    return g3_2(17);
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   103
}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   104
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   105
//g4 internals={x=0} externals=null
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   106
function g4(x) {
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   107
    //f4$f4_2 internals={} externals={x=0}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   108
    function g4_2() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
   109
    var undefined = 17;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
   110
    return x !== undefined;
24735
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   111
    }
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   112
    return g4_2();
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   113
}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   114
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   115
//g5 internals={x=0, undefined=0} externals=null
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   116
function g5(x) {
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   117
    var undefined = 17;
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   118
    //g5$g5_2 internals={} externals={x=0, undefined=0}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   119
    function g5_2() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
   120
    return x !== undefined;
24735
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   121
    }
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   122
    return g5_2();
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   123
}
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   124
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   125
print("11: " + g1(17) + " === true");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   126
print("12: " + g2(17) + " === true");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   127
print("13: " + g3(17) + " === false");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   128
print("14: " + g4(17) + " === false");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   129
print("15: " + g5(17) + " === false");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   130
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   131
//recompile
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   132
print("16: " + g1("17") + " === true");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   133
print("17: " + g2("17") + " === true");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   134
print("18: " + g3("17") + " === true");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   135
print("19: " + g4("17") + " === true");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   136
print("20: " + g5("17") + " === true");
9833d3ceed5b 8038945: Simplify strict undefined checks
lagergren
parents:
diff changeset
   137
24736
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   138
//h1 internals={} externals={undefined=0}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   139
function h1(x) {
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   140
    return undefined === x;
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   141
}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   142
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   143
//h2 internals={} externals=null
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   144
function h2(x, undefined) {
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   145
    return undefined === x;
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   146
}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   147
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   148
//h3 internals={x=0} externals=null
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   149
function h3(x) {
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   150
    //h3$f3_2 internals={} externals={x=0}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   151
    function h3_2(undefined) {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
   152
    return undefined === x;
24736
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   153
    }
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   154
    return h3_2(17);
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   155
}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   156
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   157
//h4 internals={x=0} externals=null
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   158
function h4(x) {
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   159
    //h4$h4_2 internals={} externals={x=0}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   160
    function h4_2() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
   161
    var undefined = 17;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
   162
    return undefined === x;
24736
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   163
    }
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   164
    return h4_2();
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   165
}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   166
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   167
//h5 internals={x=0, undefined=0} externals=null
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   168
function h5(x) {
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   169
    var undefined = 17;
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   170
    //h5$h5_2 internals={} externals={x=0, undefined=0}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   171
    function h5_2() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
   172
    return undefined === x;
24736
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   173
    }
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   174
    return h5_2();
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   175
}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   176
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   177
print("21: " + h1(17) + " === false");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   178
print("22: " + h2(17) + " === false");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   179
print("23: " + h3(17) + " === true");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   180
print("24: " + h4(17) + " === true");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   181
print("25: " + h5(17) + " === true");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   182
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   183
//recompile
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   184
print("26: " + h1("17") + " === false");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   185
print("27: " + h2("17") + " === false");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   186
print("28: " + h3("17") + " === false");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   187
print("29: " + h4("17") + " === false");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   188
print("30: " + h5("17") + " === false");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   189
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   190
//i1 internals={} externals={undefined=0}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   191
function i1(x) {
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   192
    return undefined !== x;
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   193
}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   194
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   195
//i2 internals={} externals=null
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   196
function i2(x, undefined) {
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   197
    return undefined !== x;
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   198
}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   199
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   200
//i3 internals={x=0} externals=null
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   201
function i3(x) {
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   202
    //i3$f3_2 internals={} externals={x=0}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   203
    function i3_2(undefined) {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
   204
    return undefined !== x;
24736
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   205
    }
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   206
    return i3_2(17);
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   207
}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   208
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   209
//i4 internals={x=0} externals=null
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   210
function i4(x) {
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   211
    //i4$i4_2 internals={} externals={x=0}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   212
    function i4_2() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
   213
    var undefined = 17;
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
   214
    return undefined !== x;
24736
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   215
    }
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   216
    return i4_2();
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   217
}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   218
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   219
//h5 internals={x=0, undefined=0} externals=null
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   220
function i5(x) {
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   221
    var undefined = 17;
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   222
    //i5$i5_2 internals={} externals={x=0, undefined=0}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   223
    function i5_2() {
24778
2ff5d7041566 8044638: Tidy up Nashorn codebase for code standards
attila
parents: 24736
diff changeset
   224
    return undefined !== x;
24736
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   225
    }
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   226
    return i5_2();
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   227
}
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   228
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   229
print("31: " + i1(17) + " === true");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   230
print("32: " + i2(17) + " === true");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   231
print("33: " + i3(17) + " === false");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   232
print("34: " + i4(17) + " === false");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   233
print("35: " + i5(17) + " === false");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   234
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   235
//recompile
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   236
print("36: " + i1("17") + " === true");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   237
print("37: " + i2("17") + " === true");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   238
print("38: " + i3("17") + " === true");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   239
print("39: " + i4("17") + " === true");
4e7eba3d014b 8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
lagergren
parents: 24735
diff changeset
   240
print("40: " + i5("17") + " === true");