aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2013-10-22 15:15:42 +0200
committerPhilipp Haller <hallerp@gmail.com>2013-10-22 15:15:42 +0200
commit9ac022c1329e06da1f4dd45abc24e6d482bfbdaf (patch)
tree1c871fc7394244a13a783c428c7fc2dd4250490a
parent01b11f71fadf60c8dbf2f5f38f32ec82c437feb0 (diff)
downloadscala-async-9ac022c1329e06da1f4dd45abc24e6d482bfbdaf.tar.gz
scala-async-9ac022c1329e06da1f4dd45abc24e6d482bfbdaf.tar.bz2
scala-async-9ac022c1329e06da1f4dd45abc24e6d482bfbdaf.zip
Add more doc comments
-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