From ef46d1bf60a48f1378f83168a99bacbc3e6bcff7 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 21 May 2012 08:18:33 -0600 Subject: [PATCH] Remove Boxed_Value dependencies, they are not a solution --- .../chaiscript/dispatchkit/boxed_value.hpp | 19 ------------------- .../dispatchkit/proxy_functions.hpp | 1 - .../chaiscript/language/chaiscript_eval.hpp | 3 --- 3 files changed, 23 deletions(-) diff --git a/include/chaiscript/dispatchkit/boxed_value.hpp b/include/chaiscript/dispatchkit/boxed_value.hpp index 25a1e31..59e7f90 100644 --- a/include/chaiscript/dispatchkit/boxed_value.hpp +++ b/include/chaiscript/dispatchkit/boxed_value.hpp @@ -71,7 +71,6 @@ namespace chaiscript void *m_data_ptr; const void *m_const_data_ptr; bool m_is_ref; - std::vector > m_dependencies; }; struct Object_Data @@ -242,24 +241,6 @@ namespace chaiscript return !is_ref(); } - void clear_dependencies() - { - m_data->m_dependencies.clear(); - } - - template - 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; diff --git a/include/chaiscript/dispatchkit/proxy_functions.hpp b/include/chaiscript/dispatchkit/proxy_functions.hpp index 5b642cd..fe47ae5 100644 --- a/include/chaiscript/dispatchkit/proxy_functions.hpp +++ b/include/chaiscript/dispatchkit/proxy_functions.hpp @@ -74,7 +74,6 @@ namespace chaiscript Boxed_Value operator()(const std::vector ¶ms) const { Boxed_Value bv = do_call(params); - bv.add_dependencies(params.begin(), params.end()); return bv; } diff --git a/include/chaiscript/language/chaiscript_eval.hpp b/include/chaiscript/language/chaiscript_eval.hpp index e542f85..66e214f 100644 --- a/include/chaiscript/language/chaiscript_eval.hpp +++ b/include/chaiscript/language/chaiscript_eval.hpp @@ -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 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(this->children[0]->children[i]->children[0]->eval(t_ss))] = bv; }