void fg1_is_callable(TypedValue* rv, ActRec* ar, int32_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; tvCastToBooleanInPlace(args-1); rv->m_type = KindOfBoolean; VRefParamValue defVal2 = uninit_null(); rv->m_data.num = (fh_is_callable((args-0), (count > 1) ? (bool)(args[-1].m_data.num) : (bool)(false), (count > 2) ? (args-2) : (TypedValue*)(&defVal2))) ? 1LL : 0LL; }
TypedValue* fg_is_callable(HPHP::VM::ActRec *ar) { TypedValue rv; int64_t count = ar->numArgs(); TypedValue* args UNUSED = ((TypedValue*)ar) - 1; if (count >= 1LL && count <= 3LL) { if ((count <= 1 || (args-1)->m_type == KindOfBoolean)) { rv.m_type = KindOfBoolean; VRefParamValue defVal2 = uninit_null(); rv.m_data.num = (fh_is_callable((args-0), (count > 1) ? (bool)(args[-1].m_data.num) : (bool)(false), (count > 2) ? (args-2) : (TypedValue*)(&defVal2))) ? 1LL : 0LL; frame_free_locals_no_this_inl(ar, 3); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; } else { fg1_is_callable(&rv, ar, count); frame_free_locals_no_this_inl(ar, 3); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; } } else { throw_wrong_arguments_nr("is_callable", count, 1, 3, 1); } rv.m_data.num = 0LL; rv.m_type = KindOfNull; frame_free_locals_no_this_inl(ar, 3); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; return &ar->m_r; }