// $Id$ #ifndef __rf_retval_ih__ #define __rf_retval_ih__ #include "rf_retval.hh" #include "rf_expr.hh" #include "rf_stack.ih" namespace rfrt { inline RetVal::RetVal (bool _b /* = true */) { if (_b) data = 0; else { data = 1; stack->destroy_results(); } } inline RetVal::RetVal (Expr* _saved_top) : data (1) { stack->destroy_results(_saved_top, stack->get_depth() - 1); } inline RetVal::operator bool () const { return (data & uintptr_t(0x01)) == 0; } inline bool RetVal::is_tail () const { return data > 1; } inline rftype::Func* RetVal::get_ptr () const { // return (rf_func_t)(data & ~(uintptr_t(0x01))); return reinterpret_cast(data); } } #endif // __rf_retval_ih__