Commit: ac7d221734be124eb22107447152cf6f19db59f1
Author: Lukas Tönne
Date:   Sat May 28 08:22:11 2016 +0200
Branches: object_nodes
https://developer.blender.org/rBac7d221734be124eb22107447152cf6f19db59f1

Rename NodeValue to NodeConstant, to make it more consistent with LLVM naming.

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

M       source/blender/blenvm/compile/bvm_codegen.cc
M       source/blender/blenvm/compile/bvm_codegen.h
M       source/blender/blenvm/compile/node_graph.cc
M       source/blender/blenvm/compile/node_graph.h
M       source/blender/blenvm/compile/node_value.h
M       source/blender/blenvm/compile/typedesc.h
M       source/blender/blenvm/llvm/llvm_compiler.h
M       source/blender/blenvm/llvm/llvm_compiler_dual.cc
M       source/blender/blenvm/llvm/llvm_compiler_simple.cc
M       source/blender/blenvm/llvm/llvm_types.cc
M       source/blender/blenvm/llvm/llvm_types.h

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

diff --git a/source/blender/blenvm/compile/bvm_codegen.cc 
b/source/blender/blenvm/compile/bvm_codegen.cc
index 1b88564..9d9ddb6 100644
--- a/source/blender/blenvm/compile/bvm_codegen.cc
+++ b/source/blender/blenvm/compile/bvm_codegen.cc
@@ -233,7 +233,7 @@ void BVMCompilerBase::resolve_symbols(const NodeGraph 
&graph)
 }
 
 
-void BVMCompilerBase::push_constant(const NodeValue *value) const
+void BVMCompilerBase::push_constant(const NodeConstant *value) const
 {
        const TypeSpec *typespec = value->typedesc().get_typespec();
        
@@ -297,7 +297,7 @@ void BVMCompilerBase::push_constant(const NodeValue *value) 
const
        }
 }
 
