[Bf-blender-cvs] [37875dc] object_nodes: Renamed map of basic blocks used for expressions.
Lukas Tönne
noreply at git.blender.org
Sun Jan 3 09:56:23 CET 2016
Commit: 37875dc0038ced48be1c82908459e216ae3ce2f0
Author: Lukas Tönne
Date: Fri Jan 1 17:40:48 2016 +0100
Branches: object_nodes
https://developer.blender.org/rB37875dc0038ced48be1c82908459e216ae3ce2f0
Renamed map of basic blocks used for expressions.
===================================================================
M source/blender/blenvm/compile/bvm_codegen.cc
M source/blender/blenvm/compile/bvm_codegen.h
===================================================================
diff --git a/source/blender/blenvm/compile/bvm_codegen.cc b/source/blender/blenvm/compile/bvm_codegen.cc
index d1704ee..901f2ca 100644
--- a/source/blender/blenvm/compile/bvm_codegen.cc
+++ b/source/blender/blenvm/compile/bvm_codegen.cc
@@ -123,21 +123,21 @@ void BVMCompiler::resolve_basic_block_symbols(const NodeGraph &graph, BVMCompile
/* stored directly in the instructions list after creating values */
}
else if (node.is_input_expression(i)) {
- BasicBlock &func_block = basic_block_map.at(key);
+ BasicBlock &expr_block = expression_map.at(key);
/* initialize local arguments */
- func_block.output_index.insert(local_input_index.begin(), local_input_index.end());
+ expr_block.output_index.insert(local_input_index.begin(), local_input_index.end());
- resolve_basic_block_symbols(graph, func_block);
+ resolve_basic_block_symbols(graph, expr_block);
ConstSocketPair link_key = key.node->link(key.socket);
if (link_key.node) {
- func_block.return_index = func_block.output_index.at(link_key);
+ expr_block.return_index = expr_block.output_index.at(link_key);
}
else {
- func_block.return_index = assign_stack_index(input->typedesc);
+ expr_block.return_index = assign_stack_index(input->typedesc);
}
- block.input_index[key] = func_block.return_index;
+ block.input_index[key] = expr_block.return_index;
}
else if (node.has_input_link(i)) {
ConstSocketPair link_key(node.find_input_link_node(i),
@@ -185,11 +185,11 @@ void BVMCompiler::graph_node_append(const NodeInstance *node,
const NodeInstance *link_node = node->find_input_link_node(i);
if (socket->value_type == INPUT_EXPRESSION) {
- BasicBlock &block = basic_block_map[node->input(i)];
+ BasicBlock &expr_block = expression_map[node->input(i)];
if (link_node) {
- NodeSet func_visited;
- expression_node_append(link_node, block.nodes, func_visited);
+ NodeSet expr_visited;
+ expression_node_append(link_node, expr_block.nodes, expr_visited);
}
}
else {
@@ -214,7 +214,7 @@ void BVMCompiler::sort_graph_nodes(const NodeGraph &graph)
void BVMCompiler::resolve_symbols(const NodeGraph &graph)
{
main = BasicBlock();
- basic_block_map.clear();
+ expression_map.clear();
/* recursively sort node lists for functions */
sort_graph_nodes(graph);
@@ -571,8 +571,8 @@ int BVMCompiler::codegen_basic_block(const BVMCompiler::BasicBlock &block,
}
else {
if (node.is_input_expression(i)) {
- const BasicBlock &block = basic_block_map.at(key);
- push_jump_address(block.entry_point);
+ const BasicBlock &expr_block = expression_map.at(key);
+ push_jump_address(expr_block.entry_point);
}
push_stack_index(block.input_index.at(key));
@@ -622,7 +622,7 @@ Function *BVMCompiler::codegen(const NodeGraph &graph)
count_output_users(graph, output_users);
/* first generate expression functions */
- for (BasicBlockMap::iterator it = basic_block_map.begin(); it != basic_block_map.end(); ++it) {
+ for (ExpressionMap::iterator it = expression_map.begin(); it != expression_map.end(); ++it) {
const ConstSocketPair &key = it->first;
BasicBlock &block = it->second;
diff --git a/source/blender/blenvm/compile/bvm_codegen.h b/source/blender/blenvm/compile/bvm_codegen.h
index a00b1ec..8c8b922 100644
--- a/source/blender/blenvm/compile/bvm_codegen.h
+++ b/source/blender/blenvm/compile/bvm_codegen.h
@@ -63,7 +63,7 @@ struct BVMCompiler {
int entry_point;
StackIndex return_index;
};
- typedef std::map<ConstSocketPair, BasicBlock> BasicBlockMap;
+ typedef std::map<ConstSocketPair, BasicBlock> ExpressionMap;
typedef std::vector<int> StackUsers;
BVMCompiler();
@@ -103,7 +103,7 @@ protected:
private:
BasicBlock main;
- BasicBlockMap basic_block_map;
+ ExpressionMap expression_map;
StackUsers stack_users;
Function *fn;
More information about the Bf-blender-cvs
mailing list