@@ -330,7 +330,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
330330 }
331331
332332 /** The purity level of this expression.
333- * @return PurePath if expression has no side effects and cannot contain local definitions
333+ * @return SimplyPure if expression has no side effects and cannot contain local definitions
334334 * Pure if expression has no side effects
335335 * Idempotent if running the expression a second time has no side effects
336336 * Impure otherwise
@@ -346,7 +346,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
346346 | Super (_, _)
347347 | Literal (_)
348348 | Closure (_, _, _) =>
349- PurePath
349+ SimplyPure
350350 case Ident (_) =>
351351 refPurity(tree)
352352 case Select (qual, _) =>
@@ -383,26 +383,26 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
383383
384384 private def minOf (l0 : PurityLevel , ls : List [PurityLevel ]) = (l0 /: ls)(_ min _)
385385
386- def isPurePath (tree : Tree )(implicit ctx : Context ) = exprPurity(tree) == PurePath
386+ def isSimplyPure (tree : Tree )(implicit ctx : Context ) = exprPurity(tree) == SimplyPure
387387 def isPureExpr (tree : Tree )(implicit ctx : Context ) = exprPurity(tree) >= Pure
388388 def isIdempotentExpr (tree : Tree )(implicit ctx : Context ) = exprPurity(tree) >= Idempotent
389389
390390 /** The purity level of this reference.
391391 * @return
392- * PurePath if reference is (nonlazy and stable) or to a parameterized function
392+ * SimplyPure if reference is (nonlazy and stable) or to a parameterized function
393393 * Idempotent if reference is lazy and stable
394394 * Impure otherwise
395395 * @DarkDimius: need to make sure that lazy accessor methods have Lazy and Stable
396396 * flags set.
397397 */
398398 private def refPurity (tree : Tree )(implicit ctx : Context ): PurityLevel =
399- if (! tree.tpe.widen.isParameterless) PurePath
399+ if (! tree.tpe.widen.isParameterless) SimplyPure
400400 else if (! tree.symbol.isStable) Impure
401401 else if (tree.symbol.is(Lazy )) Idempotent // TODO add Module flag, sinxce Module vals or not Lazy from the start.
402- else PurePath
402+ else SimplyPure
403403
404404 def isPureRef (tree : Tree )(implicit ctx : Context ) =
405- refPurity(tree) == PurePath
405+ refPurity(tree) == SimplyPure
406406 def isIdempotentRef (tree : Tree )(implicit ctx : Context ) =
407407 refPurity(tree) >= Idempotent
408408
@@ -726,7 +726,7 @@ object TreeInfo {
726726 def min (that : PurityLevel ) = new PurityLevel (x min that.x)
727727 }
728728
729- val PurePath = new PurityLevel (3 )
729+ val SimplyPure = new PurityLevel (3 )
730730 val Pure = new PurityLevel (2 )
731731 val Idempotent = new PurityLevel (1 )
732732 val Impure = new PurityLevel (0 )
0 commit comments