[Bf-blender-cvs] [5eaabb9] object_nodes: Moved BasicBlock out of the Compiler struct.

Lukas Tönne noreply at git.blender.org
Tue Jan 12 12:38:24 CET 2016


Commit: 5eaabb9aaced6f6b4f272535ffe961568671c262
Author: Lukas Tönne
Date:   Thu Jan 7 11:11:22 2016 +0100
Branches: object_nodes
https://developer.blender.org/rB5eaabb9aaced6f6b4f272535ffe961568671c262

Moved BasicBlock out of the Compiler struct.

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

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 7064687..7872485 100644
--- a/source/blender/blenvm/compile/bvm_codegen.cc
+++ b/source/blender/blenvm/compile/bvm_codegen.cc
@@ -81,7 +81,7 @@ StackIndex Compiler::assign_stack_index(const TypeDesc &typedesc)
 	return stack_offset;
 }
 
-void Compiler::resolve_basic_block_symbols(const NodeGraph &graph, Compiler::BasicBlock &block)
+void Compiler::resolve_basic_block_symbols(const NodeGraph &graph, BasicBlock &block)
 {
 	for (NodeList::const_iterator it = block.nodes.begin(); it != block.nodes.end(); ++it) {
 		const NodeInstance &node = **it;
@@ -436,8 +436,8 @@ static void count_output_users(const NodeGraph &graph,
 	}
 }
 
-int Compiler::codegen_basic_block(const Compiler::BasicBlock &block,
-                                     const SocketUserMap &socket_users) const
+int Compiler::codegen_basic_block(const BasicBlock &block,
+                                  const SocketUserMap &socket_users) const
 {
 	int entry_point = current_address();
 	
diff --git a/source/blender/blenvm/compile/bvm_codegen.h b/source/blender/blenvm/compile/bvm_codegen.h
index 7af82a8..cd3106a 100644
--- a/source/blender/blenvm/compile/bvm_codegen.h
+++ b/source/blender/blenvm/compile/bvm_codegen.h
@@ -55,17 +55,18 @@ typedef std::map<ConstInputKey, StackIndex> InputIndexMap;
 typedef std::map<ConstOutputKey, StackIndex> OutputIndexMap;
 typedef std::map<ConstOutputKey, int> SocketUserMap;
 
+struct BasicBlock {
+	BasicBlock() : entry_point(0), return_index(BVM_STACK_INVALID) {}
+	NodeList nodes;
+	InputIndexMap input_index;
+	OutputIndexMap output_index;
+	int entry_point;
+	StackIndex return_index;
+};
+typedef std::map<ConstInputKey, BasicBlock> ExpressionMap;
+typedef std::vector<int> StackUsers;
+
 struct Compiler {
-	struct BasicBlock {
-		BasicBlock() : entry_point(0), return_index(BVM_STACK_INVALID) {}
-		NodeList nodes;
-		InputIndexMap input_index;
-		OutputIndexMap output_index;
-		int entry_point;
-		StackIndex return_index;
-	};
-	typedef std::map<ConstInputKey, BasicBlock> ExpressionMap;
-	typedef std::vector<int> StackUsers;
 	
 	Compiler();
 	virtual ~Compiler();




More information about the Bf-blender-cvs mailing list