Details
-
Enhancement
-
Resolution: Future Project
-
P5
-
10
-
None
-
generic
-
generic
Description
In JDK-8133300 we decided on not caching ASTs resulting from the compilation pre-pass. The main reason for this is a surprising difficulty of making it play nicely with apply-to-call (a2c) specialization (a2c generates specialized function signatures for a normally varargs-only function, so the resulting AST is inherently specific to the type specialization arity and thus non-cacheable). However, this results in inability to cache pre-pass ASTs in general (except for split functions), while that might still be desirable to further eliminate processing time.
Caching pre-pass non-split ASTs is desirable; in order to implement it we need to:
- make sure ApplySpecialization is rewritten so that it marks all transformation-subjected functions as non-cacheable
- make sure Symbol.useCount is recomputed when the function is cached
- make sure any other possible discrepancies between eager and on-demand compilation are smoothed over.
Caching pre-pass non-split ASTs is desirable; in order to implement it we need to:
- make sure ApplySpecialization is rewritten so that it marks all transformation-subjected functions as non-cacheable
- make sure Symbol.useCount is recomputed when the function is cached
- make sure any other possible discrepancies between eager and on-demand compilation are smoothed over.
Attachments
Issue Links
- relates to
-
JDK-8029952 Parser doesn't scale well for large literals
-
- Closed
-
-
JDK-8133300 Ensure symbol table immutability in Nashorn AST
-
- Resolved
-