Eliminate call to currentNM within NodeManager (#4227)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Wed, 8 Apr 2020 13:50:14 +0000 (08:50 -0500)
committerGitHub <noreply@github.com>
Wed, 8 Apr 2020 13:50:14 +0000 (08:50 -0500)
Eliminates 2 unintentional calls to the global access function.

src/expr/node_manager.cpp
src/expr/node_manager.h

index 16ffd83067b030ed55bdb5b00cf17b2be03525c4..efac349027dcd28d2423e8db8341e6b309916d23 100644 (file)
@@ -754,9 +754,9 @@ Node NodeManager::getBoundVarListForFunctionType( TypeNode tn ) {
   if( bvl.isNull() ){
     std::vector< Node > vars;
     for( unsigned i=0; i<tn.getNumChildren()-1; i++ ){
-      vars.push_back( NodeManager::currentNM()->mkBoundVar( tn[i] ) );
+      vars.push_back(mkBoundVar(tn[i]));
     }
-    bvl = NodeManager::currentNM()->mkNode( kind::BOUND_VAR_LIST, vars );
+    bvl = mkNode(kind::BOUND_VAR_LIST, vars);
     Trace("functions") << "Make standard bound var list " << bvl << " for " << tn << std::endl;
     tn.setAttribute(LambdaBoundVarListAttr(),bvl);
   }
index 2e8f40fff5e7cafca6006dec9e42d9e9da4c2177..aea49d979bd9acc4838da9f7c16483a48421ff35 100644 (file)
@@ -517,7 +517,7 @@ public:
   Node* mkBoundVarPtr(const TypeNode& type);
 
   /** get the canonical bound variable list for function type tn */
-  static Node getBoundVarListForFunctionType( TypeNode tn );
+  Node getBoundVarListForFunctionType( TypeNode tn );
 
   /**
    * Optional flags used to control behavior of NodeManager::mkSkolem().