aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/scala/async/internal/LiveVariables.scala9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/scala/scala/async/internal/LiveVariables.scala b/src/main/scala/scala/async/internal/LiveVariables.scala
index 0f95bca..4d8c479 100644
--- a/src/main/scala/scala/async/internal/LiveVariables.scala
+++ b/src/main/scala/scala/async/internal/LiveVariables.scala
@@ -9,6 +9,11 @@ trait LiveVariables {
/**
* Returns for a given state a list of fields (as trees) that should be nulled out
* upon resuming that state (at the beginning of `resume`).
+ *
+ * @param asyncStates the states of an `async` block
+ * @param liftables the lifted fields
+ * @return a map mapping a state to the fields that should be nulled out
+ * upon resuming that state
*/
def fieldsToNullOut(asyncStates: List[AsyncState], liftables: List[Tree]): Map[Int, List[Tree]] = {
// live variables analysis:
@@ -38,7 +43,9 @@ trait LiveVariables {
* (possible through loops), the corresponding field should be nulled out (at the beginning of
* `resume`).
*
- * @return a map which indicates for a given field (the key) the states in which it should be nulled out
+ * @param asyncStates the states of an `async` block
+ * @param liftables the lifted fields
+ * @return a map which indicates for a given field (the key) the states in which it should be nulled out
*/
def liveVars(asyncStates: List[AsyncState], liftables: List[Tree]): Map[Tree, Set[Int]] = {
val liftedSyms: Set[Symbol] = // include only vars