diff --git a/include/boost/coroutine/detail/holder.hpp b/include/boost/coroutine/detail/parameters.hpp similarity index 70% rename from include/boost/coroutine/detail/holder.hpp rename to include/boost/coroutine/detail/parameters.hpp index 6293997..b615519 100644 --- a/include/boost/coroutine/detail/holder.hpp +++ b/include/boost/coroutine/detail/parameters.hpp @@ -4,8 +4,8 @@ // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_COROUTINES_DETAIL_HOLDER_H -#define BOOST_COROUTINES_DETAIL_HOLDER_H +#ifndef BOOST_COROUTINES_DETAIL_PARAMETERS_H +#define BOOST_COROUTINES_DETAIL_PARAMETERS_H #include #include @@ -21,33 +21,33 @@ namespace coroutines { namespace detail { template< typename Data > -struct holder +struct parameters { coroutine_context * ctx; Data const* data; bool force_unwind; - explicit holder( coroutine_context * ctx_) : + explicit parameters( coroutine_context * ctx_) : ctx( ctx_), data( 0), force_unwind( false) { BOOST_ASSERT( ctx); } - explicit holder( coroutine_context * ctx_, Data const* data_) : + explicit parameters( coroutine_context * ctx_, Data const* data_) : ctx( ctx_), data( data_), force_unwind( false) { BOOST_ASSERT( ctx); } - explicit holder( coroutine_context * ctx_, bool force_unwind_) : + explicit parameters( coroutine_context * ctx_, bool force_unwind_) : ctx( ctx_), data( 0), force_unwind( force_unwind_) { BOOST_ASSERT( ctx); BOOST_ASSERT( force_unwind); } - holder( holder const& other) : + parameters( parameters const& other) : ctx( other.ctx), data( other.data), force_unwind( other.force_unwind) {} - holder & operator=( holder const& other) + parameters & operator=( parameters const& other) { if ( this == & other) return * this; ctx = other.ctx; @@ -58,33 +58,33 @@ struct holder }; template< typename Data > -struct holder< Data & > +struct parameters< Data & > { coroutine_context * ctx; Data const* data; bool force_unwind; - explicit holder( coroutine_context * ctx_) : + explicit parameters( coroutine_context * ctx_) : ctx( ctx_), data( 0), force_unwind( false) { BOOST_ASSERT( ctx); } - explicit holder( coroutine_context * ctx_, Data const* data_) : + explicit parameters( coroutine_context * ctx_, Data const* data_) : ctx( ctx_), data( data_), force_unwind( false) { BOOST_ASSERT( ctx); } - explicit holder( coroutine_context * ctx_, bool force_unwind_) : + explicit parameters( coroutine_context * ctx_, bool force_unwind_) : ctx( ctx_), data( 0), force_unwind( force_unwind_) { BOOST_ASSERT( ctx); BOOST_ASSERT( force_unwind); } - holder( holder const& other) : + parameters( parameters const& other) : ctx( other.ctx), data( other.data), force_unwind( other.force_unwind) {} - holder & operator=( holder const& other) + parameters & operator=( parameters const& other) { if ( this == & other) return * this; ctx = other.ctx; @@ -95,33 +95,33 @@ struct holder< Data & > }; template< typename Data > -struct holder< Data * > +struct parameters< Data * > { coroutine_context * ctx; Data const* data; bool force_unwind; - explicit holder( coroutine_context * ctx_) : + explicit parameters( coroutine_context * ctx_) : ctx( ctx_), data( 0), force_unwind( false) { BOOST_ASSERT( ctx); } - explicit holder( coroutine_context * ctx_, Data const* data_) : + explicit parameters( coroutine_context * ctx_, Data const* data_) : ctx( ctx_), data( data_), force_unwind( false) { BOOST_ASSERT( ctx); } - explicit holder( coroutine_context * ctx_, bool force_unwind_) : + explicit parameters( coroutine_context * ctx_, bool force_unwind_) : ctx( ctx_), data( 0), force_unwind( force_unwind_) { BOOST_ASSERT( ctx); BOOST_ASSERT( force_unwind); } - holder( holder const& other) : + parameters( parameters const& other) : ctx( other.ctx), data( other.data), force_unwind( other.force_unwind) {} - holder & operator=( holder const& other) + parameters & operator=( parameters const& other) { if ( this == & other) return * this; ctx = other.ctx; @@ -132,20 +132,20 @@ struct holder< Data * > }; template<> -struct holder< void > +struct parameters< void > { coroutine_context * ctx; bool force_unwind; - explicit holder( coroutine_context * ctx_, bool force_unwind_ = false) : + explicit parameters( coroutine_context * ctx_, bool force_unwind_ = false) : ctx( ctx_), force_unwind( force_unwind_) { BOOST_ASSERT( ctx); } - holder( holder const& other) : + parameters( parameters const& other) : ctx( other.ctx), force_unwind( other.force_unwind) {} - holder & operator=( holder const& other) + parameters & operator=( parameters const& other) { if ( this == & other) return * this; ctx = other.ctx; @@ -160,4 +160,4 @@ struct holder< void > # include BOOST_ABI_SUFFIX #endif -#endif // BOOST_COROUTINES_DETAIL_HOLDER_H +#endif // BOOST_COROUTINES_DETAIL_PARAMETERS_H diff --git a/include/boost/coroutine/detail/pull_coroutine_base.hpp b/include/boost/coroutine/detail/pull_coroutine_base.hpp index ded8778..7595c63 100644 --- a/include/boost/coroutine/detail/pull_coroutine_base.hpp +++ b/include/boost/coroutine/detail/pull_coroutine_base.hpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include @@ -112,18 +112,18 @@ public: { BOOST_ASSERT( ! is_complete() ); - holder< R > hldr_to( & caller_); - holder< R > * hldr_from( - reinterpret_cast< holder< R > * >( - hldr_to.ctx->jump( + parameters< R > to( & caller_); + parameters< R > * from( + reinterpret_cast< parameters< R > * >( + to.ctx->jump( callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - callee_ = * hldr_from->ctx; - if ( hldr_from->data) result_ = * hldr_from->data; + BOOST_ASSERT( from->ctx); + callee_ = * from->ctx; + if ( from->data) result_ = * from->data; else result_ = none; - if ( hldr_from->force_unwind) throw forced_unwind(); + if ( from->force_unwind) throw forced_unwind(); if ( except_) rethrow_exception( except_); } @@ -216,18 +216,18 @@ public: { BOOST_ASSERT( ! is_complete() ); - holder< R * > hldr_to( & caller_); - holder< R * > * hldr_from( - reinterpret_cast< holder< R * > * >( - hldr_to.ctx->jump( + parameters< R * > to( & caller_); + parameters< R * > * from( + reinterpret_cast< parameters< R * > * >( + to.ctx->jump( callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - callee_ = * hldr_from->ctx; - if ( hldr_from->data) result_ = const_cast< R * >( hldr_from->data); + BOOST_ASSERT( from->ctx); + callee_ = * from->ctx; + if ( from->data) result_ = const_cast< R * >( from->data); else this->result_ = none; - if ( hldr_from->force_unwind) throw forced_unwind(); + if ( from->force_unwind) throw forced_unwind(); if ( except_) rethrow_exception( except_); } @@ -320,18 +320,18 @@ public: { BOOST_ASSERT( ! is_complete() ); - holder< R & > hldr_to( & caller_); - holder< R & > * hldr_from( - reinterpret_cast< holder< R & > * >( - hldr_to.ctx->jump( + parameters< R & > to( & caller_); + parameters< R & > * from( + reinterpret_cast< parameters< R & > * >( + to.ctx->jump( callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - callee_ = * hldr_from->ctx; - if ( hldr_from->data) result_ = const_cast< R * >( hldr_from->data); + BOOST_ASSERT( from->ctx); + callee_ = * from->ctx; + if ( from->data) result_ = const_cast< R * >( from->data); else this->result_ = none; - if ( hldr_from->force_unwind) throw forced_unwind(); + if ( from->force_unwind) throw forced_unwind(); if ( except_) rethrow_exception( except_); } @@ -420,16 +420,16 @@ public: { BOOST_ASSERT( ! is_complete() ); - holder< void > hldr_to( & caller_); - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( - hldr_to.ctx->jump( + parameters< void > to( & caller_); + parameters< void > * from( + reinterpret_cast< parameters< void > * >( + to.ctx->jump( callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - callee_ = * hldr_from->ctx; - if ( hldr_from->force_unwind) throw forced_unwind(); + BOOST_ASSERT( from->ctx); + callee_ = * from->ctx; + if ( from->force_unwind) throw forced_unwind(); if ( except_) rethrow_exception( except_); } }; diff --git a/include/boost/coroutine/detail/pull_coroutine_object.hpp b/include/boost/coroutine/detail/pull_coroutine_object.hpp index 416bbee..1d1ba37 100644 --- a/include/boost/coroutine/detail/pull_coroutine_object.hpp +++ b/include/boost/coroutine/detail/pull_coroutine_object.hpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -77,14 +77,14 @@ private: void enter_() { - holder< R > * hldr_from( - reinterpret_cast< holder< R > * >( + parameters< R > * from( + reinterpret_cast< parameters< R > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; - if ( hldr_from->data) this->result_ = * hldr_from->data; + this->callee_ = * from->ctx; + if ( from->data) this->result_ = * from->data; else this->result_ = none; if ( this->except_) rethrow_exception( this->except_); } @@ -94,10 +94,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< R > hldr_to( & this->caller_, true); + parameters< R > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -160,10 +160,10 @@ public: } this->flags_ |= flag_complete; - holder< R > hldr_to( & caller); + parameters< R > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "pull_coroutine is complete"); } @@ -206,13 +206,13 @@ private: void enter_() { - holder< R > * hldr_from( - reinterpret_cast< holder< R > * >( + parameters< R > * from( + reinterpret_cast< parameters< R > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -221,10 +221,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< R > hldr_to( & this->caller_, true); + parameters< R > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -269,10 +269,10 @@ public: } this->flags_ |= flag_complete; - holder< R > hldr_to( & caller); + parameters< R > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "pull_coroutine is complete"); } @@ -315,13 +315,13 @@ private: void enter_() { - holder< R > * hldr_from( - reinterpret_cast< holder< R > * >( + parameters< R > * from( + reinterpret_cast< parameters< R > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -330,10 +330,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< R > hldr_to( & this->caller_, true); + parameters< R > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -378,10 +378,10 @@ public: } this->flags_ |= flag_complete; - holder< R > hldr_to( & caller); + parameters< R > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "pull_coroutine is complete"); } @@ -424,14 +424,14 @@ private: void enter_() { - holder< R * > * hldr_from( - reinterpret_cast< holder< R * > * >( + parameters< R * > * from( + reinterpret_cast< parameters< R * > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; - if ( hldr_from->data) this->result_ = const_cast< R * >( hldr_from->data); + this->callee_ = * from->ctx; + if ( from->data) this->result_ = const_cast< R * >( from->data); else this->result_ = none; if ( this->except_) rethrow_exception( this->except_); } @@ -441,10 +441,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< R * > hldr_to( & this->caller_, true); + parameters< R * > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -517,10 +517,10 @@ public: } this->flags_ |= flag_complete; - holder< R * > hldr_to( & caller); + parameters< R * > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "pull_coroutine is complete"); } @@ -563,13 +563,13 @@ private: void enter_() { - holder< R * > * hldr_from( - reinterpret_cast< holder< R * > * >( + parameters< R * > * from( + reinterpret_cast< parameters< R * > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -578,10 +578,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< R * > hldr_to( & this->caller_, true); + parameters< R * > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -626,10 +626,10 @@ public: } this->flags_ |= flag_complete; - holder< R * > hldr_to( & caller); + parameters< R * > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "pull_coroutine is complete"); } @@ -672,13 +672,13 @@ private: void enter_() { - holder< R * > * hldr_from( - reinterpret_cast< holder< R * > * >( + parameters< R * > * from( + reinterpret_cast< parameters< R * > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -687,10 +687,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< R * > hldr_to( & this->caller_, true); + parameters< R * > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -735,10 +735,10 @@ public: } this->flags_ |= flag_complete; - holder< R * > hldr_to( & caller); + parameters< R * > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "pull_coroutine is complete"); } @@ -781,14 +781,14 @@ private: void enter_() { - holder< R * > * hldr_from( - reinterpret_cast< holder< R * > * >( + parameters< R * > * from( + reinterpret_cast< parameters< R * > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; - if ( hldr_from->data) this->result_ = hldr_from->data; + this->callee_ = * from->ctx; + if ( from->data) this->result_ = from->data; else this->result_ = none; if ( this->except_) rethrow_exception( this->except_); } @@ -798,10 +798,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< R * > hldr_to( & this->caller_, true); + parameters< R * > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -874,10 +874,10 @@ public: } this->flags_ |= flag_complete; - holder< R * > hldr_to( & caller); + parameters< R * > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "pull_coroutine is complete"); } @@ -920,13 +920,13 @@ private: void enter_() { - holder< R * > * hldr_from( - reinterpret_cast< holder< R * > * >( + parameters< R * > * from( + reinterpret_cast< parameters< R * > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -935,10 +935,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< R * > hldr_to( & this->caller_, true); + parameters< R * > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -983,10 +983,10 @@ public: } this->flags_ |= flag_complete; - holder< R * > hldr_to( & caller); + parameters< R * > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "pull_coroutine is complete"); } @@ -1029,13 +1029,13 @@ private: void enter_() { - holder< R * > * hldr_from( - reinterpret_cast< holder< R * > * >( + parameters< R * > * from( + reinterpret_cast< parameters< R * > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -1044,10 +1044,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< R * > hldr_to( & this->caller_, true); + parameters< R * > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -1092,10 +1092,10 @@ public: } this->flags_ |= flag_complete; - holder< R * > hldr_to( & caller); + parameters< R * > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "pull_coroutine is complete"); } @@ -1138,13 +1138,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -1153,10 +1153,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< void > hldr_to( & this->caller_, true); + parameters< void > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -1229,10 +1229,10 @@ public: } this->flags_ |= flag_complete; - holder< void > hldr_to( & caller); + parameters< void > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "pull_coroutine is complete"); } @@ -1275,13 +1275,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -1290,10 +1290,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< void > hldr_to( & this->caller_, true); + parameters< void > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -1338,10 +1338,10 @@ public: } this->flags_ |= flag_complete; - holder< void > hldr_to( & caller); + parameters< void > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "pull_coroutine is complete"); } @@ -1384,13 +1384,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -1399,10 +1399,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< void > hldr_to( & this->caller_, true); + parameters< void > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -1448,10 +1448,10 @@ public: } this->flags_ |= flag_complete; - holder< void > hldr_to( & caller); + parameters< void > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "pull_coroutine is complete"); } diff --git a/include/boost/coroutine/detail/push_coroutine_base.hpp b/include/boost/coroutine/detail/push_coroutine_base.hpp index 3b7203b..e72ff8d 100644 --- a/include/boost/coroutine/detail/push_coroutine_base.hpp +++ b/include/boost/coroutine/detail/push_coroutine_base.hpp @@ -104,16 +104,16 @@ public: { BOOST_ASSERT( ! is_complete() ); - holder< Arg > hldr_to( & caller_, & arg); - holder< Arg > * hldr_from( - reinterpret_cast< holder< Arg > * >( - hldr_to.ctx->jump( + parameters< Arg > to( & caller_, & arg); + parameters< Arg > * from( + reinterpret_cast< parameters< Arg > * >( + to.ctx->jump( callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - callee_ = * hldr_from->ctx; - if ( hldr_from->force_unwind) throw forced_unwind(); + BOOST_ASSERT( from->ctx); + callee_ = * from->ctx; + if ( from->force_unwind) throw forced_unwind(); if ( except_) rethrow_exception( except_); } @@ -121,16 +121,16 @@ public: { BOOST_ASSERT( ! is_complete() ); - holder< Arg > hldr_to( & caller_, & arg); - holder< Arg > * hldr_from( - reinterpret_cast< holder< Arg > * >( - hldr_to.ctx->jump( + parameters< Arg > to( & caller_, & arg); + parameters< Arg > * from( + reinterpret_cast< parameters< Arg > * >( + to.ctx->jump( callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - callee_ = * hldr_from->ctx; - if ( hldr_from->force_unwind) throw forced_unwind(); + BOOST_ASSERT( from->ctx); + callee_ = * from->ctx; + if ( from->force_unwind) throw forced_unwind(); if ( except_) rethrow_exception( except_); } }; @@ -208,16 +208,16 @@ public: { BOOST_ASSERT( ! is_complete() ); - holder< Arg * > hldr_to( & caller_, arg); - holder< Arg * > * hldr_from( - reinterpret_cast< holder< Arg * > * >( - hldr_to.ctx->jump( + parameters< Arg * > to( & caller_, arg); + parameters< Arg * > * from( + reinterpret_cast< parameters< Arg * > * >( + to.ctx->jump( callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - callee_ = * hldr_from->ctx; - if ( hldr_from->force_unwind) throw forced_unwind(); + BOOST_ASSERT( from->ctx); + callee_ = * from->ctx; + if ( from->force_unwind) throw forced_unwind(); if ( except_) rethrow_exception( except_); } }; @@ -295,16 +295,16 @@ public: { BOOST_ASSERT( ! is_complete() ); - holder< Arg * > hldr_to( & caller_, & arg); - holder< Arg * > * hldr_from( - reinterpret_cast< holder< Arg * > * >( - hldr_to.ctx->jump( + parameters< Arg * > to( & caller_, & arg); + parameters< Arg * > * from( + reinterpret_cast< parameters< Arg * > * >( + to.ctx->jump( callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - callee_ = * hldr_from->ctx; - if ( hldr_from->force_unwind) throw forced_unwind(); + BOOST_ASSERT( from->ctx); + callee_ = * from->ctx; + if ( from->force_unwind) throw forced_unwind(); if ( except_) rethrow_exception( except_); } }; @@ -382,16 +382,16 @@ public: { BOOST_ASSERT( ! is_complete() ); - holder< void > hldr_to( & caller_); - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( - hldr_to.ctx->jump( + parameters< void > to( & caller_); + parameters< void > * from( + reinterpret_cast< parameters< void > * >( + to.ctx->jump( callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - callee_ = * hldr_from->ctx; - if ( hldr_from->force_unwind) throw forced_unwind(); + BOOST_ASSERT( from->ctx); + callee_ = * from->ctx; + if ( from->force_unwind) throw forced_unwind(); if ( except_) rethrow_exception( except_); } }; diff --git a/include/boost/coroutine/detail/push_coroutine_object.hpp b/include/boost/coroutine/detail/push_coroutine_object.hpp index fc29dc3..d0829df 100644 --- a/include/boost/coroutine/detail/push_coroutine_object.hpp +++ b/include/boost/coroutine/detail/push_coroutine_object.hpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -77,13 +77,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -92,10 +92,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< Arg > hldr_to( & this->caller_, true); + parameters< Arg > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -146,18 +146,18 @@ public: coroutine_context caller; { - holder< void > hldr_to( & caller); - holder< Arg > * hldr_from( - reinterpret_cast< holder< Arg > * >( + parameters< void > to( & caller); + parameters< Arg > * from( + reinterpret_cast< parameters< Arg > * >( caller.jump( this->caller_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - BOOST_ASSERT( hldr_from->data); + BOOST_ASSERT( from->ctx); + BOOST_ASSERT( from->data); // create pull_coroutine - Caller c( * hldr_from->ctx, false, this->preserve_fpu(), alloc_, * hldr_from->data); + Caller c( * from->ctx, false, this->preserve_fpu(), alloc_, * from->data); try { fn_( c); } catch ( forced_unwind const&) @@ -168,10 +168,10 @@ public: } this->flags_ |= flag_complete; - holder< Arg > hldr_to( & caller); + parameters< Arg > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "push_coroutine is complete"); } @@ -214,13 +214,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -229,10 +229,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< Arg > hldr_to( & this->caller_, true); + parameters< Arg > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -265,18 +265,18 @@ public: coroutine_context caller; { - holder< void > hldr_to( & caller); - holder< Arg > * hldr_from( - reinterpret_cast< holder< Arg > * >( + parameters< void > to( & caller); + parameters< Arg > * from( + reinterpret_cast< parameters< Arg > * >( caller.jump( this->caller_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - BOOST_ASSERT( hldr_from->data); + BOOST_ASSERT( from->ctx); + BOOST_ASSERT( from->data); // create pull_coroutine - Caller c( * hldr_from->ctx, false, this->preserve_fpu(), alloc_, * hldr_from->data); + Caller c( * from->ctx, false, this->preserve_fpu(), alloc_, * from->data); try { fn_( c); } catch ( forced_unwind const&) @@ -287,10 +287,10 @@ public: } this->flags_ |= flag_complete; - holder< Arg > hldr_to( & caller); + parameters< Arg > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "push_coroutine is complete"); } @@ -333,13 +333,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -348,10 +348,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< Arg > hldr_to( & this->caller_, true); + parameters< Arg > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -384,18 +384,18 @@ public: coroutine_context caller; { - holder< void > hldr_to( & caller); - holder< Arg > * hldr_from( - reinterpret_cast< holder< Arg > * >( + parameters< void > to( & caller); + parameters< Arg > * from( + reinterpret_cast< parameters< Arg > * >( caller.jump( this->caller_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - BOOST_ASSERT( hldr_from->data); + BOOST_ASSERT( from->ctx); + BOOST_ASSERT( from->data); // create pull_coroutine - Caller c( * hldr_from->ctx, false, this->preserve_fpu(), alloc_, * hldr_from->data); + Caller c( * from->ctx, false, this->preserve_fpu(), alloc_, * from->data); try { fn_( c); } catch ( forced_unwind const&) @@ -406,10 +406,10 @@ public: } this->flags_ |= flag_complete; - holder< Arg > hldr_to( & caller); + parameters< Arg > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "push_coroutine is complete"); } @@ -452,13 +452,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -467,10 +467,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< Arg * > hldr_to( & this->caller_, true); + parameters< Arg * > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -531,18 +531,18 @@ public: coroutine_context caller; { - holder< void > hldr_to( & caller); - holder< Arg * > * hldr_from( - reinterpret_cast< holder< Arg * > * >( + parameters< void > to( & caller); + parameters< Arg * > * from( + reinterpret_cast< parameters< Arg * > * >( caller.jump( this->caller_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - BOOST_ASSERT( hldr_from->data); + BOOST_ASSERT( from->ctx); + BOOST_ASSERT( from->data); // create pull_coroutine - Caller c( * hldr_from->ctx, false, this->preserve_fpu(), alloc_, const_cast< Arg * >( hldr_from->data) ); + Caller c( * from->ctx, false, this->preserve_fpu(), alloc_, const_cast< Arg * >( from->data) ); try { fn_( c); } catch ( forced_unwind const&) @@ -553,10 +553,10 @@ public: } this->flags_ |= flag_complete; - holder< Arg * > hldr_to( & caller); + parameters< Arg * > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "push_coroutine is complete"); } @@ -599,13 +599,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -614,10 +614,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< Arg * > hldr_to( & this->caller_, true); + parameters< Arg * > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -650,18 +650,18 @@ public: coroutine_context caller; { - holder< void > hldr_to( & caller); - holder< Arg * > * hldr_from( - reinterpret_cast< holder< Arg * > * >( + parameters< void > to( & caller); + parameters< Arg * > * from( + reinterpret_cast< parameters< Arg * > * >( caller.jump( this->caller_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - BOOST_ASSERT( hldr_from->data); + BOOST_ASSERT( from->ctx); + BOOST_ASSERT( from->data); // create pull_coroutine - Caller c( * hldr_from->ctx, false, this->preserve_fpu(), alloc_, const_cast< Arg * >( hldr_from->data) ); + Caller c( * from->ctx, false, this->preserve_fpu(), alloc_, const_cast< Arg * >( from->data) ); try { fn_( c); } catch ( forced_unwind const&) @@ -672,10 +672,10 @@ public: } this->flags_ |= flag_complete; - holder< Arg * > hldr_to( & caller); + parameters< Arg * > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "push_coroutine is complete"); } @@ -718,13 +718,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -733,10 +733,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< Arg * > hldr_to( & this->caller_, true); + parameters< Arg * > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -769,18 +769,18 @@ public: coroutine_context caller; { - holder< void > hldr_to( & caller); - holder< Arg * > * hldr_from( - reinterpret_cast< holder< Arg * > * >( + parameters< void > to( & caller); + parameters< Arg * > * from( + reinterpret_cast< parameters< Arg * > * >( caller.jump( this->caller_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - BOOST_ASSERT( hldr_from->data); + BOOST_ASSERT( from->ctx); + BOOST_ASSERT( from->data); // create pull_coroutine - Caller c( * hldr_from->ctx, false, this->preserve_fpu(), alloc_, const_cast< Arg * >( hldr_from->data) ); + Caller c( * from->ctx, false, this->preserve_fpu(), alloc_, const_cast< Arg * >( from->data) ); try { fn_( c); } catch ( forced_unwind const&) @@ -791,10 +791,10 @@ public: } this->flags_ |= flag_complete; - holder< Arg * > hldr_to( & caller); + parameters< Arg * > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "push_coroutine is complete"); } @@ -837,13 +837,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -852,10 +852,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< Arg * > hldr_to( & this->caller_, true); + parameters< Arg * > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -916,18 +916,18 @@ public: coroutine_context caller; { - holder< void > hldr_to( & caller); - holder< Arg * > * hldr_from( - reinterpret_cast< holder< Arg * > * >( + parameters< void > to( & caller); + parameters< Arg * > * from( + reinterpret_cast< parameters< Arg * > * >( caller.jump( this->caller_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - BOOST_ASSERT( hldr_from->data); + BOOST_ASSERT( from->ctx); + BOOST_ASSERT( from->data); // create pull_coroutine - Caller c( * hldr_from->ctx, false, this->preserve_fpu(), alloc_, const_cast< Arg * >( hldr_from->data) ); + Caller c( * from->ctx, false, this->preserve_fpu(), alloc_, const_cast< Arg * >( from->data) ); try { fn_( c); } catch ( forced_unwind const&) @@ -938,10 +938,10 @@ public: } this->flags_ |= flag_complete; - holder< Arg * > hldr_to( & caller); + parameters< Arg * > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "push_coroutine is complete"); } @@ -984,13 +984,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -999,10 +999,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< Arg * > hldr_to( & this->caller_, true); + parameters< Arg * > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -1035,18 +1035,18 @@ public: coroutine_context caller; { - holder< void > hldr_to( & caller); - holder< Arg * > * hldr_from( - reinterpret_cast< holder< Arg * > * >( + parameters< void > to( & caller); + parameters< Arg * > * from( + reinterpret_cast< parameters< Arg * > * >( caller.jump( this->caller_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - BOOST_ASSERT( hldr_from->data); + BOOST_ASSERT( from->ctx); + BOOST_ASSERT( from->data); // create pull_coroutine - Caller c( * hldr_from->ctx, false, this->preserve_fpu(), alloc_, hldr_from->data); + Caller c( * from->ctx, false, this->preserve_fpu(), alloc_, from->data); try { fn_( c); } catch ( forced_unwind const&) @@ -1057,10 +1057,10 @@ public: } this->flags_ |= flag_complete; - holder< Arg * > hldr_to( & caller); + parameters< Arg * > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "push_coroutine is complete"); } @@ -1103,13 +1103,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -1118,10 +1118,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< Arg * > hldr_to( & this->caller_, true); + parameters< Arg * > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -1154,18 +1154,18 @@ public: coroutine_context caller; { - holder< void > hldr_to( & caller); - holder< Arg * > * hldr_from( - reinterpret_cast< holder< Arg * > * >( + parameters< void > to( & caller); + parameters< Arg * > * from( + reinterpret_cast< parameters< Arg * > * >( caller.jump( this->caller_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); - BOOST_ASSERT( hldr_from->data); + BOOST_ASSERT( from->ctx); + BOOST_ASSERT( from->data); // create pull_coroutine - Caller c( * hldr_from->ctx, false, this->preserve_fpu(), alloc_, hldr_from->data); + Caller c( * from->ctx, false, this->preserve_fpu(), alloc_, from->data); try { fn_( c); } catch ( forced_unwind const&) @@ -1176,10 +1176,10 @@ public: } this->flags_ |= flag_complete; - holder< Arg * > hldr_to( & caller); + parameters< Arg * > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "push_coroutine is complete"); } @@ -1222,13 +1222,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -1237,10 +1237,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< void > hldr_to( & this->caller_, true); + parameters< void > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -1301,17 +1301,17 @@ public: coroutine_context caller; { - holder< void > hldr_to( & caller); - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > to( & caller); + parameters< void > * from( + reinterpret_cast< parameters< void > * >( caller.jump( this->caller_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); + BOOST_ASSERT( from->ctx); // create pull_coroutine - Caller c( * hldr_from->ctx, false, this->preserve_fpu(), alloc_); + Caller c( * from->ctx, false, this->preserve_fpu(), alloc_); try { fn_( c); } catch ( forced_unwind const&) @@ -1322,10 +1322,10 @@ public: } this->flags_ |= flag_complete; - holder< void > hldr_to( & caller); + parameters< void > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "push_coroutine is complete"); } @@ -1368,13 +1368,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -1383,10 +1383,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< void > hldr_to( & this->caller_, true); + parameters< void > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -1419,17 +1419,17 @@ public: coroutine_context caller; { - holder< void > hldr_to( & caller); - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > to( & caller); + parameters< void > * from( + reinterpret_cast< parameters< void > * >( caller.jump( this->caller_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); + BOOST_ASSERT( from->ctx); // create pull_coroutine - Caller c( * hldr_from->ctx, false, this->preserve_fpu(), alloc_); + Caller c( * from->ctx, false, this->preserve_fpu(), alloc_); try { fn_( c); } catch ( forced_unwind const&) @@ -1440,10 +1440,10 @@ public: } this->flags_ |= flag_complete; - holder< void > hldr_to( & caller); + parameters< void > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "push_coroutine is complete"); } @@ -1486,13 +1486,13 @@ private: void enter_() { - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > * from( + reinterpret_cast< parameters< void > * >( this->caller_.jump( this->callee_, reinterpret_cast< intptr_t >( this), this->preserve_fpu() ) ) ); - this->callee_ = * hldr_from->ctx; + this->callee_ = * from->ctx; if ( this->except_) rethrow_exception( this->except_); } @@ -1501,10 +1501,10 @@ private: BOOST_ASSERT( ! this->is_complete() ); this->flags_ |= flag_unwind_stack; - holder< void > hldr_to( & this->caller_, true); + parameters< void > to( & this->caller_, true); this->caller_.jump( this->callee_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); this->flags_ &= ~flag_unwind_stack; @@ -1537,17 +1537,17 @@ public: coroutine_context caller; { - holder< void > hldr_to( & caller); - holder< void > * hldr_from( - reinterpret_cast< holder< void > * >( + parameters< void > to( & caller); + parameters< void > * from( + reinterpret_cast< parameters< void > * >( caller.jump( this->caller_, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ) ) ); - BOOST_ASSERT( hldr_from->ctx); + BOOST_ASSERT( from->ctx); // create pull_coroutine - Caller c( * hldr_from->ctx, false, this->preserve_fpu(), alloc_); + Caller c( * from->ctx, false, this->preserve_fpu(), alloc_); try { fn_( c); } catch ( forced_unwind const&) @@ -1558,10 +1558,10 @@ public: } this->flags_ |= flag_complete; - holder< void > hldr_to( & caller); + parameters< void > to( & caller); caller.jump( callee, - reinterpret_cast< intptr_t >( & hldr_to), + reinterpret_cast< intptr_t >( & to), this->preserve_fpu() ); BOOST_ASSERT_MSG( false, "push_coroutine is complete"); }