Index: src/Validate/HandleAttributes.cc
===================================================================
--- src/Validate/HandleAttributes.cc	(revision 05e6eb547b1ef88c13f322a51ab4e52be696d924)
+++ src/Validate/HandleAttributes.cc	(revision ba4a1d8c09106fcb307f09f287e5b399769b864c)
@@ -16,10 +16,7 @@
 #include "HandleAttributes.h"
 
-#include <utility> // for pair
-
 #include "CompilationState.h"
 #include "Common/PassVisitor.h"
 #include "Common/SemanticError.h"
-#include "InitTweak/InitTweak.h"
 #include "ResolvExpr/Resolver.h"
 #include "SynTree/Attribute.h"
@@ -29,76 +26,4 @@
 namespace Validate {
 	namespace {
-		std::pair<long long int, bool> eval(Expression * expr);
-
-		struct Eval : public WithShortCircuiting {
-			long long int value = 0;
-			bool valid = true;
-
-			void previsit( BaseSyntaxNode * ) { visit_children = false; }
-			void postvisit( BaseSyntaxNode * ) { valid = false; }
-
-			void postvisit( ConstantExpr * expr ) {
-				value = expr->intValue();
-			}
-
-			void postvisit( CastExpr * expr ) {
-				auto arg = eval(expr->arg);
-				valid = arg.second;
-				value = arg.first;
-				// TODO: perform type conversion on value if valid
-			}
-
-			void postvisit( VariableExpr * expr ) {
-				if ( EnumInstType * inst = dynamic_cast<EnumInstType *>(expr->result) ) {
-					if ( EnumDecl * decl = inst->baseEnum ) {
-						if ( decl->valueOf( expr->var, value ) ) { // value filled by valueOf
-							return;
-						}
-					}
-				}
-				valid = false;
-			}
-
-			void postvisit( ApplicationExpr * expr ) {
-				DeclarationWithType * function = InitTweak::getFunction(expr);
-				if ( ! function || function->linkage != LinkageSpec::Intrinsic ) { valid = false; return; }
-				const std::string & fname = function->name;
-				assertf( expr->args.size() == 1 || expr->args.size() == 2, "Intrinsic function with %zd arguments: %s", expr->args.size(), fname.c_str() );
-				std::pair<long long int, bool> arg1, arg2;
-				arg1 = eval(expr->args.front());
-				valid = valid && arg1.second;
-				if ( ! valid ) return;
-				if ( expr->args.size() == 2 ) {
-					arg2 = eval(expr->args.back());
-					valid = valid && arg2.second;
-					if ( ! valid ) return;
-				}
-				if (fname == "?+?") {
-					value = arg1.first + arg2.first;
-				} else if (fname == "?-?") {
-					value = arg1.first - arg2.first;
-				} else if (fname == "?*?") {
-					value = arg1.first * arg2.first;
-				} else if (fname == "?/?") {
-					value = arg1.first / arg2.first;
-				} else if (fname == "?%?") {
-					value = arg1.first % arg2.first;
-				} else {
-					valid = false;
-				}
-				// TODO: implement other intrinsic functions
-			}
-		};
-
-		std::pair<long long int, bool> eval(Expression * expr) {
-			PassVisitor<Eval> ev;
-			if (expr) {
-				expr->accept(ev);
-				return std::make_pair(ev.pass.value, ev.pass.valid);
-			} else {
-				return std::make_pair(0, false);
-			}
-		}
-
 		struct HandleAttributes : public WithIndexer {
 			void previsit( ObjectDecl * decl );
