nashorn/test/script/basic/compile-octane.js.EXPECTED
author lagergren
Wed, 30 Jan 2013 12:26:45 +0100
changeset 16201 889ddb179cdf
parent 16147 e63b63819133
child 16525 1409942e618e
permissions -rw-r--r--
8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes. Summary: Lower suffered from being a "God class" trying to do everything at once. As Nashorn code generation has grown, so has Lower. It does several post processing passes, tries to do several things at once even though all type information isn't in place, adjusting state afterwards and so on. It also performs control flow analysis, type attribution and constant folding, and everything else code generation related before byte code emission. I have now separated the compilation process into Lower (create low level nodes from high level ones, copy code such as finally block inlining etc), Attr (assign types and symbols to all nodes - freeze slot and scope information) and FinalizeTypes (insert explicit casts, specialize invoke dynamic types for scope accesses). I've removed the kludgy AccessSpecializer, as this now integrates naturally with typing. Everything is now much easier to read and each module performs only one thing. I have added separate loggers for the separate tiers. In the process I have also fixed: (1) problems with type coercion (see test/script/basic/typecoercion.js, basically our coercion was too late and our symbol inference was erroneous. This only manifested itself in very rare occasions where toNumber coercion has side effects, such as for example when valueOf is overridden) (2) copying literal nodes (literal copy did not use the superclass copy, which made all the Node specific fields not to be copied (3) erroneous literal tokenization (literals shouldn't always just inherit token information from whatever node that creates them) (4) splitter weighnodes - unary nodes were considered weightless (4) removed the hateful and kludgy "VarNode.shouldAppend", which really isn't needed when we have an attribution phase that determines self reference symbols (the only thing it was used for) (5) duplicate line number issues in the parser (6) convert bug in CodeGenerator for intermediate results of scope accesses (see test/script/basic/access-specializer.js) ... Several of these things just stopped being problems with the new architecture "can't happen anymore" and are not bug fixes per se. All tests run. No performance regressions exist that I've been able to measure. Some increases in performance were measured, but in the statistical margin of error (which is very wide as HotSpot currently has warmup issues with LambdaForms/invoke dynamic). Compile speed has not measurably increased. Reviewed-by: jlaskey, attila
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
     1
Compiling... box2d.js
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     2
Compiled OK: box2d.js
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
     3
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
     4
Compiling... code-load.js
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     5
Compiled OK: code-load.js
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
     6
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
     7
Compiling... crypto.js
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     8
Compiled OK: crypto.js
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
     9
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    10
Compiling... deltablue.js
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    11
Compiled OK: deltablue.js
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    12
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    13
Compiling... earley-boyer.js
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    14
Compiled OK: earley-boyer.js
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    15
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    16
Compiling... gbemu.js
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    17
Compiled OK: gbemu.js
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    18
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    19
Compiling... navier-stokes.js
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    20
Compiled OK: navier-stokes.js
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    21
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    22
Compiling... pdfjs.js
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    23
Compiled OK: pdfjs.js
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    24
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    25
Compiling... raytrace.js
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    26
Compiled OK: raytrace.js
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    27
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    28
Compiling... regexp.js
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    29
Compiled OK: regexp.js
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    30
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    31
Compiling... richards.js
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    32
Compiled OK: richards.js
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    33
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    34
Compiling... splay.js
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    35
Compiled OK: splay.js
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16147
diff changeset
    36