nashorn/test/script/basic/NASHORN-377.js.EXPECTED
author attila
Thu, 31 Jan 2013 18:34:42 +0100
changeset 16206 83069fa0935b
parent 16147 e63b63819133
child 19638 bf08be79957a
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
8 8 true undefined
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     2
[object Object] [object Object] [object Object]
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     3
0 8 8 1
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     4
0 8 8 1
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     5
0 8 8 1
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     6
0 8 4 2
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     7
0 8 4 2
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     8
0 8 2 4
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     9
0 8 2 4
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    10
0 8 2 4
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    11
0 8 1 8
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    12
7071727374-807677 7071727374807677
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    13
727374-807677 2 6
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    14
72737480 2 4
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    15
71727374 1 4
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    16
717273748076
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    17
7372717077768074 1936879984 2004254836
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    18
73727170-1020305 1936879984 -16909061
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    19
73727170fefdfcfb 1936879984 4278058235
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    20
da0f4940fbfcfdfe 2
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    21
4ad8124dfb210940 1
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    22
4d12d84a400921fb 1293080650 1074340347
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    23
000000004ad8124dfb210940
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    24
-27b64d1221fb4009 d84a4d1221fb4009
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    25
00-1008021fb4009 ffff008021fb4009
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    26
0 1 2 3 4 5 6 7
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    27
0102030405060708
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    28
subarray(2,4)=0304 subarray(-6,-4)=0304
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    29
010203040506
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    30
03040506 0405
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    31
0102030405060708090a0b0c0d0e0f10
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    32
slice(4,8)=05060708 slice(-8,-4)=090a0b0c
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    33
0102030405060708090a0b0c
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    34
070609080b0a