Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/GenPoly/Box.cc	(revision 4b8f918cba0878620f93c5453ef29a5abc15547a)
@@ -664,5 +664,5 @@
 			if ( functionDecl->get_statements() ) {		// empty routine body ?
 				doBeginScope();
-				scopeTyVars.beginScope();;
+				scopeTyVars.beginScope();
 				assignOps.beginScope();
 				DeclarationWithType *oldRetval = retval;
@@ -741,7 +741,7 @@
 
 		void Pass1::passArgTypeVars( ApplicationExpr *appExpr, Type *parmType, Type *argBaseType, std::list< Expression *>::iterator &arg, const TyVarMap &exprTyVars, std::set< std::string > &seenTypes ) {
-			Type *polyBase = hasPolyBase( parmType, exprTyVars );
-			if ( polyBase && ! dynamic_cast< TypeInstType* >( polyBase ) ) {
-				std::string typeName = mangleType( polyBase );
+			Type *polyType = isPolyType( parmType, exprTyVars );
+			if ( polyType && ! dynamic_cast< TypeInstType* >( polyType ) ) {
+				std::string typeName = mangleType( polyType );
 				if ( seenTypes.count( typeName ) ) return;
 
@@ -750,5 +750,5 @@
 				arg = appExpr->get_args().insert( arg, new AlignofExpr( argBaseType->clone() ) );
 				arg++;
-				if ( dynamic_cast< StructInstType* >( polyBase ) ) {
+				if ( dynamic_cast< StructInstType* >( polyType ) ) {
 					if ( StructInstType *argBaseStructType = dynamic_cast< StructInstType* >( argBaseType ) ) {
 						// zero-length arrays are forbidden by C, so don't pass offset for empty struct
@@ -1301,5 +1301,4 @@
 
 			boxParams( appExpr, function, arg, exprTyVars );
-
 			passAdapters( appExpr, function, exprTyVars );
 
@@ -1591,7 +1590,7 @@
 			std::set< std::string > seenTypes; // sizeofName for generic types we've seen
 			for ( std::list< DeclarationWithType* >::const_iterator fnParm = last; fnParm != funcType->get_parameters().end(); ++fnParm ) {
-				Type *polyBase = hasPolyBase( (*fnParm)->get_type(), scopeTyVars );
-				if ( polyBase && ! dynamic_cast< TypeInstType* >( polyBase ) ) {
-					std::string typeName = mangleType( polyBase );
+				Type *polyType = isPolyType( (*fnParm)->get_type(), scopeTyVars );
+				if ( polyType && ! dynamic_cast< TypeInstType* >( polyType ) ) {
+					std::string typeName = mangleType( polyType );
 					if ( seenTypes.count( typeName ) ) continue;
 
@@ -1607,5 +1606,5 @@
 					++last;
 
-					if ( StructInstType *polyBaseStruct = dynamic_cast< StructInstType* >( polyBase ) ) {
+					if ( StructInstType *polyBaseStruct = dynamic_cast< StructInstType* >( polyType ) ) {
 						// NOTE zero-length arrays are illegal in C, so empty structs have no offset array
 						if ( ! polyBaseStruct->get_baseStruct()->get_members().empty() ) {
@@ -1820,5 +1819,5 @@
 		}
 
-////////////////////////////////////////// MemberExprFixer ////////////////////////////////////////////////////
+////////////////////////////////////////// PolyGenericCalculator ////////////////////////////////////////////////////
 
 		template< typename DeclClass >
@@ -1867,7 +1866,7 @@
 			for ( std::list< DeclarationWithType* >::const_iterator fnParm = funcType->get_parameters().begin(); fnParm != funcType->get_parameters().end(); ++fnParm ) {
 				// condition here duplicates that in Pass2::mutate( FunctionType* )
-				Type *polyBase = hasPolyBase( (*fnParm)->get_type(), scopeTyVars );
-				if ( polyBase && ! dynamic_cast< TypeInstType* >( polyBase ) ) {
-					knownLayouts.insert( mangleType( polyBase ) );
+				Type *polyType = isPolyType( (*fnParm)->get_type(), scopeTyVars );
+				if ( polyType && ! dynamic_cast< TypeInstType* >( polyType ) ) {
+					knownLayouts.insert( mangleType( polyType ) );
 				}
 			}
