Index: src/ResolvExpr/TypeEnvironment.cc
===================================================================
--- src/ResolvExpr/TypeEnvironment.cc	(revision 1cb758f27ecd2c57c8b7af48401267ff564acac8)
+++ src/ResolvExpr/TypeEnvironment.cc	(revision 111a8af8c759e997ebac66daa45a956512b81364)
@@ -25,53 +25,4 @@
 
 namespace ResolvExpr {
-	// adding this comparison operator significantly improves assertion resolution run time for
-	// some cases. The current resolution algorithm's speed partially depends on the order of
-	// assertions. Assertions which have fewer possible matches should appear before
-	// assertions which have more possible matches. This seems to imply that this could
-	// be further improved by providing an indexer as an additional argument and ordering based
-	// on the number of matches of the same kind (object, function) for the names of the
-	// declarations.
-	//
-	// I've seen a TU go from 54 minutes to 1 minute 34 seconds with the addition of this comparator.
-	bool AssertCompare::operator()( DeclarationWithType * d1, DeclarationWithType * d2 ) const {
-			// Objects are always less than functions
-			if ( ObjectDecl * objectDecl1 = dynamic_cast< ObjectDecl * >( d1 ) ) {
-				if ( ObjectDecl * objectDecl2 = dynamic_cast< ObjectDecl * >( d2 ) ) {
-					// objects are ordered by name then type pointer, in that order
-					int cmp = objectDecl1->get_name().compare( objectDecl2->get_name() );
-					return cmp < 0 ||
-						( cmp == 0 && objectDecl1->get_type() < objectDecl2->get_type() );
-				} else {
-					return true;
-				}
-			} else if ( FunctionDecl * funcDecl1 = dynamic_cast< FunctionDecl * >( d1 ) ) {
-				if ( FunctionDecl * funcDecl2 = dynamic_cast< FunctionDecl * >( d2 ) ) {
-					// functions are ordered by name, # parameters, # returnVals, type pointer in that order
-					FunctionType * ftype1 = funcDecl1->get_functionType();
-					FunctionType * ftype2 = funcDecl2->get_functionType();
-					int numThings1 = ftype1->get_parameters().size() + ftype1->get_returnVals().size();
-					int numThings2 = ftype2->get_parameters().size() + ftype2->get_returnVals().size();
-					if ( numThings1 < numThings2 ) return true;
-					if ( numThings1 > numThings2 ) return false;
-
-					// if ( ftype1->get_parameters().size() < ftype2->get_parameters().size() ) return true;
-					// else if ( ftype1->get_parameters().size() > ftype2->get_parameters().size() ) return false;
-					// // same number of parameters
-					// if ( ftype1->get_returnVals().size() < ftype2->get_returnVals().size() ) return true;
-					// else if ( ftype1->get_returnVals().size() > ftype2->get_returnVals().size() ) return false;
-					// same number of return vals
-					// int cmp = funcDecl1->get_name().compare( funcDecl2->get_name() );
-					// if ( cmp < 0 ) return true;
-					// else if ( cmp > 0 ) return false;
-					// // same name
-					return ftype1 < ftype2;
-				} else {
-					return false;
-				}
-			} else {
-				assert( false );
-			}
-		}
-
 	void printAssertionSet( const AssertionSet &assertions, std::ostream &os, int indent ) {
 		for ( AssertionSet::const_iterator i = assertions.begin(); i != assertions.end(); ++i ) {
Index: src/ResolvExpr/TypeEnvironment.h
===================================================================
--- src/ResolvExpr/TypeEnvironment.h	(revision 1cb758f27ecd2c57c8b7af48401267ff564acac8)
+++ src/ResolvExpr/TypeEnvironment.h	(revision 111a8af8c759e997ebac66daa45a956512b81364)
@@ -28,6 +28,19 @@
 
 namespace ResolvExpr {
+	// adding this comparison operator significantly improves assertion resolution run time for
+	// some cases. The current resolution algorithm's speed partially depends on the order of
+	// assertions. Assertions which have fewer possible matches should appear before
+	// assertions which have more possible matches. This seems to imply that this could
+	// be further improved by providing an indexer as an additional argument and ordering based
+	// on the number of matches of the same kind (object, function) for the names of the
+	// declarations.
+	//
+	// I've seen a TU go from 54 minutes to 1 minute 34 seconds with the addition of this comparator.
 	struct AssertCompare {
-		bool operator()( DeclarationWithType * d1, DeclarationWithType * d2 ) const;
+		bool operator()( DeclarationWithType * d1, DeclarationWithType * d2 ) const {
+			int cmp = d1->get_name().compare( d2->get_name() );
+			return cmp < 0 ||
+				( cmp == 0 && d1->get_type() < d2->get_type() );
+		}
 	};
 	struct AssertionSetValue {
