Remove Boxed_Value dependencies, they are not a solution

This commit is contained in:
Jason Turner 2012-05-21 08:18:33 -06:00
parent 654f7e6b01
commit ef46d1bf60
3 changed files with 0 additions and 23 deletions

View File

@ -71,7 +71,6 @@ namespace chaiscript
void *m_data_ptr;
const void *m_const_data_ptr;
bool m_is_ref;
std::vector<boost::shared_ptr<Data> > m_dependencies;
};
struct Object_Data
@ -242,24 +241,6 @@ namespace chaiscript
return !is_ref();
}
void clear_dependencies()
{
m_data->m_dependencies.clear();
}
template<typename InItr>
void add_dependencies(InItr begin, const InItr &end)
{
while (begin != end)
{
if (begin->m_data != m_data)
{
m_data->m_dependencies.push_back(begin->m_data);
}
++begin;
}
}
void *get_ptr() const
{
return m_data->m_data_ptr;

View File

@ -74,7 +74,6 @@ namespace chaiscript
Boxed_Value operator()(const std::vector<Boxed_Value> &params) const
{
Boxed_Value bv = do_call(params);
bv.add_dependencies(params.begin(), params.end());
return bv;
}

View File

@ -279,7 +279,6 @@ namespace chaiscript
try {
if (lhs.is_undef()) {
retval = t_ss.call_function("clone", retval);
retval.clear_dependencies();
}
try {
@ -836,7 +835,6 @@ namespace chaiscript
if (this->children.size() > 0) {
for (size_t i = 0; i < this->children[0]->children.size(); ++i) {
Boxed_Value bv = t_ss.call_function("clone", this->children[0]->children[i]->eval(t_ss));
bv.clear_dependencies();
vec.push_back(bv);
}
}
@ -860,7 +858,6 @@ namespace chaiscript
std::map<std::string, Boxed_Value> retval;
for (size_t i = 0; i < this->children[0]->children.size(); ++i) {
Boxed_Value bv = t_ss.call_function("clone", this->children[0]->children[i]->children[1]->eval(t_ss));
bv.clear_dependencies();
retval[boxed_cast<std::string>(this->children[0]->children[i]->children[0]->eval(t_ss))]
= bv;
}