Remove Boxed_Value dependencies, they are not a solution
This commit is contained in:
parent
654f7e6b01
commit
ef46d1bf60
@ -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;
|
||||
|
@ -74,7 +74,6 @@ namespace chaiscript
|
||||
Boxed_Value operator()(const std::vector<Boxed_Value> ¶ms) const
|
||||
{
|
||||
Boxed_Value bv = do_call(params);
|
||||
bv.add_dependencies(params.begin(), params.end());
|
||||
return bv;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user