Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2016-06-12 15:50:54 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2016-06-12 15:50:54 +0300
commit5963c56967320151c2482f7c1eaf4fb76bcc25f4 (patch)
treecfe4e842a07047532ab296294c6b7f6d8e877775 /source
parent989810f3122d41247232fbc22dfa8eacb871be58 (diff)
Removed/Disabled some deprecated code.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenvm/compile/bvm_codegen.cc4
-rw-r--r--source/blender/blenvm/compile/node_graph.cc26
-rw-r--r--source/blender/blenvm/compile/node_graph.h14
-rw-r--r--source/blender/blenvm/util/util_debug.h12
4 files changed, 21 insertions, 35 deletions
diff --git a/source/blender/blenvm/compile/bvm_codegen.cc b/source/blender/blenvm/compile/bvm_codegen.cc
index 6b34bdf75b3..fb6fefaa676 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 eef6fe7c77f..286073740e6 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 9227d13dcb5..c5d50e70a16 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 a50b966c1f4..54d585fcdae 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) {