Index: src/Common/PassVisitor.h
===================================================================
--- src/Common/PassVisitor.h	(revision 5dd0704a42a723d2c413edca7d404b41b80a488f)
+++ src/Common/PassVisitor.h	(revision ba915fb57763ae661ddfbc000c81dde9a5ae0003)
@@ -25,5 +25,5 @@
 // | WithStmtsToAdd       - provides the ability to insert statements before or after the current statement by adding new statements into
 //                          stmtsToAddBefore or stmtsToAddAfter respectively.
-// | WithShortCircuiting  - provides the ability to skip visiting child nodes; set skip_children to true if pre{visit,mutate} to skip visiting children
+// | WithShortCircuiting  - provides the ability to skip visiting child nodes; set visit_children to false in pre{visit,mutate} to skip visiting children
 // | WithScopes           - provides the ability to save/restore data like a LIFO stack; to save, call GuardValue with the variable to save, the variable
 //                          will automatically be restored to its previous value after the corresponding postvisit/postmutate teminates.
@@ -37,5 +37,11 @@
 	PassVisitor(Args &&... args)
 		: pass( std::forward<Args>( args )... )
-	{}
+	{
+		typedef PassVisitor<pass_type> this_t;
+		this_t * const * visitor = visitor_impl(pass, 0);
+		if(visitor) {
+			*const_cast<this_t **>( visitor ) = this;
+		}
+	}
 
 	virtual ~PassVisitor() = default;
@@ -214,4 +220,7 @@
 
 private:
+	template<typename pass_t> friend void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_t >& visitor );
+	template<typename pass_t> friend void mutateAll( std::list< Declaration* > &decls, PassVisitor< pass_t >& visitor );
+
 	template<typename node_type> void call_previsit ( node_type * node ) { previsit_impl ( pass, node, 0 ); }
 	template<typename node_type> void call_postvisit( node_type * node ) { postvisit_impl( pass, node, 0 ); }
@@ -225,11 +234,17 @@
 	void set_env( TypeSubstitution * env ) { set_env_impl( pass, env, 0); }
 
-	void visitStatementList( std::list< Statement* > &statements );
+	template< typename func_t >
+	void handleStatementList( std::list< Statement * > & statements, func_t func );
+	void visitStatementList ( std::list< Statement* > &statements );
 	void mutateStatementList( std::list< Statement* > &statements );
 
-	Statement * visitStatement( Statement * stmt );
+	template< typename func_t >
+	Statement * handleStatement( Statement * stmt, func_t func );
+	Statement * visitStatement ( Statement * stmt );
 	Statement * mutateStatement( Statement * stmt );
 
-	void visitExpression( Expression * expr );
+	template< typename func_t >
+	Expression * handleExpression( Expression * expr, func_t func );
+	Expression * visitExpression ( Expression * expr );
 	Expression * mutateExpression( Expression * expr );
 
@@ -238,6 +253,8 @@
 	std::list< Statement* > * 	get_beforeStmts() { return stmtsToAddBefore_impl( pass, 0); }
 	std::list< Statement* > * 	get_afterStmts () { return stmtsToAddAfter_impl ( pass, 0); }
-	bool visit_children() { bool* skip = skip_children_impl(pass, 0); return ! (skip && *skip); }
-	void reset_visit() { bool* skip = skip_children_impl(pass, 0); if(skip) *skip = false; }
+	std::list< Declaration* > * 	get_beforeDecls() { return declsToAddBefore_impl( pass, 0); }
+	std::list< Declaration* > * 	get_afterDecls () { return declsToAddAfter_impl ( pass, 0); }
+
+	void set_visit_children( bool& ref ) { bool_ref * ptr = visit_children_impl(pass, 0); if(ptr) ptr->set( ref ); }
 
 	guard_value_impl init_guard() {
@@ -278,5 +295,4 @@
 	std::list< Statement* > stmtsToAddAfter;
 };
-
 class WithShortCircuiting {
 protected:
@@ -285,5 +301,5 @@
 
 public:
-	bool skip_children;
+	bool_ref visit_children;
 };
 
@@ -309,4 +325,13 @@
 };
 
+template<typename pass_type>
+class WithVisitorRef {
+protected:
+	WithVisitorRef() = default;
+	~WithVisitorRef() = default;
+
+public:
+	PassVisitor<pass_type> * const visitor;
+};
 
 #include "PassVisitor.impl.h"
Index: src/Common/PassVisitor.impl.h
===================================================================
--- src/Common/PassVisitor.impl.h	(revision 5dd0704a42a723d2c413edca7d404b41b80a488f)
+++ src/Common/PassVisitor.impl.h	(revision ba915fb57763ae661ddfbc000c81dde9a5ae0003)
@@ -4,10 +4,11 @@
 	__attribute__((unused))                   \
 	const auto & guard = init_guard();        \
+	bool visit_children = true;               \
+	set_visit_children( visit_children );	\
 	call_previsit( node );                    \
