aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/scala/async/internal/AnfTransform.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2017-08-10 16:31:53 +1000
committerJason Zaugg <jzaugg@gmail.com>2017-09-27 13:42:58 +1000
commit2e381166b0983c3713ceadd15ab9cad390d65684 (patch)
tree9dbbf54b6f9244323d6849ec0bcbdb0dbee18aea /src/main/scala/scala/async/internal/AnfTransform.scala
parentff6bb1f41f8cdf2de469a161acdd8365ad6ae1f3 (diff)
downloadscala-async-2e381166b0983c3713ceadd15ab9cad390d65684.tar.gz
scala-async-2e381166b0983c3713ceadd15ab9cad390d65684.tar.bz2
scala-async-2e381166b0983c3713ceadd15ab9cad390d65684.zip
Eliminate dead states
If a state does nothing but unconditionally transition to the next state, remove it and rewrite predecessors to directly jump to the successor state (or to the first non-dead successor.) While we're doing this, compact the remaining state IDs to be contiguous, which will allow use of a tableswitch in bytecode. Sample bytecode demonstrating a tableswitch: https://gist.github.com/retronym/6880c35b501fc1c91bed7f30c0f2c045
Diffstat (limited to 'src/main/scala/scala/async/internal/AnfTransform.scala')
0 files changed, 0 insertions, 0 deletions