Preprocessor: removed useless version of DataTree::AddExternalFunction()
parent
d8dcfa131e
commit
5364cdea25
|
@ -469,12 +469,6 @@ DataTree::AddLocalVariable(int symb_id, NodeID value) throw (LocalVariableExcept
|
||||||
local_variables_table[symb_id] = value;
|
local_variables_table[symb_id] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeID
|
|
||||||
DataTree::AddExternalFunction(const string &function_name, const vector<NodeID> &arguments)
|
|
||||||
{
|
|
||||||
return AddExternalFunction(symbol_table.getID(function_name), arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
NodeID
|
NodeID
|
||||||
DataTree::AddExternalFunction(int symb_id, const vector<NodeID> &arguments)
|
DataTree::AddExternalFunction(int symb_id, const vector<NodeID> &arguments)
|
||||||
{
|
{
|
||||||
|
|
|
@ -191,9 +191,6 @@ public:
|
||||||
//! Adds a model local variable with its value
|
//! Adds a model local variable with its value
|
||||||
void AddLocalVariable(int symb_id, NodeID value) throw (LocalVariableException);
|
void AddLocalVariable(int symb_id, NodeID value) throw (LocalVariableException);
|
||||||
//! Adds an external function node
|
//! Adds an external function node
|
||||||
NodeID AddExternalFunction(const string &function_name, const vector<NodeID> &arguments);
|
|
||||||
//! Adds an external function node
|
|
||||||
/*! \todo Use a map to share identical nodes */
|
|
||||||
NodeID AddExternalFunction(int symb_id, const vector<NodeID> &arguments);
|
NodeID AddExternalFunction(int symb_id, const vector<NodeID> &arguments);
|
||||||
//! Adds an external function node for the first derivative of an external function
|
//! Adds an external function node for the first derivative of an external function
|
||||||
NodeID AddFirstDerivExternalFunctionNode(int top_level_symb_id, const vector<NodeID> &arguments, int input_index);
|
NodeID AddFirstDerivExternalFunctionNode(int top_level_symb_id, const vector<NodeID> &arguments, int input_index);
|
||||||
|
|
|
@ -3588,7 +3588,7 @@ ExternalFunctionNode::normalizeEquation(int var_endo, vector<pair<int, pair<Node
|
||||||
V_NodeID.push_back(V_arguments[V_arguments.size()-1].second);
|
V_NodeID.push_back(V_arguments[V_arguments.size()-1].second);
|
||||||
}
|
}
|
||||||
if (!present)
|
if (!present)
|
||||||
return (make_pair(0, datatree.AddExternalFunction(datatree.symbol_table.getName(symb_id), V_NodeID)));
|
return (make_pair(0, datatree.AddExternalFunction(symb_id, V_NodeID)));
|
||||||
else
|
else
|
||||||
return (make_pair(1, (NodeID) NULL));
|
return (make_pair(1, (NodeID) NULL));
|
||||||
}
|
}
|
||||||
|
@ -3600,7 +3600,7 @@ ExternalFunctionNode::toStatic(DataTree &static_datatree) const
|
||||||
for (vector<NodeID>::const_iterator it = arguments.begin();
|
for (vector<NodeID>::const_iterator it = arguments.begin();
|
||||||
it != arguments.end(); it++)
|
it != arguments.end(); it++)
|
||||||
static_arguments.push_back((*it)->toStatic(static_datatree));
|
static_arguments.push_back((*it)->toStatic(static_datatree));
|
||||||
return static_datatree.AddExternalFunction(datatree.symbol_table.getName(symb_id), static_arguments);
|
return static_datatree.AddExternalFunction(symb_id, static_arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1821,7 +1821,8 @@ ParsingDriver::add_model_var_or_external_function(string *function_name, bool in
|
||||||
}
|
}
|
||||||
|
|
||||||
//By this point, we're sure that this function exists in the External Functions Table and is not a mod var
|
//By this point, we're sure that this function exists in the External Functions Table and is not a mod var
|
||||||
nid = data_tree->AddExternalFunction(*function_name, stack_external_function_args.top());
|
int symb_id = mod_file->symbol_table.getID(*function_name);
|
||||||
|
nid = data_tree->AddExternalFunction(symb_id, stack_external_function_args.top());
|
||||||
stack_external_function_args.pop();
|
stack_external_function_args.pop();
|
||||||
delete function_name;
|
delete function_name;
|
||||||
return nid;
|
return nid;
|
||||||
|
|
Loading…
Reference in New Issue