-	if( visit_children() ) {                  \
+	if( visit_children ) {                    \
 
 #define VISIT_END( node )                       \
 	}                                         \
-	reset_visit();                            \
 	call_postvisit( node );                   \
 
@@ -15,10 +16,11 @@
 	__attribute__((unused))                   \
 	const auto & guard = init_guard();        \
+	bool visit_children = true;               \
+	set_visit_children( visit_children );	\
 	call_premutate( node );                   \
-	if( visit_children() ) {                  \
+	if( visit_children ) {                    \
 
 #define MUTATE_END( type, node )                \
 	}                                         \
-	reset_visit();                            \
 	return call_postmutate< type * >( node ); \
 
@@ -42,23 +44,89 @@
 }
 
-typedef std::list< Statement * > StmtList_t;
-
-template< typename pass_type >
-void PassVisitor< pass_type >::visitStatementList( std::list< Statement * > & statements ) {
+typedef std::list< Statement   * > StmtList_t;
+typedef std::list< Declaration * > DeclList_t;
+
+template<typename iterator_t>
+static inline void splice( iterator_t it, DeclList_t * decls ) {
+	std::transform(
+		decls->begin(),
+		decls->end(),
+		it,
+		[](Declaration * decl) -> auto {
+			return new DeclStmt( noLabels, decl );
+		}
+	);
+	decls->clear();
+}
+
+template< typename pass_type >
+static inline void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& visitor ) {
+
+	DeclList_t* beforeDecls = visitor.get_beforeDecls();
+	DeclList_t* afterDecls  = visitor.get_afterDecls();
+
+	for ( std::list< Declaration* >::iterator i = decls.begin(); ; ++i ) {
+		// splice in new declarations after previous decl
+		if ( !empty( afterDecls ) ) { decls.splice( i, *afterDecls ); }	
+
+		if ( i == decls.end() ) break;
+
+		// run mutator on declaration
+		maybeAccept( *i, visitor );
+
+		// splice in new declarations before current decl
+		if ( !empty( beforeDecls ) ) { decls.splice( i, *beforeDecls ); }
+	}
+}
+
+template< typename pass_type >
+static inline void mutateAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& mutator ) {
+
+	DeclList_t* beforeDecls = mutator.get_beforeDecls();
+	DeclList_t* afterDecls  = mutator.get_afterDecls();
+
+	for ( std::list< Declaration* >::iterator i = decls.begin(); ; ++i ) {
+		// splice in new declarations after previous decl
+		if ( !empty( afterDecls ) ) { decls.splice( i, *afterDecls ); }	
+
+		if ( i == decls.end() ) break;
+
+		// run mutator on declaration
+		*i = maybeMutate( *i, mutator );
+
+		// splice in new declarations before current decl
+		if ( !empty( beforeDecls ) ) { decls.splice( i, *beforeDecls ); }
+	}
+}
+
+template< typename pass_type >
+template< typename func_t >
+void PassVisitor< pass_type >::handleStatementList( std::list< Statement * > & statements, func_t func ) {
 	SemanticError errors;
 
 	StmtList_t* beforeStmts = get_beforeStmts();
 	StmtList_t* afterStmts  = get_afterStmts();
+	DeclList_t* beforeDecls = get_beforeDecls();
+	DeclList_t* afterDecls  = get_afterDecls();
 
 	for ( std::list< Statement* >::iterator i = statements.begin(); i != statements.end(); ++i ) {
+
+		if ( !empty( afterDecls ) ) { splice( std::inserter( statements, i ), afterDecls ); }
 		if ( !empty( afterStmts ) ) { statements.splice( i, *afterStmts ); }
+
 		try {
-			(*i)->accept( *this );
+			func( *i );
+			assert(( empty( beforeStmts ) && empty( afterStmts ))
+			    || ( empty( beforeDecls ) && empty( afterDecls )) );
+
 		} catch ( SemanticError &e ) {
 			errors.append( e );
 		}
+
+		if ( !empty( beforeDecls ) ) { splice( std::inserter( statements, i ), beforeDecls ); }
 		if ( !empty( beforeStmts ) ) { statements.splice( i, *beforeStmts ); }
 	}
 
+	if ( !empty( afterDecls ) ) { splice( std::back_inserter( statements ), afterDecls); }
 	if ( !empty( afterStmts ) ) { statements.splice( statements.end(), *afterStmts ); }
 	if ( !errors.isEmpty() ) { throw errors; }
@@ -66,41 +134,44 @@
 
 template< typename pass_type >
+void PassVisitor< pass_type >::visitStatementList( std::list< Statement * > & statements ) {
+	handleStatementList( statements, [this]( Statement * stmt) {
+		stmt->accept( *this );
+	});
+}
+
+template< typename pass_type >
 void PassVisitor< pass_type >::mutateStatementList( std::list< Statement * > & statements ) {
-	SemanticError errors;
+	handleStatementList( statements, [this]( Statement *& stmt) {
+		stmt = stmt->acceptMutator( *this );
+	});
+}
+
+
+template< typename pass_type >
+template< typename func_t >
+Statement * PassVisitor< pass_type >::handleStatement( Statement * stmt, func_t func ) {
+	// don't want statements from outer CompoundStmts to be added to this CompoundStmt
+	ValueGuardPtr< TypeSubstitution * >  oldEnv        ( get_env_ptr    () );
+	ValueGuardPtr< DeclList_t >          oldBeforeDecls( get_beforeDecls() );
+	ValueGuardPtr< DeclList_t >          oldAfterDecls ( get_afterDecls () );
+	ValueGuardPtr< StmtList_t >          oldBeforeStmts( get_beforeStmts() );
+	ValueGuardPtr< StmtList_t >          oldAfterStmts ( get_afterStmts () );
+
+	Statement *newStmt = func( stmt );
 
 	StmtList_t* beforeStmts = get_beforeStmts();
 	StmtList_t* afterStmts  = get_afterStmts();
-
-	for ( std::list< Statement* >::iterator i = statements.begin(); i != statements.end(); ++i ) {
-		if ( !empty( afterStmts ) ) { statements.splice( i, *afterStmts ); }
-		try {
-			*i = (*i)->acceptMutator( *this );
-		} catch ( SemanticError &e ) {
-			errors.append( e );
-		}
-		if ( !empty( beforeStmts ) ) { statements.splice( i, *beforeStmts ); }
-	}
-
-	if ( !empty( afterStmts ) ) { statements.splice( statements.end(), *afterStmts ); }
-	if ( !errors.isEmpty() ) { throw errors; }
-}
-
-template< typename pass_type >
-Statement * PassVisitor< pass_type >::visitStatement( Statement * stmt ) {
-	// don't want statements from outer CompoundStmts to be added to this CompoundStmt
-	ValueGuardPtr< TypeSubstitution * >      oldEnv        ( get_env_ptr() );
-	ValueGuardPtr< std::list< Statement* > > oldBeforeStmts( get_beforeStmts() );
-	ValueGuardPtr< std::list< Statement* > > oldAfterStmts ( get_afterStmts () );
-
-	maybeAccept( stmt, *this );
-
-	StmtList_t* beforeStmts = get_beforeStmts();
-	StmtList_t* afterStmts  = get_afterStmts();
-
-	if( empty(beforeStmts) && empty(afterStmts) ) { return stmt; }
+	DeclList_t* beforeDecls = get_beforeDecls();
+	DeclList_t* afterDecls  = get_afterDecls();
+
+	if( empty(beforeStmts) && empty(afterStmts) && empty(beforeDecls) && empty(afterDecls) ) { return newStmt; }
+	assert(( empty( beforeStmts ) && empty( afterStmts ))
+	    || ( empty( beforeDecls ) && empty( afterDecls )) );
 
 	CompoundStmt *compound = new CompoundStmt( noLabels );
+	if( !empty(beforeDecls) ) { splice( std::back_inserter( compound->get_kids() ), beforeDecls ); }
 	if( !empty(beforeStmts) ) { compound->get_kids().splice( compound->get_kids().end(), *beforeStmts ); }
-	compound->get_kids().push_back( stmt );
+	compound->get_kids().push_back( newStmt );
+	if( !empty(afterDecls) ) { splice( std::back_inserter( compound->get_kids() ), afterDecls ); }
 	if( !empty(afterStmts) ) { compound->get_kids().splice( compound->get_kids().end(), *afterStmts ); }
 	return compound;
@@ -108,29 +179,22 @@
 
 template< typename pass_type >
+Statement * PassVisitor< pass_type >::visitStatement( Statement * stmt ) {
+	return handleStatement( stmt, [this]( Statement * stmt ) {
+		maybeAccept( stmt, *this ); 
+		return stmt;
+	});
+}
+
+template< typename pass_type >
 Statement * PassVisitor< pass_type >::mutateStatement( Statement * stmt ) {
-	// don't want statements from outer CompoundStmts to be added to this CompoundStmt
-	ValueGuardPtr< TypeSubstitution * >      oldEnv        ( get_env_ptr() );
-	ValueGuardPtr< std::list< Statement* > > oldBeforeStmts( get_beforeStmts() );
-	ValueGuardPtr< std::list< Statement* > > oldAfterStmts ( get_afterStmts () );
-
-	Statement *newStmt = maybeMutate( stmt, *this );
-
-	StmtList_t* beforeStmts = get_beforeStmts();
-	StmtList_t* afterStmts  = get_afterStmts();
-
-	if( empty(beforeStmts) && empty(afterStmts) ) { return newStmt; }
-
-	CompoundStmt *compound = new CompoundStmt( noLabels );
-	if( !empty(beforeStmts) ) { compound->get_kids().splice( compound->get_kids().end(), *beforeStmts ); }
-	compound->get_kids().push_back( newStmt );
-	if( !empty(afterStmts) ) { compound->get_kids().splice( compound->get_kids().end(), *afterStmts ); }
-	return compound;
-}
-
-
-
-template< typename pass_type >
-void PassVisitor< pass_type >::visitExpression( Expression * expr ) {
-	if( !expr ) return;
+	return handleStatement( stmt, [this]( Statement * stmt ) {
+	 	return maybeMutate( stmt, *this );
+	});
+}
+
+template< typename pass_type >
+template< typename func_t >
+Expression * PassVisitor< pass_type >::handleExpression( Expression * expr, func_t func ) {
+	if( !expr ) return nullptr;
 
 	auto env_ptr = get_env_ptr();
@@ -138,20 +202,23 @@
 		*env_ptr = expr->get_env();
 	}
-	// xxx - should env be cloned (or moved) onto the result of the mutate?
-	expr->accept( *this );
+
+	// should env be cloned (or moved) onto the result of the mutate?
+	return func( expr );
+}
+
+template< typename pass_type >
+Expression * PassVisitor< pass_type >::visitExpression( Expression * expr ) {
+	return handleExpression(expr, [this]( Expression * expr ) {
+		expr->accept( *this );
+		return expr;
+	});		
 }
 
 template< typename pass_type >
 Expression * PassVisitor< pass_type >::mutateExpression( Expression * expr ) {
-	if( !expr ) return nullptr;
-
-	auto env_ptr = get_env_ptr();
-	if ( env_ptr && expr->get_env() ) {
-		*env_ptr = expr->get_env();
-	}
-	// xxx - should env be cloned (or moved) onto the result of the mutate?
-	return expr->acceptMutator( *this );
-}
-
+	return handleExpression(expr, [this]( Expression * expr ) {
+		return expr->acceptMutator( *this );
+	});
+}
 
 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -231,9 +298,7 @@
 void PassVisitor< pass_type >::visit( ExprStmt * node ) {
 	VISIT_START( node );
-	call_beginScope();
 
 	visitExpression( node->get_expr() );
 
-	call_endScope();
 	VISIT_END( node );
 }