-void BVMCompilerBase::codegen_value(const NodeValue *value, StackIndex offset) 
const
+void BVMCompilerBase::codegen_value(const NodeConstant *value, StackIndex 
offset) const
 {
        const TypeSpec *typespec = value->typedesc().get_typespec();
        
diff --git a/source/blender/blenvm/compile/bvm_codegen.h 
b/source/blender/blenvm/compile/bvm_codegen.h
index 6ffa1c8..114d178 100644
--- a/source/blender/blenvm/compile/bvm_codegen.h
+++ b/source/blender/blenvm/compile/bvm_codegen.h
@@ -92,9 +92,9 @@ protected:
        
        virtual int current_address() const = 0;
        
-       void push_constant(const NodeValue *value) const;
+       void push_constant(const NodeConstant *value) const;
        
-       void codegen_value(const NodeValue *value, StackIndex offset) const;
+       void codegen_value(const NodeConstant *value, StackIndex offset) const;
        int codegen_node_block(const NodeBlock &block);
        int codegen_graph(const NodeGraph &graph);
        
diff --git a/source/blender/blenvm/compile/node_graph.cc 
b/source/blender/blenvm/compile/node_graph.cc
index 297bb94..ad4a370 100644
--- a/source/blender/blenvm/compile/node_graph.cc
+++ b/source/blender/blenvm/compile/node_graph.cc
@@ -46,7 +46,7 @@ namespace blenvm {
 
 NodeInput::NodeInput(const string &name,
                      const TypeDesc &typedesc,
-                     NodeValue *default_value,
+                     NodeConstant *default_value,
                      BVMInputValueType value_type) :
     name(name),
     typedesc(typedesc),
@@ -211,7 +211,7 @@ bool NodeType::verify_arguments(Module *module, LLVMContext 
&context, raw_ostrea
 
 const NodeInput *NodeType::add_input(const string &name,
                                      const string &type,
-                                     NodeValue *default_value,
+                                     NodeConstant *default_value,
                                      BVMInputValueType value_type)
 {
        BLI_assert(!find_input(name));
@@ -342,7 +342,7 @@ ConstOutputKey ConstInputKey::link() const
                return ConstOutputKey();
 }
 
-const NodeValue *ConstInputKey::value() const
+const NodeConstant *ConstInputKey::value() const
 {
        return node->input_value(socket->name);
 }
@@ -399,12 +399,12 @@ void InputKey::link_set(const OutputKey &from) const
        node->link_set(socket->name, from);
 }
 
-const NodeValue *InputKey::value() const
+const NodeConstant *InputKey::value() const
 {
        return node->input_value(socket->name);
 }
 
-void InputKey::value_set(NodeValue *value) const
+void InputKey::value_set(NodeConstant *value) const
 {
        node->input_value_set(socket->name, value);
 }
@@ -525,7 +525,7 @@ bool NodeInstance::link_set(const string &name, const 
OutputKey &from)
                return false;
 }
 
-const NodeValue *NodeInstance::input_value(const string &name) const
+const NodeConstant *NodeInstance::input_value(const string &name) const
 {
        InputMap::const_iterator it = inputs.find(name);
        if (it != inputs.end()) {
@@ -535,13 +535,13 @@ const NodeValue *NodeInstance::input_value(const string 
&name) const
        return type->find_input(name)->default_value;
 }
 
-const NodeValue *NodeInstance::input_value(int index) const
+const NodeConstant *NodeInstance::input_value(int index) const
 {
        const NodeInput *socket = type->find_input(index);
        return socket ? input_value(socket->name) : NULL;
 }
 
-bool NodeInstance::input_value_set(const string &name, NodeValue *value)
+bool NodeInstance::input_value_set(const string &name, NodeConstant *value)
 {
        InputInstance &input = inputs[name];
        if (input.value)
@@ -722,7 +722,7 @@ const NodeGraph::Input *NodeGraph::add_input(const string 
&name, const string &t
        return &inputs.back();
 }
 
-const NodeGraph::Output *NodeGraph::add_output(const string &name, const 
string &type, NodeValue *default_value)
+const NodeGraph::Output *NodeGraph::add_output(const string &name, const 
string &type, NodeConstant *default_value)
 {
        BLI_assert(!get_output(name));
        TypeDesc td(type);
@@ -732,7 +732,7 @@ const NodeGraph::Output *NodeGraph::add_output(const string 
&name, const string
 
 /* ------------------------------------------------------------------------- */
 
-NodeInstance *NodeGraph::add_proxy(const TypeDesc &td, NodeValue 
*default_value)
+NodeInstance *NodeGraph::add_proxy(const TypeDesc &td, NodeConstant 
*default_value)
 {
        const TypeSpec *typespec = td.get_typespec();
        
@@ -776,7 +776,7 @@ NodeInstance *NodeGraph::add_proxy(const TypeDesc &td, 
NodeValue *default_value)
        return node;
 }
 
-OutputKey NodeGraph::add_value_node(NodeValue *value)
+OutputKey NodeGraph::add_value_node(NodeConstant *value)
 {
        const TypeSpec *typespec = value->typedesc().get_typespec();
        
@@ -913,7 +913,7 @@ OutputKey NodeGraph::find_root(const OutputKey &key)
 {
        OutputKey root = key;
        /* value is used to create a valid root node if necessary */
-       const NodeValue *value = NULL;
+       const NodeConstant *value = NULL;
        while (root && root.node->type->kind() == NODE_TYPE_PASS) {
                value = root.node->input_value(0);
                root = root.node->link(0);
diff --git a/source/blender/blenvm/compile/node_graph.h 
b/source/blender/blenvm/compile/node_graph.h
index d5a3abf..57b182b 100644
--- a/source/blender/blenvm/compile/node_graph.h
+++ b/source/blender/blenvm/compile/node_graph.h
@@ -65,13 +65,13 @@ struct NodeBlock;
 struct NodeInput {
        NodeInput(const string &name,
                   const TypeDesc &typedesc,
-                  NodeValue *default_value,
+                  NodeConstant *default_value,
                   BVMInputValueType value_type);
        ~NodeInput();
        
        string name;
        TypeDesc typedesc;
-       NodeValue *default_value;
+       NodeConstant *default_value;
        BVMInputValueType value_type;
 };
 
@@ -121,7 +121,7 @@ struct NodeType {
        
        const NodeInput *add_input(const string &name,
                                   const string &type,
-                                  NodeValue *default_value,
+                                  NodeConstant *default_value,
                                   BVMInputValueType value_type = 
INPUT_EXPRESSION);
 
        const NodeOutput *add_output(const string &name,
@@ -181,7 +181,7 @@ struct ConstInputKey {
        operator bool() const;
        
        ConstOutputKey link() const;
-       const NodeValue *value() const;
+       const NodeConstant *value() const;
        BVMInputValueType value_type() const;
        
        const NodeInstance *node;
@@ -199,8 +199,8 @@ struct InputKey {
        
        OutputKey link() const;
        void link_set(const OutputKey &from) const;
-       const NodeValue *value() const;
-       void value_set(NodeValue *value) const;
+       const NodeConstant *value() const;
+       void value_set(NodeConstant *value) const;
        BVMInputValueType value_type() const;
        
        NodeInstance *node;
@@ -218,7 +218,7 @@ struct NodeInstance {
                {}
                
                OutputKey link;
-               NodeValue *value;
+               NodeConstant *value;
        };
        
        typedef std::map<string, InputInstance> InputMap;
@@ -244,14 +244,14 @@ struct NodeInstance {
        OutputKey link(int index) const;
        bool link_set(const string &name, const OutputKey &from);
        
-       const NodeValue *input_value(const string &name) const;
-       const NodeValue *input_value(int index) const;
-       bool input_value_set(const string &name, NodeValue *value);
+       const NodeConstant *input_value(const string &name) const;
+       const NodeConstant *input_value(int index) const;
+       bool input_value_set(const string &name, NodeConstant *value);
        template <typename T>
        bool input_value_set(const string &name, const T &value)
        {
                const NodeInput *socket = type->find_input(name);
-               return socket ? input_value_set(name, 
NodeValue::create(socket->typedesc, value)) : false;
+               return socket ? input_value_set(name, 
NodeConstant::create(socket->typedesc, value)) : false;
        }
        
        const NodeType *type;
@@ -349,13 +349,13 @@ struct NodeGraph {
        void set_output_socket(const string &name, const OutputKey &key);
        
        const Input *add_input(const string &name, const string &type);
-       const Output *add_output(const string &name, const string &type, 
NodeValue *default_value);
+       const Output *add_output(const string &name, const string &type, 
NodeConstant *default_value);
        
        template <typename T>
        const Output *add_output(const string &name, const string &type, const 
T &default_value)
        {
                TypeDesc td(type);
-               return add_output(name, type, NodeValue::create(td, 
default_value));
+               return add_output(name, type, NodeConstant::create(td, 
default_value));
        }
        
        void finalize();
@@ -364,8 +364,8 @@ struct NodeGraph {
        const NodeBlock &main_block() const { return blocks.front(); }
        
 protected:
-       NodeInstance *add_proxy(const TypeDesc &typedesc, NodeValue 
*default_value = NULL);
-       OutputKey add_value_node(NodeValue *value);
+       NodeInstance *add_proxy(const TypeDesc &typedesc, NodeConstant 
*default_value = NULL);
+       OutputKey add_value_node(NodeConstant *value);
        OutputKey add_argument_node(const TypeDesc &typedesc);
        
        void remove_all_nodes();
@@ -417,7 +417,7 @@ const NodeInput *NodeType::add_input(const string &name,
                                      T default_value,
                                      BVMInputValueType value_type)
 {
-       NodeValue *c = NodeValue::create(TypeDesc(type), default_value);
+       NodeConstant *c = NodeConstant::create(TypeDesc(type), default_value);
        BLI_assert(c != NULL);
        return add_input(name, type, c, value_type);
 }
diff --git a/source/blender/blenvm/compile/node_value.h 
b/source/blender/blenvm/compile/node_value.h
index 13a5ba6..2c9fab4 100644
--- a/source/blender/blenvm/compile/node_value.h
+++ b/source/blender/blenvm/compile/node_value.h
@@ -170,13 +170,13 @@ private:
 
 /* ------------------------------------------------------------------------- */
 
-struct NodeValue {
+struct NodeConstant {
        template <typename T>
-       s

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to