nashorn/test/script/basic/NASHORN-19.js.EXPECTED
author attila
Thu, 31 Jan 2013 18:34:42 +0100
changeset 16206 83069fa0935b
parent 16147 e63b63819133
permissions -rw-r--r--
8006529: Methods always get callee - it should be conditional Summary: This commit streamlines the bytecode function signatures, prologue, local variable use, scope creation, and invocation. It started out quite innocently when we noticed that we always emit __callee__ parameters for all functions even when they are not needed, but it turned out to be quite a deep rabbit hole. In the end, I identified exact conditions when functions need to have a callee parameter, when they need to receive parent scope, when they need to create their own scope, when they need to have variable arity signature, and when they need to have an "arguments" object, and made sure that callee parameters in signatures only show up when they are needed, that parent function's scope is only passed to a child function when it is needed, that the function only creates its own scope when it is needed. In crypto.js, the number of scopes dropped from 446 to 244, and the number of callees dropped from 315 to 145. Reviewed-by: jlaskey, lagergren
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     1
value is 'hello' as expected
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     2
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     3
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     4
starting 0
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     5
10
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     6
11
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     7
20
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     8
21
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     9
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    10
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    11
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    12
starting 1
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    13
10
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    14
11
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    15
20
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    16
21
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    17
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    18
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    19
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    20
starting 2
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    21
10
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    22
11
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    23
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    24
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    25
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    26
starting 3
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    27
loop header 0
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    28
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    29
loop header 1
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    30
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    31
loop header 2
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    32
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    33
loop header 3
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    34
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    35
loop header 4
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    36
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    37
loop header 5
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    38
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    39
loop header 6
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    40
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    41
loop header 7
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    42
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    43
loop header 8
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    44
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    45
loop header 9
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    46
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    47
loop header 0
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    48
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    49
loop header 1
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    50
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    51
loop header 2
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    52
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    53
loop header 3
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    54
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    55
loop header 4
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    56
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    57
loop header 5
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    58
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    59
loop header 6
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    60
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    61
loop header 7
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    62
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    63
loop header 8
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    64
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    65
loop header 9
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    66
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    67
loop header 0
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    68
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    69
loop header 1
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    70
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    71
loop header 2
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    72
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    73
loop header 3
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    74
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    75
loop header 4
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    76
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    77
loop header 5
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    78
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    79
loop header 6
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    80
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    81
loop header 7
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    82
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    83
loop header 8
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    84
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    85
loop header 9
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    86
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    87
loop header 0
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    88
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    89
loop header 1
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    90
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    91
loop header 2
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    92
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    93
loop header 3
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    94
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    95
loop header 4
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    96
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    97
loop header 5
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    98
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    99
loop header 6
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   100
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   101
loop header 7
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   102
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   103
loop header 8
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   104
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   105
loop header 9
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   106
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   107
loop header 0
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   108
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   109
loop header 1
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   110
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   111
loop header 2
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   112
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   113
loop header 3
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   114
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   115
loop header 4
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   116
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   117
loop header 5
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   118
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   119
loop header 6
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   120
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   121
loop header 7
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   122
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   123
loop header 8
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   124
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   125
loop header 9
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   126
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   127
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   128
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   129
starting 4
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   130
loop header 0
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   131
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   132
loop header 1
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   133
loop header 2
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   134
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   135
loop header 3
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   136
loop header 4
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   137
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   138
loop header 5
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   139
loop header 6
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   140
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   141
loop header 7
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   142
loop header 8
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   143
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   144
loop header 9
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   145
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   146
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   148
starting 5
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   149
loop header 0
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   150
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   151
loop header 0
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   152
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   153
loop header 0
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   154
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   155
loop header 0
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   156
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   157
loop header 0
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   158
continue
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   159
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   160
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   161
starting 6
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   162
loop header 0
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   163
break
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   164
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   165
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   166
starting 7
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   167
10
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   168
4711
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   169
20
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   170
17
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   171
inner
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   172
4711
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   173
outer
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   174
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   175
hello
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   176
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   177