TiarkRompf / virtualization-lms-core

A Framework for Runtime Code Generation and Compiled DSLs
http://scala-lms.github.com
BSD 3-Clause "New" or "Revised" License
324 stars 91 forks source link

CPS transformers #42

Open TiarkRompf opened 11 years ago

TiarkRompf commented 11 years ago

Allow to capture continuations during transformation. This will allow to translate

sleep(100)

into

sleepAsync(100) {
  ... // rest
}

without @cps annotations on the original sleep method.

Code motion is performed before and after the transform, which provides complementary optimizations.