Skip to content

Instantly share code, notes, and snippets.

@retronym
Created August 21, 2013 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save retronym/6290932 to your computer and use it in GitHub Desktop.
Save retronym/6290932 to your computer and use it in GitHub Desktop.
cps leaks
src/compiler/scala/tools/nsc/ast/TreeGen.scala
161: // drop annotations generated by CPS plugin etc, since its annotationchecker rejects T @cps[U] <: Any
src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala
208: // [mkdir] Created dir: /scratch/trunk6/build/quick/classes/continuations-plugin
209: // [scalacfork] Compiling 5 files to /scratch/trunk6/build/quick/classes/continuations-plugin
src/compiler/scala/tools/nsc/Global.scala
1337: // val selectivecpsPhase = phaseNamed("selectivecps")
src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala
490: // TODO: can b.tpe ever be null? can't really use pt, see e.g. pos/t2683 or cps/match1.scala
src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala
87: // duplicated from CPSUtils (avoid dependency from compiler -> cps plugin...)
88: private lazy val MarkerCPSAdaptPlus = rootMirror.getClassIfDefined("scala.util.continuations.cpsPlus")
89: private lazy val MarkerCPSAdaptMinus = rootMirror.getClassIfDefined("scala.util.continuations.cpsMinus")
90: private lazy val MarkerCPSSynth = rootMirror.getClassIfDefined("scala.util.continuations.cpsSynth")
92: private lazy val MarkerCPSTypes = rootMirror.getClassIfDefined("scala.util.continuations.cpsParam")
131: // when one of the internal cps-type-state annotations is present, strip all CPS annotations
132: // a cps-type-state-annotated type makes no sense as an expected type (matchX.tpe is used as pt in translateMatch)
src/compiler/scala/tools/nsc/transform/UnCurry.scala
101: // motivation can be seen in continuations-neg/t3718.
src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala
253: // to get better error message already from the cps plugin itself
src/compiler/scala/tools/nsc/typechecker/Typers.scala
704: // @H this happens for example in cps annotation checker
2489: // withoutAnnotations - see continuations-run/z1673.scala
2490: // This adjustment is awfully specific to continuations, but AFAICS the
2601: // targs must conform to Any for us to synthesize an applyOrElse (fallback to apply otherwise -- typically for @cps annotated targs)
2738: // only used for @cps annotated partial functions
2766: // somehow @cps annotations upset the typer when looking at applyOrElse's signature, but not apply's
2767: // TODO: figure out the details (T @cps[U] is not a subtype of Any, but then why does it work for the apply method?)
4400: // for instance in continuations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment