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

set some untyped expressions

parent 7d1a9331
No related branches found
No related tags found
No related merge requests found
...@@ -77,7 +77,7 @@ object ArrayTransformation extends Pass { ...@@ -77,7 +77,7 @@ object ArrayTransformation extends Pass {
val length = TupleSelect(ar, 2).setType(Int32Type) val length = TupleSelect(ar, 2).setType(Int32Type)
IfExpr( IfExpr(
And(GreaterEquals(ir, IntLiteral(0)), LessThan(ir, length)), And(GreaterEquals(ir, IntLiteral(0)), LessThan(ir, length)),
ArraySelect(TupleSelect(ar, 1), ir).setType(sel.getType).setPosInfo(sel), ArraySelect(TupleSelect(ar, 1).setType(ArrayType(sel.getType)), ir).setType(sel.getType).setPosInfo(sel),
Error("Index out of bound").setType(sel.getType).setPosInfo(sel) Error("Index out of bound").setType(sel.getType).setPosInfo(sel)
).setType(sel.getType) ).setType(sel.getType)
} }
......
...@@ -100,6 +100,7 @@ object TypeTrees { ...@@ -100,6 +100,7 @@ object TypeTrees {
case UnitType => FiniteSize(1) case UnitType => FiniteSize(1)
case Int32Type => InfiniteSize case Int32Type => InfiniteSize
case ListType(_) => InfiniteSize case ListType(_) => InfiniteSize
case ArrayType(_) => InfiniteSize
case TupleType(bases) => { case TupleType(bases) => {
val baseSizes = bases.map(domainSize(_)) val baseSizes = bases.map(domainSize(_))
baseSizes.find(_ == InfiniteSize) match { baseSizes.find(_ == InfiniteSize) match {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment