From 672c1356ef146e8da1f1bd6157df95a2b9c2101b Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 10 Sep 2010 15:14:58 +0000 Subject: Renamed a file to soothe ant. No review. --- .../backend/icode/analysis/CompleteLattice.scala | 46 ---------------------- .../nsc/backend/icode/analysis/SemiLattice.scala | 46 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 46 deletions(-) delete mode 100644 src/compiler/scala/tools/nsc/backend/icode/analysis/CompleteLattice.scala create mode 100644 src/compiler/scala/tools/nsc/backend/icode/analysis/SemiLattice.scala diff --git a/src/compiler/scala/tools/nsc/backend/icode/analysis/CompleteLattice.scala b/src/compiler/scala/tools/nsc/backend/icode/analysis/CompleteLattice.scala deleted file mode 100644 index 10c03f4455..0000000000 --- a/src/compiler/scala/tools/nsc/backend/icode/analysis/CompleteLattice.scala +++ /dev/null @@ -1,46 +0,0 @@ -/* NSC -- new Scala compiler - * Copyright 2005-2010 LAMP/EPFL - * @author Martin Odersky - */ - - -package scala.tools.nsc -package backend.icode.analysis - -/** A complete lattice. - */ -trait SemiLattice { - type Elem <: AnyRef - - /** Hold together local variable and stack state. The - * equals method uses reference equality for top and bottom, - * and structural equality for other values. - */ - case class IState[V, S](val vars: V, val stack: S) { - override def equals(other: Any): Boolean = other match { - case that: IState[_, _] => - if ((this eq bottom) || (that eq bottom)) this eq that - else if ((this eq top) || (that eq top)) this eq that - else (stack == that.stack && vars == that.vars) - case _ => false - } - } - - /** Return the least upper bound of a and b */ - def lub2(exceptional: Boolean)(a: Elem, b: Elem): Elem - - /** Return the top element. */ - def top: Elem - - /** Return the bottom element. */ - def bottom: Elem - - /** Compute the least upper bound of a list of elements. */ - def lub(xs: List[Elem], exceptional: Boolean): Elem = try { - if (xs == Nil) bottom else xs reduceLeft lub2(exceptional) - } catch { - case e: LubException => - Console.println("Lub on blocks: " + xs) - throw e - } -} diff --git a/src/compiler/scala/tools/nsc/backend/icode/analysis/SemiLattice.scala b/src/compiler/scala/tools/nsc/backend/icode/analysis/SemiLattice.scala new file mode 100644 index 0000000000..10c03f4455 --- /dev/null +++ b/src/compiler/scala/tools/nsc/backend/icode/analysis/SemiLattice.scala @@ -0,0 +1,46 @@ +/* NSC -- new Scala compiler + * Copyright 2005-2010 LAMP/EPFL + * @author Martin Odersky + */ + + +package scala.tools.nsc +package backend.icode.analysis + +/** A complete lattice. + */ +trait SemiLattice { + type Elem <: AnyRef + + /** Hold together local variable and stack state. The + * equals method uses reference equality for top and bottom, + * and structural equality for other values. + */ + case class IState[V, S](val vars: V, val stack: S) { + override def equals(other: Any): Boolean = other match { + case that: IState[_, _] => + if ((this eq bottom) || (that eq bottom)) this eq that + else if ((this eq top) || (that eq top)) this eq that + else (stack == that.stack && vars == that.vars) + case _ => false + } + } + + /** Return the least upper bound of a and b */ + def lub2(exceptional: Boolean)(a: Elem, b: Elem): Elem + + /** Return the top element. */ + def top: Elem + + /** Return the bottom element. */ + def bottom: Elem + + /** Compute the least upper bound of a list of elements. */ + def lub(xs: List[Elem], exceptional: Boolean): Elem = try { + if (xs == Nil) bottom else xs reduceLeft lub2(exceptional) + } catch { + case e: LubException => + Console.println("Lub on blocks: " + xs) + throw e + } +} -- cgit v1.2.3