diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-12-16 14:05:37 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2016-01-20 12:19:52 +0100 |
commit | 4eee5e088eb72ba00aa4b02a03a1bcf27b5d751b (patch) | |
tree | 5d2c274e965a235cc4f23e9a37f23d1ac216b2e5 /src/library-aux | |
parent | 118aa366782f9f27b13710122686c609c6731dfd (diff) | |
download | scala-4eee5e088eb72ba00aa4b02a03a1bcf27b5d751b.tar.gz scala-4eee5e088eb72ba00aa4b02a03a1bcf27b5d751b.tar.bz2 scala-4eee5e088eb72ba00aa4b02a03a1bcf27b5d751b.zip |
Run DCE before the closure optimizer (fixes a crash)
Before identifying function callsites within the same method as a
closure allocation, run DCE. The ProdCons analysis used to identify
these function calls may crash if there is unreachable code, as
observed in the community build with scala-js.
The crash was rare because inlining, which is performed before closure
optimizations, already runs DCE. However, inlining may render more
code unreachable (e.g. when inlining a method that throws).
Also make sure that DCE is always performed on the callee before
inlining: move the DCE invocation into the inlineCallsite method,
which is also invoked by the closure optimizer.
Diffstat (limited to 'src/library-aux')
0 files changed, 0 insertions, 0 deletions