Implement (in a very simple way) CHAN OF ANY

This commit is contained in:
Adam Sampson 2007-04-26 22:26:48 +00:00
parent 39bbc1e10e
commit 8554d19d3a
2 changed files with 12 additions and 0 deletions

View File

@ -1386,6 +1386,10 @@ inputItem t
sColons
w <- variableOfType (makeArrayType A.UnknownDimension it)
return $ A.InCounted m v w
A.Any ->
do m <- md
v <- variable
return $ A.InVariable m v
_ ->
do m <- md
v <- variableOfType t
@ -1462,6 +1466,11 @@ outputItem t
sColons
b <- expressionOfType (makeArrayType A.UnknownDimension it)
return $ A.OutCounted m a b
A.Any ->
do m <- md
e <- expression
t <- typeOfExpression e
return $ A.OutExpression m e
_ ->
do m <- md
e <- expressionOfType t

View File

@ -47,6 +47,9 @@ calls have been removed, and so on.
## C backend
Array outputs of dynamically-sized slices won't work (genBytesInType needs to
know the size of the array it's dealing with).
We could have genSpec generate {} around specs if it's not immediately inside
another spec (which'd require some extra boolean arguments to find out).