Skip to content
Snippets Groups Projects
Commit 276e845e authored by Régis Blanc's avatar Régis Blanc
Browse files

fix some comments

parent cae53cef
Branches
Tags
No related merge requests found
...@@ -923,7 +923,7 @@ object TreeOps { ...@@ -923,7 +923,7 @@ object TreeOps {
case _ => throw new Exception("I can't choose simplest value for type " + tpe) case _ => throw new Exception("I can't choose simplest value for type " + tpe)
} }
//guarentee that all IfExpr will be at the top level and as soon as you encounter a non-IfExpr, then no more IfExpr can be find in the sub-expressions //guarentee that all IfExpr will be at the top level and as soon as you encounter a non-IfExpr, then no more IfExpr can be found in the sub-expressions
//require no-match, no-ets and only pure code //require no-match, no-ets and only pure code
def hoistIte(expr: Expr): Expr = { def hoistIte(expr: Expr): Expr = {
def transform(expr: Expr): Option[Expr] = expr match { def transform(expr: Expr): Option[Expr] = expr match {
......
...@@ -88,7 +88,7 @@ object Trees { ...@@ -88,7 +88,7 @@ object Trees {
} }
} }
// This must be 1-indexed ! // This must be 1-indexed ! (So are methods of Scala Tuples)
case class TupleSelect(tuple: Expr, index: Int) extends Expr { case class TupleSelect(tuple: Expr, index: Int) extends Expr {
assert(index >= 1) assert(index >= 1)
} }
...@@ -400,8 +400,8 @@ object Trees { ...@@ -400,8 +400,8 @@ object Trees {
case class ArrayFill(length: Expr, defaultValue: Expr) extends Expr case class ArrayFill(length: Expr, defaultValue: Expr) extends Expr
case class ArrayMake(defaultValue: Expr) extends Expr case class ArrayMake(defaultValue: Expr) extends Expr
case class ArraySelect(array: Expr, index: Expr) extends Expr with ScalacPositional case class ArraySelect(array: Expr, index: Expr) extends Expr with ScalacPositional
//the difference between ArrayUpdate and ArrayUpdated is that the former has a side effect while the latter is the function variant //the difference between ArrayUpdate and ArrayUpdated is that the former has a side effect while the latter is the functional version
//ArrayUpdate should be eliminated soon in the analysis while ArrayUpdated is keep all the way to the backend //ArrayUpdate should be eliminated soon in the analysis while ArrayUpdated is kept all the way to the backend
case class ArrayUpdate(array: Expr, index: Expr, newValue: Expr) extends Expr with ScalacPositional with FixedType { case class ArrayUpdate(array: Expr, index: Expr, newValue: Expr) extends Expr with ScalacPositional with FixedType {
val fixedType = UnitType val fixedType = UnitType
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment