[Bf-blender-cvs] [5963c56] object_nodes: Removed/Disabled some deprecated code.

Lukas Tönne noreply at git.blender.org
Wed Jun 15 16:46:16 CEST 2016


Commit: 5963c56967320151c2482f7c1eaf4fb76bcc25f4
Author: Lukas Tönne
Date:   Sun Jun 12 14:50:54 2016 +0200
Branches: object_nodes
https://developer.blender.org/rB5963c56967320151c2482f7c1eaf4fb76bcc25f4

Removed/Disabled some deprecated code.

===================================================================

M	source/blender/blenvm/compile/bvm_codegen.cc
M	source/blender/blenvm/compile/node_graph.cc
M	source/blender/blenvm/compile/node_graph.h
M	source/blender/blenvm/util/util_debug.h

===================================================================

diff --git a/source/blender/blenvm/compile/bvm_codegen.cc b/source/blender/blenvm/compile/bvm_codegen.cc
index 6b34bdf..fb6fefa 100644
--- a/source/blender/blenvm/compile/bvm_codegen.cc
+++ b/source/blender/blenvm/compile/bvm_codegen.cc
@@ -164,6 +164,7 @@ StackIndex BVMCompilerBase::assign_stack_index(const TypeDesc &typedesc)
 
 void BVMCompilerBase::get_local_arg_indices(const NodeInstance *node, const NodeBlock *local_block)
 {
+#if 0 /* XXX deprecated */
 	for (int i = 0; i < node->num_outputs(); ++i) {
 		ConstOutputKey output = node->output(i);
 		
@@ -172,6 +173,9 @@ void BVMCompilerBase::get_local_arg_indices(const NodeInstance *node, const Node
 			output_index[local_output] = output_index.at(output);
 		}
 	}
+#else
+	UNUSED_VARS(node, local_block);
+#endif
 }
 
 void BVMCompilerBase::resolve_node_block_symbols(const NodeBlock *block)
diff --git a/source/blender/blenvm/compile/node_graph.cc b/source/blender/blenvm/compile/node_graph.cc
index eef6fe7..2860737 100644
--- a/source/blender/blenvm/compile/node_graph.cc
+++ b/source/blender/blenvm/compile/node_graph.cc
@@ -558,20 +558,7 @@ NodeBlock::NodeBlock(const string &name, NodeBlock *parent) :
     m_parent(parent)
 {}
 
-ConstOutputKey NodeBlock::local_arg(const string &name) const
-{
-	ArgumentMap::const_iterator it = m_local_args.find(name);
-	if (it != m_local_args.end())
-		return it->second;
-	else
-		return ConstOutputKey();
-}
-
-void NodeBlock::local_arg_set(const string &name, const ConstOutputKey &arg)
-{
-	m_local_args[name] = arg;
-}
-
+#if 0 /* unused */
 void NodeBlock::prune(const NodeSet &used_nodes)
 {
 	NodeSet used_block_nodes;
@@ -587,6 +574,7 @@ void NodeBlock::prune(const NodeSet &used_nodes)
 		}
 	}
 }
+#endif
 
 /* ------------------------------------------------------------------------- */
 
@@ -1042,6 +1030,7 @@ void NodeGraph::inline_function_calls()
 }
 #endif
 
+#if 0
 bool NodeGraph::add_block_node(NodeBlock &block, const OutputSet &local_vars,
                                NodeInstance *node, NodeSet &visited)
 {
@@ -1135,6 +1124,7 @@ void NodeGraph::blockify_nodes()
 		}
 	}
 }
+#endif
 
 static void used_nodes_append(NodeInstance *node, NodeSet &used_nodes)
 {
@@ -1212,10 +1202,14 @@ void NodeGraph::finalize()
 {
 	ensure_valid_expression_inputs();
 	skip_pass_nodes();
-//	inline_function_calls();
+#if 0
+	inline_function_calls();
+#endif
 	remove_unused_nodes();
 	sort_nodes();
-//	blockify_nodes();
+#if 0
+	blockify_nodes();
+#endif
 }
 
 /* ------------------------------------------------------------------------- */
diff --git a/source/blender/blenvm/compile/node_graph.h b/source/blender/blenvm/compile/node_graph.h
index 9227d13..c5d50e7 100644
--- a/source/blender/blenvm/compile/node_graph.h
+++ b/source/blender/blenvm/compile/node_graph.h
@@ -283,8 +283,6 @@ struct NodeIndexCmp {
 typedef std::set<const NodeInstance *, NodeIndexCmp> OrderedNodeSet;
 
 struct NodeBlock {
-	typedef std::map<string, ConstOutputKey> ArgumentMap;
-	
 	NodeBlock(const string &name, NodeBlock *parent = NULL);
 	
 	const string &name() const { return m_name; }
@@ -292,16 +290,15 @@ struct NodeBlock {
 	void parent_set(NodeBlock *parent) { m_parent = parent; }
 	NodeSet &nodes() { return m_nodes; }
 	const NodeSet &nodes() const { return m_nodes; }
-	ConstOutputKey local_arg(const string &name) const;
-	void local_arg_set(const string &name, const ConstOutputKey &arg);
-	
+
+#if 0 /* unused */
 	void prune(const NodeSet &used_nodes);
+#endif
 	
 private:
 	string m_name;
 	NodeBlock *m_parent;
 	NodeSet m_nodes;
-	ArgumentMap m_local_args; // XXX REMOVE
 	
 	MEM_CXX_CLASS_ALLOC_FUNCS("BVM:NodeBlock")
 };
@@ -397,15 +394,18 @@ protected:
 	
 	void remove_unused_nodes();
 	
+#if 0
 	bool add_block_node(NodeBlock &block, const OutputSet &local_vars,
 	                    NodeInstance *node, NodeSet &visited);
 	void blockify_nodes();
+#endif
 	
 	void sort_nodes();
 	
 public:
-	NodeBlockList blocks;
 	NodeInstanceMap nodes;
+	NodeBlockList blocks;
+	
 	InputList inputs;
 	OutputList outputs;
 
diff --git a/source/blender/blenvm/util/util_debug.h b/source/blender/blenvm/util/util_debug.h
index a50b966..54d585f 100644
--- a/source/blender/blenvm/util/util_debug.h
+++ b/source/blender/blenvm/util/util_debug.h
@@ -329,18 +329,6 @@ struct NodeGraphDumper {
 		debug_fprintf(ctx, NL);
 	}
 	
-	inline void dump_local_args(const NodeInstance *node, const NodeBlock *block) const
-	{
-		for (int i = 0; i < node->num_outputs(); ++i) {
-			ConstOutputKey output = node->output(i);
-			if (output.value_type() == OUTPUT_VARIABLE) {
-				ConstOutputKey local_arg = block->local_arg(output.socket->name);
-				if (local_arg)
-					dump_local_arg(node_id(node)+":"+output_id(output), local_arg);
-			}
-		}
-	}
-	
 	inline void dump_node_links(const NodeInstance *node) const
 	{
 		for (NodeInstance::InputMap::const_iterator it = node->inputs.begin(); it != node->inputs.end(); ++it) {




More information about the Bf-blender-cvs mailing list