template <class T> inline void do_oop_work(T* p) { if (_buffer_curr == _buffer_top) { process_buffer(); } StarTask new_ref(p); *_buffer_curr = new_ref; ++_buffer_curr; }
template <class T> void do_oop_work(T* p) { if (_buffer_curr == _buffer_top) { assert(_hr_curr > _hr_buffer, "_hr_curr should be consistent with _buffer_curr"); process_buffer(); } StarTask new_ref(p); *_buffer_curr = new_ref; ++_buffer_curr; *_hr_curr = _from; ++_hr_curr; }
inline global_ref<T> &global_ref<T>::operator=(local_ref<T> &&other) { release(); _ref = new_ref(other.raw()); other.release(); return *this; }
inline global_ref<T> &global_ref<T>::operator=(const global_ref<T> &other) { release(); _ref = new_ref(other._ref); return *this; }
inline global_ref<T>::global_ref(local_ref<U> &&other) : _ref(new_ref(reinterpret_cast<T>(other.raw()))) { other.release(); }
inline global_ref<T>::global_ref(const global_ref<T> &other) : _ref(new_ref(other._ref)) {}
inline global_ref<T>::global_ref(T ref) : _ref(new_ref(ref)) {}