Index: c/AST/Eval.hpp
===================================================================
--- src/AST/Eval.hpp	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
+++ 	(revision )
@@ -1,37 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// Eval.hpp --
-//
-// Author           : Aaron B. Moss
-// Created On       : Fri Jun 28 14:00:00 2019
-// Last Modified By : Aaron B. Moss
-// Created On       : Fri Jun 28 14:00:00 2019
-// Update Count     : 1
-//
-
-#include <string>
-#include <utility>
-
-#include "Expr.hpp"
-
-namespace ast {
-
-/// Create a new UntypedExpr with the given arguments
-template< typename... Args >
-UntypedExpr * call( const CodeLocation & loc, const std::string & name, Args &&... args ) {
-	return new UntypedExpr {
-		loc, new NameExpr { loc, name },
-		std::vector< ptr< Expr > > { std::forward< Args >( args )... } };
-}
-
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/AST/Expr.cpp
===================================================================
--- src/AST/Expr.cpp	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
+++ src/AST/Expr.cpp	(revision e6cf857ff39724482e399cbcb2a9231afb662b65)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 15 17:00:00 2019
 // Last Modified By : Andrew Beach
-// Created On       : Tue Nov 30 14:23:00 2021
-// Update Count     : 7
+// Created On       : Wed May 18 13:56:00 2022
+// Update Count     : 8
 //
 
@@ -21,5 +21,4 @@
 
 #include "Copy.hpp"                // for shallowCopy
-#include "Eval.hpp"                // for call
 #include "GenericSubstitution.hpp"
 #include "LinkageSpec.hpp"
@@ -67,8 +66,13 @@
 // --- UntypedExpr
 
+bool UntypedExpr::get_lvalue() const {
+	std::string fname = InitTweak::getFunctionName( this );
+	return lvalueFunctionNames.count( fname );
+}
+
 UntypedExpr * UntypedExpr::createDeref( const CodeLocation & loc, const Expr * arg ) {
 	assert( arg );
 
-	UntypedExpr * ret = call( loc, "*?", arg );
+	UntypedExpr * ret = createCall( loc, "*?", { arg } );
 	if ( const Type * ty = arg->result ) {
 		const Type * base = InitTweak::getPointerBase( ty );
@@ -87,13 +91,8 @@
 }
 
-bool UntypedExpr::get_lvalue() const {
-	std::string fname = InitTweak::getFunctionName( this );
-	return lvalueFunctionNames.count( fname );
-}
-
 UntypedExpr * UntypedExpr::createAssign( const CodeLocation & loc, const Expr * lhs, const Expr * rhs ) {
 	assert( lhs && rhs );
 
-	UntypedExpr * ret = call( loc, "?=?", lhs, rhs );
+	UntypedExpr * ret = createCall( loc, "?=?", { lhs, rhs } );
 	if ( lhs->result && rhs->result ) {
 		// if both expressions are typed, assumes that this assignment is a C bitwise assignment,
@@ -102,4 +101,10 @@
 	}
 	return ret;
+}
+
+UntypedExpr * UntypedExpr::createCall( const CodeLocation & loc,
+		const std::string & name, std::vector<ptr<Expr>> && args ) {
+	return new UntypedExpr( loc,
+			new NameExpr( loc, name ), std::move( args ) );
 }
 
Index: src/AST/Expr.hpp
===================================================================
--- src/AST/Expr.hpp	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
+++ src/AST/Expr.hpp	(revision e6cf857ff39724482e399cbcb2a9231afb662b65)
@@ -230,4 +230,7 @@
 	/// Creates a new assignment expression
 	static UntypedExpr * createAssign( const CodeLocation & loc, const Expr * lhs, const Expr * rhs );
+	/// Creates a new call of a variable.
+	static UntypedExpr * createCall( const CodeLocation & loc,
+		const std::string & name, std::vector<ptr<Expr>> && args );
 
 	const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
Index: src/AST/module.mk
===================================================================
--- src/AST/module.mk	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
+++ src/AST/module.mk	(revision e6cf857ff39724482e399cbcb2a9231afb662b65)
@@ -29,5 +29,4 @@
 	AST/DeclReplacer.cpp \
 	AST/DeclReplacer.hpp \
-	AST/Eval.hpp \
 	AST/Expr.cpp \
 	AST/Expr.hpp \
Index: src/SymTab/Autogen.h
===================================================================
--- src/SymTab/Autogen.h	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
+++ src/SymTab/Autogen.h	(revision e6cf857ff39724482e399cbcb2a9231afb662b65)
@@ -21,5 +21,4 @@
 
 #include "AST/Decl.hpp"
-#include "AST/Eval.hpp"
 #include "AST/Expr.hpp"
 #include "AST/Init.hpp"
@@ -71,6 +70,6 @@
 	template< typename OutIter >
 	ast::ptr< ast::Stmt > genCall(
-		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam, 
-		const CodeLocation & loc, const std::string & fname, OutIter && out, 
+		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam,
+		const CodeLocation & loc, const std::string & fname, OutIter && out,
 		const ast::Type * type, const ast::Type * addCast, LoopDirection forward = LoopForward );
 
@@ -128,12 +127,12 @@
 	}
 
-	/// inserts into out a generated call expression to function fname with arguments dstParam and 
+	/// inserts into out a generated call expression to function fname with arguments dstParam and
 	/// srcParam. Should only be called with non-array types.
-	/// optionally returns a statement which must be inserted prior to the containing loop, if 
+	/// optionally returns a statement which must be inserted prior to the containing loop, if
 	/// there is one
 	template< typename OutIter >
-	ast::ptr< ast::Stmt > genScalarCall( 
-		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam, 
-		const CodeLocation & loc, std::string fname, OutIter && out, const ast::Type * type, 
+	ast::ptr< ast::Stmt > genScalarCall(
+		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam,
+		const CodeLocation & loc, std::string fname, OutIter && out, const ast::Type * type,
 		const ast::Type * addCast = nullptr
 	) {
@@ -153,13 +152,13 @@
 
 		if ( addCast ) {
-			// cast to T& with qualifiers removed, so that qualified objects can be constructed and 
-			// destructed with the same functions as non-qualified objects. Unfortunately, lvalue 
-			// is considered a qualifier - for AddressExpr to resolve, its argument must have an 
+			// cast to T& with qualifiers removed, so that qualified objects can be constructed and
+			// destructed with the same functions as non-qualified objects. Unfortunately, lvalue
+			// is considered a qualifier - for AddressExpr to resolve, its argument must have an
 			// lvalue-qualified type, so remove all qualifiers except lvalue.
 			// xxx -- old code actually removed lvalue too...
 			ast::ptr< ast::Type > guard = addCast;  // prevent castType from mutating addCast
 			ast::ptr< ast::Type > castType = addCast;
-			ast::remove_qualifiers( 
-				castType, 
+			ast::remove_qualifiers(
+				castType,
 				ast::CV::Const | ast::CV::Volatile | ast::CV::Restrict | ast::CV::Atomic );
 			dstParam = new ast::CastExpr{ dstParam, new ast::ReferenceType{ castType } };
@@ -181,5 +180,5 @@
 
 		srcParam.clearArrayIndices();
-		
+
 		return listInit;
 	}
@@ -249,12 +248,12 @@
 	}
 
-	/// Store in out a loop which calls fname on each element of the array with srcParam and 
+	/// Store in out a loop which calls fname on each element of the array with srcParam and
 	/// dstParam as arguments. If forward is true, loop goes from 0 to N-1, else N-1 to 0
 	template< typename OutIter >
 	void genArrayCall(
-		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam, 
-		const CodeLocation & loc, const std::string & fname, OutIter && out, 
-		const ast::ArrayType * array, const ast::Type * addCast = nullptr, 
-		LoopDirection forward = LoopForward 
+		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam,
+		const CodeLocation & loc, const std::string & fname, OutIter && out,
+		const ast::ArrayType * array, const ast::Type * addCast = nullptr,
+		LoopDirection forward = LoopForward
 	) {
 		static UniqueName indexName( "_index" );
@@ -279,6 +278,6 @@
 		} else {
 			// generate: for ( int i = N-1; i >= 0; --i )
-			begin = ast::call( 
-				loc, "?-?", array->dimension, ast::ConstantExpr::from_int( loc, 1 ) );
+			begin = ast::UntypedExpr::createCall( loc, "?-?",
+				{ array->dimension, ast::ConstantExpr::from_int( loc, 1 ) } );
 			end = ast::ConstantExpr::from_int( loc, 0 );
 			cmp = "?>=?";
@@ -286,16 +285,19 @@
 		}
 
-		ast::ptr< ast::DeclWithType > index = new ast::ObjectDecl{ 
-			loc, indexName.newName(), new ast::BasicType{ ast::BasicType::SignedInt }, 
+		ast::ptr< ast::DeclWithType > index = new ast::ObjectDecl{
+			loc, indexName.newName(), new ast::BasicType{ ast::BasicType::SignedInt },
 			new ast::SingleInit{ loc, begin } };
 		ast::ptr< ast::Expr > indexVar = new ast::VariableExpr{ loc, index };
-		
-		ast::ptr< ast::Expr > cond = ast::call( loc, cmp, indexVar, end );
-		
-		ast::ptr< ast::Expr > inc = ast::call( loc, update, indexVar );
-		
-		ast::ptr< ast::Expr > dstIndex = ast::call( loc, "?[?]", dstParam, indexVar );
-		
-		// srcParam must keep track of the array indices to build the source parameter and/or 
+
+		ast::ptr< ast::Expr > cond = ast::UntypedExpr::createCall(
+			loc, cmp, { indexVar, end } );
+
+		ast::ptr< ast::Expr > inc = ast::UntypedExpr::createCall(
+			loc, update, { indexVar } );
+
+		ast::ptr< ast::Expr > dstIndex = ast::UntypedExpr::createCall(
+			loc, "?[?]", { dstParam, indexVar } );
+
+		// srcParam must keep track of the array indices to build the source parameter and/or
 		// array list initializer
 		srcParam.addArrayIndex( indexVar, array->dimension );
@@ -303,8 +305,8 @@
 		// for stmt's body, eventually containing call
 		ast::CompoundStmt * body = new ast::CompoundStmt{ loc };
-		ast::ptr< ast::Stmt > listInit = genCall( 
-			srcParam, dstIndex, loc, fname, std::back_inserter( body->kids ), array->base, addCast, 
+		ast::ptr< ast::Stmt > listInit = genCall(
+			srcParam, dstIndex, loc, fname, std::back_inserter( body->kids ), array->base, addCast,
 			forward );
-		
+
 		// block containing the stmt and index variable
 		ast::CompoundStmt * block = new ast::CompoundStmt{ loc };
@@ -328,15 +330,15 @@
 	template< typename OutIter >
 	ast::ptr< ast::Stmt > genCall(
-		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam, 
-		const CodeLocation & loc, const std::string & fname, OutIter && out, 
+		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam,
+		const CodeLocation & loc, const std::string & fname, OutIter && out,
 		const ast::Type * type, const ast::Type * addCast, LoopDirection forward
 	) {
 		if ( auto at = dynamic_cast< const ast::ArrayType * >( type ) ) {
-			genArrayCall( 
-				srcParam, dstParam, loc, fname, std::forward< OutIter >(out), at, addCast, 
+			genArrayCall(
+				srcParam, dstParam, loc, fname, std::forward< OutIter >(out), at, addCast,
 				forward );
 			return {};
 		} else {
-			return genScalarCall( 
+			return genScalarCall(
 				srcParam, dstParam, loc, fname, std::forward< OutIter >( out ), type, addCast );
 		}
@@ -377,8 +379,8 @@
 	}
 
-	static inline ast::ptr< ast::Stmt > genImplicitCall( 
-		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam, 
-		const CodeLocation & loc, const std::string & fname, const ast::ObjectDecl * obj, 
-		LoopDirection forward = LoopForward 
+	static inline ast::ptr< ast::Stmt > genImplicitCall(
+		InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam,
+		const CodeLocation & loc, const std::string & fname, const ast::ObjectDecl * obj,
+		LoopDirection forward = LoopForward
 	) {
 		// unnamed bit fields are not copied as they cannot be accessed
@@ -392,5 +394,5 @@
 
 		std::vector< ast::ptr< ast::Stmt > > stmts;
-		genCall( 
+		genCall(
 			srcParam, dstParam, loc, fname, back_inserter( stmts ), obj->type, addCast, forward );
 
@@ -400,5 +402,5 @@
 			const ast::Stmt * callStmt = stmts.front();
 			if ( addCast ) {
-				// implicitly generated ctor/dtor calls should be wrapped so that later passes are 
+				// implicitly generated ctor/dtor calls should be wrapped so that later passes are
 				// aware they were generated.
 				callStmt = new ast::ImplicitCtorDtorStmt{ callStmt->location, callStmt };
@@ -417,3 +419,2 @@
 // compile-command: "make install" //
 // End: //
-