@@ -248,7 +313,14 @@
 }
 
+//--------------------------------------------------------------------------
+// AsmStmt
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( AsmStmt * node ) {
 	VISIT_BODY( node );
+}
+
+template< typename pass_type >
+Statement * PassVisitor< pass_type >::mutate( AsmStmt * node ) {
+	MUTATE_BODY( Statement, node );
 }
 
@@ -300,5 +372,5 @@
 
 //--------------------------------------------------------------------------
-// WhileStmt
+// ForStmt
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( ForStmt * node ) {
@@ -348,5 +420,5 @@
 
 //--------------------------------------------------------------------------
-// SwitchStmt
+// CaseStmt
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( CaseStmt * node ) {
@@ -369,7 +441,14 @@
 }
 
+//--------------------------------------------------------------------------
+// BranchStmt
 template< typename pass_type >
 void PassVisitor< pass_type >::visit( BranchStmt * node ) {
 	VISIT_BODY( node );
+}
+
+template< typename pass_type >
+Statement * PassVisitor< pass_type >::mutate( BranchStmt * node ) {
+	MUTATE_BODY( Statement, node );
 }
 
@@ -415,4 +494,5 @@
 	maybeAccept( node->get_block(), *this );
 	acceptAll( node->get_catchers(), *this );
+	maybeAccept( node->get_finally(), *this );
 
 	VISIT_END( node );
@@ -425,4 +505,5 @@
 	node->set_block(  maybeMutate( node->get_block(), *this ) );
 	mutateAll( node->get_catchers(), *this );
+	node->set_finally( maybeMutate( node->get_finally(), *this ) );
 
 	MUTATE_END( Statement, node );
@@ -435,6 +516,7 @@
 	VISIT_START( node );
 
+	maybeAccept( node->get_decl(), *this );
+	node->set_cond( visitExpression( node->get_cond() ) );
 	node->set_body( visitStatement( node->get_body() ) );
-	maybeAccept( node->get_decl(), *this );
 
 	VISIT_END( node );
@@ -445,6 +527,7 @@
 	MUTATE_START( node );
 
-	node->set_body(  mutateStatement( node->get_body() ) );
-	node->set_decl(  maybeMutate( node->get_decl(), *this ) );
+	node->set_decl( maybeMutate( node->get_decl(), *this ) );
+	node->set_cond( mutateExpression( node->get_cond() ) );
+	node->set_body( mutateStatement( node->get_body() ) );
 
 	MUTATE_END( Statement, node );
@@ -838,14 +921,4 @@
 
 template< typename pass_type >
-Statement * PassVisitor< pass_type >::mutate( AsmStmt * node ) {
-	MUTATE_BODY( Statement, node );
-}
-
-template< typename pass_type >
-Statement * PassVisitor< pass_type >::mutate( BranchStmt * node ) {
-	MUTATE_BODY( Statement, node );
-}
-
-template< typename pass_type >
 Statement * PassVisitor< pass_type >::mutate( FinallyStmt * node ) {
 	MUTATE_BODY( Statement, node );
Index: src/Common/PassVisitor.proto.h
===================================================================
--- src/Common/PassVisitor.proto.h	(revision 5dd0704a42a723d2c413edca7d404b41b80a488f)
+++ src/Common/PassVisitor.proto.h	(revision ba915fb57763ae661ddfbc000c81dde9a5ae0003)
@@ -1,3 +1,6 @@
 #pragma once
+
+template<typename pass_type>
+class PassVisitor;
 
 typedef std::function<void( void * )> cleanup_func_t;
@@ -31,4 +34,22 @@
 
 typedef std::function< void( cleanup_func_t, void * ) > at_cleanup_t;
+
+class bool_ref {
+public:
+	bool_ref() = default;
+	~bool_ref() = default;
+
+	operator bool() { return *m_ref; }
+	bool operator=( bool val ) { return *m_ref = val; }
+
+private:
+
+	template<typename pass>
+	friend class PassVisitor;
+
+	void set( bool & val ) { m_ref = &val; };
+
+	bool * m_ref;
+};
 
 //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -112,4 +133,7 @@
 FIELD_PTR( std::list< Statement* >, stmtsToAddBefore )
 FIELD_PTR( std::list< Statement* >, stmtsToAddAfter  )
-FIELD_PTR( bool, skip_children )
+FIELD_PTR( std::list< Declaration* >, declsToAddBefore )
+FIELD_PTR( std::list< Declaration* >, declsToAddAfter  )
+FIELD_PTR( bool_ref, visit_children )
 FIELD_PTR( at_cleanup_t, at_cleanup )
+FIELD_PTR( PassVisitor<pass_type> * const, visitor )
Index: src/ControlStruct/ExceptTranslate.cc
===================================================================
--- src/ControlStruct/ExceptTranslate.cc	(revision ba915fb57763ae661ddfbc000c81dde9a5ae0003)
+++ src/ControlStruct/ExceptTranslate.cc	(revision ba915fb57763ae661ddfbc000c81dde9a5ae0003)
@@ -0,0 +1,485 @@
+//
+// 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.
+//
+// ExceptVisitor.cc --
+//
+// Author           : Andrew Beach
+// Created On       : Wed Jun 14 16:49:00 2017
+// Last Modified By : Andrew Beach
+// Last Modified On : Thr Jun 22 15:57:00 2017
+// Update Count     : 0
+//
+
+#include "ExceptTranslate.h"
+#include "Common/PassVisitor.h"
+
+namespace ControlFlow {
+
+	// This (large) section could probably be moved out of the class
+	// and be static helpers instead.
+
+	// Type(Qualifiers &, false, std::list<Attribute *> &)
+
+	// void (*function)()
+	static FunctionType void_func_t(Type::Qualifiers(), false);
+	// void (*function)(int, exception);
+	static FunctionType catch_func_t(Type::Qualifiers(), false);
+	// int (*function)(exception);
+	static FunctionType match_func_t(Type::Qualifiers(), false);
+	// bool (*function)(exception);
+	static FunctionType handle_func_t(Type::Qualifiers(), false);
+
+	static void init_func_types() {
+		static init_complete = false;
+		if (init_complete) {
+			return;
+		}
+		ObjectDecl index_obj(
+			"index_t",
+			Type::StorageClasses(),
+			LinkageSpec::Cforall,
+			/*bitfieldWidth*/ NULL,
+			new BasicType(emptyQualifiers, BasicType::UnsignedInt),
+			/*init*/ NULL
+		);
+		ObjectDecl exception_obj(
+			"exception_t",
+			Type::StorageClasses(),
+			LinkageSpec::Cforall,
+			/*bitfieldWidth*/ NULL,
+			new BasicType(emptyQualifiers, BasicType::UnsignedInt),
+			/*init*/ NULL
+		);
+		ObjectDecl bool_obj(
+			"bool_t",
+			Type::StorageClasses(),
+			LinkageSpec::Cforall,
+			/*bitfieldWidth*/ NULL,
+			new BasicType(emptyQualifiers, BasicType::Bool),
+			/*init*/ NULL
+		);
+
+		catch_func_t.get_parameters().push_back(index_obj.clone());
+		catch_func_t.get_parameters().push_back(exception_obj.clone());
+		match_func_t.get_returnVals().push_back(index_obj.clone());
+		match_func_t.get_parameters().push_back(exception_obj.clone());
+		handle_func_t.get_returnVals().push_back(bool_obj.clone());
+		handle_func_t.get_parameters().push_back(exception_obj.clone());
+
+		init_complete = true;
+	}
+
+	// Buricratic Helpers (Not having to do with the paritular operation.)
+
+	typedef std::list<CatchStmt*> CatchList;
+
+	void split( CatchList& allHandlers, CatchList& terHandlers,
+	            CatchList& resHandlers ) {
+		while ( !allHandlers.empty() ) {
+			Statement * stmt = allHandlers.front();
+			allHandlers.pop_front();
+			if (CaseStmt::Terminate == stmt->get_kind()) {
+				terHandlers.push_back(stmt);
+			} else {
+				resHandlers.push_back(stmt);
+			}
+		}
+	}
+
+	template<typename T>
+	void free_all( std::list<T *> &list ) {
+		std::list<T *>::iterator it;
+		for ( it = list.begin() ; it != list.end() ; ++it ) {
+			delete *it;
+		}
+		list.clear();
+	}
+
+	void appendDeclStmt( CompoundStmt * block, Declaration * item ) {
+		block->push_back(new DeclStmt(no_labels, item));
+	}
+
+	Expression * nameOf( FunctionDecl * function ) {
+		return new VariableExpr( function );
+	}
+
+	// ThrowStmt Mutation Helpers
+
+	Statement * create_terminate_throw( ThrowStmt *throwStmt ) {
+		// __throw_terminate( EXPR );
+		ApplicationExpr * call = new ApplicationExpr( /* ... */ );
+		call->get_args.push_back( throwStmt->get_expr() );
+		Statement * result = new ExprStmt( throwStmt->get_labels(), call );
+		throwStmt->set_expr( nullptr );
+		delete throwStmt;
+		return result;
+	}
+	Statement * create_terminate_rethrow( ThrowStmt *throwStmt ) {
+		// __rethrow_terminate();
+		Statement * result = new ExprStmt(
+			throwStmt->get_labels(),
+			new ApplicationExpr( /* ... */ );
+			);
+		delete throwStmt;
+		return result;
+	}
+	Statement * create_resume_throw( ThrowStmt *throwStmt ) {
+		// __throw_resume( EXPR );
+		ApplicationExpr * call = new ApplicationExpr( /* ... */ );
+		call->get_args.push_back( throwStmt->get_expr() );
+		Statement * result = new ExprStmt( throwStmt->get_labels(), call );
+		throwStmt->set_expr( nullptr );
+		delete throwStmt;
+		return result;
+	}
+	Statement * create_resume_rethrow( ThrowStmt *throwStmt ) {
+		// return false;
+		Statement * result = new ReturnStmt(
+			throwStmt->get_labels(),
+			new ConstantExpr(
+				Constant(
+					new BasicType(
+						Type::Qualifiers(),
+						BasicType::Bool
+						),
+					"0")
+				)
+			);
+		delete throwStmt;
+		return result;
+	}
+
+	// TryStmt Mutation Helpers
+
+	CompoundStmt * take_try_block( TryStmt *tryStmt ) {
+		CompoundStmt * block = tryStmt->get_block();
+		tryStmt->set_block( nullptr );
+		return block;
+	}
+	FunctionDecl * create_try_wrapper( TryStmt *tryStmt ) {
+		CompoundStmt * body = base_try->get_block();
+		base_try->set_block(nullptr);
+
+		return new FunctionDecl("try", Type::StorageClasses(),
+			LinkageSpec::Cforall, void_func_t, body);
+	}
+
+	FunctionDecl * create_terminate_catch( CatchList &handlers ) {
+		std::list<CaseStmt *> handler_wrappers;
+
+		// Index 1..{number of handlers}
+		int index = 0;
+		CatchList::iterator it = handlers.begin();
+		for ( ; it != handlers.end() ; ++it ) {
+			++index;
+			CatchStmt * handler = *it;
+
+			std::list<Statement *> core;
+			if ( /*the exception is named*/ ) {
+				ObjectDecl * local_except = /* Dynamic case, same */;
+				core->push_back( new DeclStmt( noLabel, local_except ) );
+			}
+			// Append the provided statement to the handler.
+			core->push_back( cur_handler->get_body() );
+			// Append return onto the inner block? case stmt list?
+			CaseStmt * wrapper = new CaseStmt(
+				noLabels,
+				new ConstantExpr( Constant::from_int( index ) ),
+				core
+				);
+			handler_wrappers.push_back(wrapper);
+		}
+		// TODO: Some sort of meaningful error on default perhaps?
+
+		SwitchStmt * handler_lookup = new SwitchStmt(
+			noLabels,
+			/*parameter 0: index*/,
+			handler_wrappers,
+			false
+			);
+		CompoundStmt * body = new CompoundStmt( noLabels );
+		body->push_back( handler_lookup );
+
+		return new FunctionDecl("catch", Type::StorageClasses(),
+			LinkageSpec::Cforall, catch_func_t, body);
+	}
+
+	// Create a single check from a moddified handler.
+	CompoundStmt *create_single_matcher( CatchStmt * modded_handler ) {
+		CompoundStmt * block = new CompoundStmt( noLables );
+
+		appendDeclStmt( block, modded_handler->get_decl() );
+
+		// TODO: This is not the actual check.
+		LogicalExpr * cond = new ConstantExpr( Constant::from_bool( false ) );
+
+		if ( modded_handler->get_cond() ) {
+			cond = new LogicalExpr( cond, modded_handler->get_cond() )q
+		}
+		block->push_back( new IfStmt( noLabels,
+			cond, modded_handler->get_body() );
+
+		modded_handler->set_decl( nullptr );
+		modded_handler->set_cond( nullptr );
+		modded_handler->set_body( nullptr );
+		delete modded_handler;
+		return block;
+	}
+
+	FunctionDecl * create_terminate_match( CatchList &handlers ) {
+		CompoundStmt * body = new CompoundStmt( noLabels );
+
+		// Index 1..{number of handlers}
+		int index = 0;
+		CatchList::iterator it;
+		for ( it = handlers.begin() ; it != handlers.end() ; ++it ) {
+			++index;
+			CatchStmt * handler = *it;
+
+			// body should have been taken by create_terminate_catch.
+			// assert( nullptr == handler->get_body() );
+			handler->set_body( new ReturnStmt( noLabels,
+				new ConstantExpr( Constant::from_int( index ) ) ) );
+
+			body->push_back( create_single_matcher( handler ) );
+		}
+
+		return new FunctionDecl("match", Type::StorageClasses(),
+			LinkageSpec::Cforall, match_func_t, body);
+	}
+
+	Statement * create_terminate_caller(
+			FunctionDecl * try_wrapper,
+			FunctionDecl * terminate_catch,
+			FunctionDecl * terminate_match) {
+
+		ApplicationExpr * caller = new ApplicationExpr( /* ... */ );
+		std::list<Expression *>& args = caller.get_args();
+		args.push_back( nameOf( try_wrapper ) );
+		args.push_back( nameOf( terminate_catch ) );
+		args.push_back( nameOf( terminate_match ) );
+
+		return new ExprStmt( noLabels, caller );
+	}
+
+	FunctionDecl * create_resume_handler( CatchList &handlers ) {
+		CompoundStmt * body = new CompountStmt( noLabels );
+
+		CatchList::iterator it;
+		for ( it = handlers.begin() ; it != handlers.end() ; ++it ) {
+			CatchStmt * handler = *it;
+
+			// Modifiy body.
+			CompoundStmt * handling_code =
+				dynamic_cast<CompoundStmt*>( handler->get_body() );
+			if ( ! handling_code ) {
+				handling_code = new CompoundStmt( noLabels );
+				handling_code->push_back( handler->get_body() );
+			}
+			handling_code->push_back( new ReturnStmt( noLabel,
+				new ConstantExpr( Constant::from_bool( false ) ) ) );
+			handler->set_body( handling_code );
+
+			// Create the handler.
+			body->push_back( create_single_matcher( handler ) );
+		}
+
+		return new FunctionDecl("handle", Type::StorageClasses(),
+			LinkageSpec::Cforall, handle_func_t, body);
+	}
+
+	Statement * create_resume_wrapper(
+			Statement * wraps,
+			FunctionDecl * resume_handler ) {
+		CompoundStmt * body = new CompoundStmt( noLabels );
+
+		// struct node = {current top resume handler, call to resume_handler};
+		// __attribute__((cleanup( ... )));
+		// set top resume handler to node.
+		// The wrapped statement.
+
+		ListInit * node_init;
+		{
+			std::list<Initializer*> field_inits;
+			field_inits.push_back( new SingleInit( /* ... */ ) );
+			field_inits.push_back( new SingleInit( nameOf( resume_handler ) ) );
+			node_init = new ListInit( field_inits );
+		}
+
+		std::list< Attribute * > attributes;
+		{
+			std::list< Expression * > attr_params;
+			attr_params.push_back( nameOf( /* ... deconstructor ... */ ) );
+			attrributes.push_back( new Attribute( "cleanup", attr_params ) );
+		}
+
+		appendDeclStmt( body,
+		/**/ ObjectDecl(
+			"resume_node",
+			Type::StorageClasses(),
+			LinkageSpec::Cforall,
+			nullptr,
+			/* Type* = resume_node */,
+			node_init,
+			attributes
+			)
+		);
+		body->push_back( wraps );
+		return body;
+	}
+
+	FunctionDecl * create_finally_wrapper( TryStmt * tryStmt ) {
+		CompoundStmt * body = tryStmt->get_finally();
+		tryStmt->set_finally( nullptr );
+
+		return new FunctionDecl("finally", Type::StorageClasses(),
+			LinkageSpec::Cforall, void_func_t, body);
+	}
+
+	ObjectDecl * create_finally_hook( FunctionDecl * finally_wrapper ) {
+		// struct _cleanup_hook NAME __attribute__((cleanup( ... )));
+
+		// Make Cleanup Attribute.
+		std::list< Attribute * > attributes;
+		{
+			std::list< Expression * > attr_params;
+			attr_params.push_back( nameOf( finally_wrapper ) );
+			attrributes.push_back( new Attribute( "cleanup", attr_params ) );
+		}
+
+		return ObjectDecl( /* ... */
+			const std::string &name "finally_hook",
+			Type::StorageClasses(),
+			LinkageSpec::Cforall,
+			nullptr,
+			/* ... Type * ... */,
+			nullptr,
+			attributes
+			);
+	}
+
+
+	class ExceptionMutatorCore : public WithScoping {
+		enum Context { NoHandler, TerHandler, ResHandler };
+
+		// Also need to handle goto, break & continue.
+		// They need to be cut off in a ResHandler, until we enter another
+		// loop, switch or the goto stays within the function.
+
+		Context curContext;
+
+		// We might not need this, but a unique base for each try block's
+		// generated functions might be nice.
+		//std::string curFunctionName;
+		//unsigned int try_count = 0;
+
+
+	public:
+		ExceptionMutatorCore() :
+			curContext(NoHandler)
+		{}
+
+		void premutate( CatchStmt *tryStmt );
+		Statement * postmutate( ThrowStmt *throwStmt );
+		Statement * postmutate( TryStmt *tryStmt );
+	};
+
+	Statement * ExceptionMutatorCore::postmutate( ThrowStmt *throwStmt ) {
+		// Ignoring throwStmt->get_target() for now.
+		if ( ThrowStmt::Terminate == throwStmt->get_kind() ) {
+			if ( throwStmt->get_expr() ) {
+				return create_terminate_throw( throwStmt );
+			} else if ( TerHandler == curContext ) {
+				return create_terminate_rethrow( throwStmt );
+			} else {
+				assertf(false, "Invalid throw in %s at %i\n",
+					throwStmt->location.filename,
+					throwStmt->location.linenumber);
+				return nullptr;
+			}
+		} else {
+			if ( throwStmt->get_expr() ) {
+				return create_resume_throw( throwStmt );
+			} else if ( ResHandler == curContext ) {
+				return create_resume_rethrow( throwStmt );
+			} else {
+				assertf(false, "Invalid throwResume in %s at %i\n",
+					throwStmt->location.filename,
+					throwStmt->location.linenumber);
+				return nullptr;
+			}
+		}
+	}
+
+	Statement * ExceptionMutatorCore::postmutate( TryStmt *tryStmt ) {
+		// Generate a prefix for the function names?
+
+		CompoundStmt * block = new CompoundStmt();
+		Statement * inner = take_try_block( tryStmt );
+
+		if ( tryStmt->get_finally() ) {
+			// Define the helper function.
+			FunctionDecl * finally_block =
+				create_finally_wrapper( tryStmt );
+			appendDeclStmt( block, finally_block );
+			// Create and add the finally cleanup hook.
+			appendDeclStmt( block, create_finally_hook( finally_block ) );
+		}
+
+		StatementList termination_handlers;
+		StatementList resumption_handlers;
+		split( tryStmt->get_handlers(),
+		       termination_handlers, resumption_handlers );
+
+		if ( resumeption_handlers.size() ) {
+			// Define the helper function.
+			FunctionDecl * resume_handler =
+				create_resume_handler( resumption_handlers );
+			appendDeclStmt( block, resume_handler );
+			// Prepare hooks
+			inner = create_resume_wrapper( inner, resume_handler );
+		}
+
+		if ( termination_handlers.size() ) {
+			// Define the three helper functions.
+			FunctionDecl * try_wrapper = create_try_wrapper( inner );
+			appendDeclStmt( block, try_wrapper );
+			FunctionDecl * terminate_catch =
+				create_terminate_catch( termination_handlers );
+			appendDeclStmt( block, terminate_catch );
+			FunctionDecl * terminate_match =
+				create_terminate_match( termination_handlers );
+			appendDeclStmt( block, terminate_match );
+			// Build the call to the try wrapper.
+			inner = create_terminate_caller(
+				try_wrapper, terminate_catch, terminate_match );
+		}
+
+		// Embed the try block.
+		block->push_back( inner );
+
+		free_all( termination_handlers );
+		free_all( resumption_handlers );
+
+		return block;
+	}
+
+	void ExceptionMutatorCore::premutate( CatchStmt *catchStmt ) {
+		GuardValue( curContext );
+		if ( CatchStmt::Termination == catchStmt->get_kind() ) {
+			curContext = TerHandler;
+		} else {
+			curContext = ResHandler;
+		}
+	}
+
+    void translateEHM( std::list< Declaration *> & translationUnit ) {
+		PassVisitor<ExceptionMutatorCore> translator;
+		for ( Declaration * decl : translationUnit ) {
+			decl->mutate( translator );
+		}
+	}
+}
Index: src/ControlStruct/ExceptTranslate.h
===================================================================
--- src/ControlStruct/ExceptTranslate.h	(revision ba915fb57763ae661ddfbc000c81dde9a5ae0003)
+++ src/ControlStruct/ExceptTranslate.h	(revision ba915fb57763ae661ddfbc000c81dde9a5ae0003)
@@ -0,0 +1,27 @@
+//
+// 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.
+//
+// ExceptTranslate.h --
+//
+// Author           : Andrew Beach
+// Created On       : Tus Jun 06 10:13:00 2017
+// Last Modified By : Andrew Beach
+// Last Modified On : Thr Jun 22 15:57:00 2017
+// Update Count     : 0
+//
+
+#ifndef EXCEPT_TRANSLATE_H
+#define EXCEPT_TRANSLATE_H
+
+namespace ControlFlow {
+	void translateEHM( std::list< Declaration *> & translationUnit );
+	/* Converts exception handling structures into their underlying C code.
+	 * Translation does use the exception handling header, make sure it is
+	 * visible wherever translation occurs.
+	 */
+}
+
+#endif // EXCEPT_TRANSLATE_H
Index: src/GenPoly/DeclMutator.cc
===================================================================
--- src/GenPoly/DeclMutator.cc	(revision 5dd0704a42a723d2c413edca7d404b41b80a488f)
+++ src/GenPoly/DeclMutator.cc	(revision ba915fb57763ae661ddfbc000c81dde9a5ae0003)
@@ -9,7 +9,7 @@
 // Author           : Aaron B. Moss
 // Created On       : Fri Nov 27 14:44:00 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug  4 11:16:43 2016
-// Update Count     : 3
+// Last Modified By : Andrew Beach
+// Last Modified On : Thu Jun 22 13:49:00 2017
+// Update Count     : 4
 //
 
@@ -178,4 +178,5 @@
 	Statement* DeclMutator::mutate(CatchStmt *catchStmt) {
 		catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) );
+		catchStmt->set_cond( maybeMutate( catchStmt->get_cond(), *this ) );
 		catchStmt->set_body( mutateStatement( catchStmt->get_body() ) );
 		return catchStmt;
Index: src/GenPoly/PolyMutator.cc
===================================================================
--- src/GenPoly/PolyMutator.cc	(revision 5dd0704a42a723d2c413edca7d404b41b80a488f)
+++ src/GenPoly/PolyMutator.cc	(revision ba915fb57763ae661ddfbc000c81dde9a5ae0003)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug  4 11:26:22 2016
-// Update Count     : 16
+// Last Modified By : Andrew Beach
+// Last Modified On : Thu Jun 22 13:47:00 2017
+// Update Count     : 17
 //
 
@@ -123,12 +123,14 @@
 
 	Statement * PolyMutator::mutate(TryStmt *tryStmt) {
-		tryStmt->set_block(  maybeMutate( tryStmt->get_block(), *this ) );
+		tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
 		mutateAll( tryStmt->get_catchers(), *this );
+		tryStmt->set_finally( maybeMutate( tryStmt->get_finally(), *this ) );
 		return tryStmt;
 	}
 
 	Statement * PolyMutator::mutate(CatchStmt *cathStmt) {
-		cathStmt->set_body(  mutateStatement( cathStmt->get_body() ) );
-		cathStmt->set_decl(  maybeMutate( cathStmt->get_decl(), *this ) );
+		cathStmt->set_body( mutateStatement( cathStmt->get_body() ) );
+		cathStmt->set_cond( maybeMutate( cathStmt->get_cond(), *this ) );
+		cathStmt->set_decl( maybeMutate( cathStmt->get_decl(), *this ) );
 		return cathStmt;
 	}
Index: src/InitTweak/InitTweak.cc
===================================================================
--- src/InitTweak/InitTweak.cc	(revision 5dd0704a42a723d2c413edca7d404b41b80a488f)
+++ src/InitTweak/InitTweak.cc	(revision ba915fb57763ae661ddfbc000c81dde9a5ae0003)
@@ -474,4 +474,6 @@
 	public:
 		ConstExprChecker() : isConstExpr( true ) {}
+
+		using Visitor::visit;
 
 		virtual void visit( __attribute((unused)) ApplicationExpr *applicationExpr ) { isConstExpr = false; }
Index: src/Parser/StatementNode.cc
===================================================================
--- src/Parser/StatementNode.cc	(revision 5dd0704a42a723d2c413edca7d404b41b80a488f)
+++ src/Parser/StatementNode.cc	(revision ba915fb57763ae661ddfbc000c81dde9a5ae0003)
@@ -168,8 +168,7 @@
 
 Statement *build_resume_at( ExpressionNode *ctl, ExpressionNode *target ) {
-	std::list< Expression * > exps;
-	buildMoveList( ctl, exps );
-	assertf( exps.size() < 2, "This means we are leaking memory");
-	return new ThrowStmt( noLabels, ThrowStmt::Resume, !exps.empty() ? exps.back() : nullptr );
+	(void)ctl;
+	(void)target;
+	assertf( false, "resume at (non-local throw) is not yet supported," );
 }
 
Index: src/SynTree/Mutator.cc
===================================================================
--- src/SynTree/Mutator.cc	(revision 5dd0704a42a723d2c413edca7d404b41b80a488f)
+++ src/SynTree/Mutator.cc	(revision ba915fb57763ae661ddfbc000c81dde9a5ae0003)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Thu Mar  8 16:36:00 2017
-// Update Count     : 23
+// Last Modified On : Thu Jun 22 13:43:00 2017
+// Update Count     : 24
 //
 
@@ -162,4 +162,5 @@
 	tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
 	mutateAll( tryStmt->get_catchers(), *this );
+	tryStmt->set_finally( maybeMutate( tryStmt->get_finally(), *this ) );
 	return tryStmt;
 }
@@ -167,4 +168,5 @@
 Statement *Mutator::mutate( CatchStmt *catchStmt ) {
 	catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) );
+	catchStmt->set_cond( maybeMutate( catchStmt->get_cond(), *this ) );
 	catchStmt->set_body( maybeMutate( catchStmt->get_body(), *this ) );
 	return catchStmt;
Index: src/SynTree/Visitor.cc
===================================================================
--- src/SynTree/Visitor.cc	(revision 5dd0704a42a723d2c413edca7d404b41b80a488f)
+++ src/SynTree/Visitor.cc	(revision ba915fb57763ae661ddfbc000c81dde9a5ae0003)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Thu Jun  8 16:31:00 2017
-// Update Count     : 25
+// Last Modified On : Thu Jun 22 13:41:00 2017
+// Update Count     : 26
 //
 
@@ -137,8 +137,10 @@
 	maybeAccept( tryStmt->get_block(), *this );
 	acceptAll( tryStmt->get_catchers(), *this );
+	maybeAccept( tryStmt->get_finally(), *this );
 }
 
 void Visitor::visit( CatchStmt *catchStmt ) {
 	maybeAccept( catchStmt->get_decl(), *this );
+	maybeAccept( catchStmt->get_cond(), *this );
 	maybeAccept( catchStmt->get_body(), *this );
 }
