Index: src/Concurrency/Actors.cpp
===================================================================
--- src/Concurrency/Actors.cpp	(revision 7959e56ee51966b45243fdf7c184c30462ae78f8)
+++ src/Concurrency/Actors.cpp	(revision 1ee74df6749176dd405cc6c28df1405beb491b8a)
@@ -29,9 +29,9 @@
 struct CollectactorStructDecls : public ast::WithGuards {
 	unordered_set<const StructDecl *> & actorStructDecls;
-	unordered_set<const StructDecl *>  & messageStructDecls;
-	const StructDecl ** requestDecl;
-	const EnumDecl ** allocationDecl;
-	const StructDecl ** actorDecl;
-	const StructDecl ** msgDecl;
+	unordered_set<const StructDecl *> & messageStructDecls;
+	const StructDecl *& requestDecl;
+	const EnumDecl *& allocationDecl;
+	const StructDecl *& actorDecl;
+	const StructDecl *& msgDecl;
 	StructDecl * parentDecl;
 	bool insideStruct = false;
@@ -40,5 +40,5 @@
 	// finds and sets a ptr to the allocation enum, which is needed in the next pass
 	void previsit( const EnumDecl * decl ) {
-		if( decl->name == "allocation" ) *allocationDecl = decl;
+		if( decl->name == "allocation" ) allocationDecl = decl;
 	}
 
@@ -48,10 +48,11 @@
 		if ( decl->name == "actor" ) {
 			actorStructDecls.insert( decl ); // skip inserting fwd decl
-			*actorDecl = decl;
+			actorDecl = decl;
 		} else if( decl->name == "message" ) {
 			messageStructDecls.insert( decl ); // skip inserting fwd decl
-			*msgDecl = decl;
-		} else if( decl->name == "request" ) *requestDecl = decl;
-		else {
+			msgDecl = decl;
+		} else if( decl->name == "request" ) {
+			requestDecl = decl;
+		} else {
 			GuardValue(insideStruct);
 			insideStruct = true;
@@ -73,5 +74,5 @@
 	// this collects the derived actor and message struct decl ptrs
 	void postvisit( const StructInstType * node ) {
-		if ( ! *actorDecl || ! *msgDecl ) return;
+		if ( !actorDecl || !msgDecl ) return;
 		if ( insideStruct && !namedDecl ) {
 			auto actorIter = actorStructDecls.find( node->aggr() );
@@ -89,5 +90,5 @@
   public:
 	CollectactorStructDecls( unordered_set<const StructDecl *> & actorStructDecls, unordered_set<const StructDecl *> & messageStructDecls,
-		const StructDecl ** requestDecl, const EnumDecl ** allocationDecl, const StructDecl ** actorDecl, const StructDecl ** msgDecl )
+		const StructDecl *& requestDecl, const EnumDecl *& allocationDecl, const StructDecl *& actorDecl, const StructDecl *& msgDecl )
 		: actorStructDecls( actorStructDecls ), messageStructDecls( messageStructDecls ), requestDecl( requestDecl ),
 		allocationDecl( allocationDecl ), actorDecl(actorDecl), msgDecl(msgDecl) {}
@@ -196,9 +197,9 @@
 struct GenFuncsCreateTables : public ast::WithDeclsToAdd {
 	unordered_set<const StructDecl *> & actorStructDecls;
-	unordered_set<const StructDecl *>  & messageStructDecls;
-	const StructDecl ** requestDecl;
-	const EnumDecl ** allocationDecl;
-	const StructDecl ** actorDecl;
-	const StructDecl ** msgDecl;
+	unordered_set<const StructDecl *> & messageStructDecls;
+	const StructDecl *& requestDecl;
+	const EnumDecl *& allocationDecl;
+	const StructDecl *& actorDecl;
+	const StructDecl *& msgDecl;
 	FwdDeclTable & forwardDecls;
 
@@ -279,10 +280,10 @@
 						decl->location,
 						"base_actor",
-						new PointerType( new PointerType( new StructInstType( *actorDecl ) ) )
+						new PointerType( new PointerType( new StructInstType( actorDecl ) ) )
 					),
 					new ObjectDecl(
 						decl->location,
 						"base_msg",
-						new PointerType( new PointerType( new StructInstType( *msgDecl ) ) )
+						new PointerType( new PointerType( new StructInstType( msgDecl ) ) )
 					)
 				},                      // params
@@ -291,5 +292,5 @@
 						decl->location,
 						"__CFA_receive_wrap_ret",
-						new EnumInstType( *allocationDecl )
+						new EnumInstType( allocationDecl )
 					)
 				},
@@ -323,5 +324,5 @@
 					decl->location,
 					"new_req",
-					new StructInstType( *requestDecl )
+					new StructInstType( requestDecl )
 				)
 			));
@@ -331,7 +332,7 @@
 			derivedReceive->params.push_back( ast::deepCopy( derivedActorRef ) );
 			derivedReceive->params.push_back( ast::deepCopy( derivedMsgRef ) );
-			derivedReceive->params.push_back( new PointerType( new PointerType( new StructInstType( *actorDecl ) ) ) );
-			derivedReceive->params.push_back( new PointerType( new PointerType( new StructInstType( *msgDecl ) ) ) );
-			derivedReceive->returns.push_back( new EnumInstType( *allocationDecl ) );
+			derivedReceive->params.push_back( new PointerType( new PointerType( new StructInstType( actorDecl ) ) ) );
+			derivedReceive->params.push_back( new PointerType( new PointerType( new StructInstType( msgDecl ) ) ) );
+			derivedReceive->returns.push_back( new EnumInstType( allocationDecl ) );
 
 			// Generates: allocation (*my_work_fn)( derived_actor &, derived_msg &, actor **, message ** ) = receive;
