TypedValue* fg_end_user_func_async(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 == KindOfInt64) && (args-0)->m_type == KindOfObject) { Variant defVal2; fh_end_user_func_async((&(rv)), (Value*)(args-0), (count > 1) ? (int)(args[-1].m_data.num) : (int)(k_GLOBAL_STATE_IGNORE), (count > 2) ? (args-2) : (TypedValue*)(&defVal2)); if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull; frame_free_locals_no_this_inl(ar, 3); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; } else { fg1_end_user_func_async(&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("end_user_func_async", 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; }
void fg1_end_user_func_async(TypedValue* rv, ActRec* ar, int32_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; switch (count) { default: // count >= 3 case 2: if ((args-1)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-1); } case 1: break; } if ((args-0)->m_type != KindOfObject) { tvCastToObjectInPlace(args-0); } Variant defVal2; fh_end_user_func_async(rv, &args[-0].m_data, (count > 1) ? (int)(args[-1].m_data.num) : (int)(k_GLOBAL_STATE_IGNORE), (count > 2) ? (args-2) : (TypedValue*)(&defVal2)); if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull; }