This set of changes adds support for explicitly passing generic arguments as part of a generic function call. (The updated syntax and semantics of generics in Simit can be found here.) For example, the following program is now legal in Simit:
func foo<N,M>(A : matrix[M,M](float)) -> (B : matrix[N,N](float))
% ...
end
export func main()
var A : matrix[5,5](float) = 0.0;
% ...
B = foo<6>(A); % returns a matrix[6,6](float)
end
The front end has also been refactored so that classes and namespaces previously prefixed by "HIR" are now prefixed by "FIR" (short for "front-end IR") instead. Fixes for a number of minor bugs in the type checker are also included in this change set. Most of the non-trivial changes can be found in type_checker.cpp and parser.cpp.
This set of changes adds support for explicitly passing generic arguments as part of a generic function call. (The updated syntax and semantics of generics in Simit can be found here.) For example, the following program is now legal in Simit:
The front end has also been refactored so that classes and namespaces previously prefixed by "HIR" are now prefixed by "FIR" (short for "front-end IR") instead. Fixes for a number of minor bugs in the type checker are also included in this change set. Most of the non-trivial changes can be found in
type_checker.cpp
andparser.cpp
.