@@ -348,9 +349,9 @@
 			// Function type is: allocation (*)( actor &, message & )
 			FunctionType * genericReceive = new FunctionType();
-			genericReceive->params.push_back( new ReferenceType( new StructInstType( *actorDecl ) ) );
-			genericReceive->params.push_back( new ReferenceType( new StructInstType( *msgDecl ) ) );
-			genericReceive->params.push_back( new PointerType( new PointerType( new StructInstType( *actorDecl ) ) ) );
-			genericReceive->params.push_back( new PointerType( new PointerType( new StructInstType( *msgDecl ) ) ) );
-			genericReceive->returns.push_back( new EnumInstType( *allocationDecl ) );
+			genericReceive->params.push_back( new ReferenceType( new StructInstType( actorDecl ) ) );
+			genericReceive->params.push_back( new ReferenceType( new StructInstType( msgDecl ) ) );
+			genericReceive->params.push_back( new PointerType( new PointerType( new StructInstType( actorDecl ) ) ) );
+			genericReceive->params.push_back( new PointerType( new PointerType( new StructInstType( msgDecl ) ) ) );
+			genericReceive->returns.push_back( new EnumInstType( allocationDecl ) );
 
 			// Generates: allocation (*fn)( actor &, message & ) = (allocation (*)( actor &, message & ))my_work_fn;
@@ -378,6 +379,6 @@
 					{
 						new NameExpr( decl->location, "new_req" ),
-						new CastExpr( decl->location, new AddressExpr( new NameExpr( decl->location, "receiver" ) ), new PointerType( new StructInstType( *actorDecl ) ), ExplicitCast ),
-						new CastExpr( decl->location, new AddressExpr( new NameExpr( decl->location, "msg" ) ), new PointerType( new StructInstType( *msgDecl ) ), ExplicitCast ),
+						new CastExpr( decl->location, new AddressExpr( new NameExpr( decl->location, "receiver" ) ), new PointerType( new StructInstType( actorDecl ) ), ExplicitCast ),
+						new CastExpr( decl->location, new AddressExpr( new NameExpr( decl->location, "msg" ) ), new PointerType( new StructInstType( msgDecl ) ), ExplicitCast ),
 						new NameExpr( decl->location, "fn" )
 					}
@@ -443,5 +444,5 @@
   public:
 	GenFuncsCreateTables( unordered_set<const StructDecl *> & actorStructDecls, unordered_set<const StructDecl *> & messageStructDecls,
-		const StructDecl ** requestDecl, const EnumDecl ** allocationDecl, const StructDecl ** actorDecl, const StructDecl ** msgDecl,
+		const StructDecl *& requestDecl, const EnumDecl *& allocationDecl, const StructDecl *& actorDecl, const StructDecl *& msgDecl,
 		FwdDeclTable & forwardDecls ) : actorStructDecls(actorStructDecls), messageStructDecls(messageStructDecls),
 		requestDecl(requestDecl), allocationDecl(allocationDecl), actorDecl(actorDecl), msgDecl(msgDecl), forwardDecls(forwardDecls) {}
@@ -453,5 +454,5 @@
 struct FwdDeclOperator : public ast::WithDeclsToAdd {
 	unordered_set<const StructDecl *> & actorStructDecls;
-	unordered_set<const StructDecl *>  & messageStructDecls;
+	unordered_set<const StructDecl *> & messageStructDecls;
 	FwdDeclTable & forwardDecls;
 
@@ -495,28 +496,22 @@
 	// for storing through the passes
 	// these are populated with various important struct decls
-	const StructDecl * requestDeclPtr = nullptr;
-	const EnumDecl * allocationDeclPtr = nullptr;
-	const StructDecl * actorDeclPtr = nullptr;
-	const StructDecl * msgDeclPtr = nullptr;
-
-	// double pointer to modify local ptrs above
-	const StructDecl ** requestDecl = &requestDeclPtr;
-	const EnumDecl ** allocationDecl = &allocationDeclPtr;
-	const StructDecl ** actorDecl = &actorDeclPtr;
-	const StructDecl ** msgDecl = &msgDeclPtr;
+	const StructDecl * requestDecl = nullptr;
+	const EnumDecl * allocationDecl = nullptr;
+	const StructDecl * actorDecl = nullptr;
+	const StructDecl * msgDecl = nullptr;
 
 	// first pass collects ptrs to allocation enum, request type, and generic receive fn typedef
 	// also populates maps of all derived actors and messages
-	Pass<CollectactorStructDecls>::run( translationUnit, actorStructDecls, messageStructDecls, requestDecl,
-		allocationDecl, actorDecl, msgDecl );
+	Pass<CollectactorStructDecls>::run( translationUnit, actorStructDecls, messageStructDecls,
+		requestDecl, allocationDecl, actorDecl, msgDecl );
 
 	// check that we have found all the decls we need from <actor.hfa>, if not no need to run the rest of this pass
-	if ( !allocationDeclPtr || !requestDeclPtr || !actorDeclPtr || !msgDeclPtr )
+	if ( !allocationDecl || !requestDecl || !actorDecl || !msgDecl )
 		return;
 
 	// second pass locates all receive() routines that overload the generic receive fn
 	// it then generates the appropriate operator '|' send routines for the receive routines
-	Pass<GenFuncsCreateTables>::run( translationUnit, actorStructDecls, messageStructDecls, requestDecl,
-		allocationDecl, actorDecl, msgDecl, forwardDecls );
+	Pass<GenFuncsCreateTables>::run( translationUnit, actorStructDecls, messageStructDecls,
+		requestDecl, allocationDecl, actorDecl, msgDecl, forwardDecls );
 
 	// The third pass forward declares operator '|' send routines
