TypedValue * fg1_bcsqrt(TypedValue* rv, HPHP::VM::ActRec* ar, long long count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; switch (count) { default: // count >= 2 if ((args-1)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-1); } case 1: break; } if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } fh_bcsqrt((rv), (Value*)(args-0), (count > 1) ? (long long)(args[-1].m_data.num) : (long long)(-1)); if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull; return rv; }
void fg1_xml_parse_into_struct(TypedValue* rv, ActRec* ar, int32_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; switch (count) { default: // count >= 4 case 3: break; } if (!IS_STRING_TYPE((args-1)->m_type)) { tvCastToStringInPlace(args-1); } if ((args-0)->m_type != KindOfObject) { tvCastToObjectInPlace(args-0); } rv->m_type = KindOfInt64; VRefParamValue defVal3 = uninit_null(); rv->m_data.num = (int64_t)fh_xml_parse_into_struct(&args[-0].m_data, &args[-1].m_data, (args-2), (count > 3) ? (args-3) : (TypedValue*)(&defVal3)); }
TypedValue * fg1_gzinflate(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; switch (count) { default: // count >= 2 if ((args-1)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-1); } case 1: break; } if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } fh_gzinflate((rv), &args[-0].m_data, (count > 1) ? (int)(args[-1].m_data.num) : (int)(0)); if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull; return rv; }
TypedValue * fg1_highlight_string(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; switch (count) { default: // count >= 2 if ((args-1)->m_type != KindOfBoolean) { tvCastToBooleanInPlace(args-1); } case 1: break; } if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } fh_highlight_string((rv), &args[-0].m_data, (count > 1) ? (bool)(args[-1].m_data.num) : (bool)(false)); if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull; return rv; }
TypedValue * fg1_define(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; rv->m_type = KindOfBoolean; switch (count) { default: // count >= 3 if ((args-2)->m_type != KindOfBoolean) { tvCastToBooleanInPlace(args-2); } case 2: break; } if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } rv->m_data.num = (fh_define(&args[-0].m_data, (args-1), (count > 2) ? (bool)(args[-2].m_data.num) : (bool)(false))) ? 1LL : 0LL; return rv; }
TypedValue * fg1_function_exists(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; rv->m_type = KindOfBoolean; switch (count) { default: // count >= 2 if ((args-1)->m_type != KindOfBoolean) { tvCastToBooleanInPlace(args-1); } case 1: break; } if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } rv->m_data.num = (fh_function_exists((Value*)(args-0), (count > 1) ? (bool)(args[-1].m_data.num) : (bool)(true))) ? 1LL : 0LL; return rv; }
void fg1_unserialize(TypedValue* rv, ActRec* ar, int32_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; switch (count) { default: // count >= 2 if ((args-1)->m_type != KindOfArray) { tvCastToArrayInPlace(args-1); } case 1: break; } if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } Array defVal1 = empty_array; fh_unserialize(rv, &args[-0].m_data, (count > 1) ? &args[-1].m_data : (Value*)(&defVal1)); if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull; }
TypedValue * fg1_is_subclass_of(TypedValue* rv, HPHP::VM::ActRec* ar, long long count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; rv->_count = 0; rv->m_type = KindOfBoolean; switch (count) { default: // count >= 3 if ((args-2)->m_type != KindOfBoolean) { tvCastToBooleanInPlace(args-2); } case 2: break; } if (!IS_STRING_TYPE((args-1)->m_type)) { tvCastToStringInPlace(args-1); } rv->m_data.num = (fh_is_subclass_of((args-0), (Value*)(args-1), (count > 2) ? (bool)(args[-2].m_data.num) : (bool)(true))) ? 1LL : 0LL; return rv; }
TypedValue * fg1_user_error(TypedValue* rv, HPHP::VM::ActRec* ar, long long count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; rv->_count = 0; rv->m_type = KindOfBoolean; switch (count) { default: // count >= 2 if ((args-1)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-1); } case 1: break; } if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } rv->m_data.num = (fh_user_error((Value*)(args-0), (count > 1) ? (int)(args[-1].m_data.num) : (int)(k_E_USER_NOTICE))) ? 1LL : 0LL; return rv; }
TypedValue * fg1_apd_set_session_trace_socket(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; rv->m_type = KindOfBoolean; if ((args-3)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-3); } if ((args-2)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-2); } if ((args-1)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-1); } if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } rv->m_data.num = (fh_apd_set_session_trace_socket(&args[-0].m_data, (int)(args[-1].m_data.num), (int)(args[-2].m_data.num), (int)(args[-3].m_data.num))) ? 1LL : 0LL; return rv; }
TypedValue * fg1_get_meta_tags(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; rv->m_type = KindOfArray; switch (count) { default: // count >= 2 if ((args-1)->m_type != KindOfBoolean) { tvCastToBooleanInPlace(args-1); } case 1: break; } if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } fh_get_meta_tags((Value*)(rv), (Value*)(args-0), (count > 1) ? (bool)(args[-1].m_data.num) : (bool)(false)); if (rv->m_data.num == 0LL) rv->m_type = KindOfNull; return rv; }
TypedValue * fg1_xml_parse_into_struct(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; rv->m_type = KindOfInt64; switch (count) { default: // count >= 4 case 3: break; } if (!IS_STRING_TYPE((args-1)->m_type)) { tvCastToStringInPlace(args-1); } if ((args-0)->m_type != KindOfObject) { tvCastToObjectInPlace(args-0); } VRefParamValue defVal3 = null; rv->m_data.num = (int64_t)fh_xml_parse_into_struct((Value*)(args-0), (Value*)(args-1), (args-2), (count > 3) ? (args-3) : (TypedValue*)(&defVal3)); return rv; }
void fg1_uniqid(TypedValue* rv, ActRec* ar, int32_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; switch (count) { default: // count >= 2 if ((args-1)->m_type != KindOfBoolean) { tvCastToBooleanInPlace(args-1); } case 1: if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } case 0: break; } rv->m_type = KindOfString; fh_uniqid(&(rv->m_data), (count > 0) ? &args[-0].m_data : (Value*)(&null_string), (count > 1) ? (bool)(args[-1].m_data.num) : (bool)(false)); if (rv->m_data.num == 0LL) rv->m_type = KindOfNull; }
bool cellSame(Cell c1, Cell c2) { assert(cellIsPlausible(c1)); assert(cellIsPlausible(c2)); bool const null1 = IS_NULL_TYPE(c1.m_type); bool const null2 = IS_NULL_TYPE(c2.m_type); if (null1 && null2) return true; if (null1 || null2) return false; switch (c1.m_type) { case KindOfBoolean: case KindOfInt64: if (c2.m_type != c1.m_type) return false; return c1.m_data.num == c2.m_data.num; case KindOfDouble: if (c2.m_type != c1.m_type) return false; return c1.m_data.dbl == c2.m_data.dbl; case KindOfStaticString: case KindOfString: if (!IS_STRING_TYPE(c2.m_type)) return false; return c1.m_data.pstr->same(c2.m_data.pstr); case KindOfArray: if (c2.m_type != KindOfArray) return false; return c1.m_data.parr->equal(c2.m_data.parr, true); case KindOfObject: return c2.m_type == KindOfObject && c1.m_data.pobj == c2.m_data.pobj; case KindOfResource: return c2.m_type == KindOfResource && c1.m_data.pres == c2.m_data.pres; case KindOfUninit: case KindOfNull: case KindOfRef: case KindOfClass: break; } not_reached(); }
void fg1_bzwrite(TypedValue* rv, ActRec* ar, int32_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; switch (count) { default: // count >= 3 if ((args-2)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-2); } case 2: break; } if (!IS_STRING_TYPE((args-1)->m_type)) { tvCastToStringInPlace(args-1); } if ((args-0)->m_type != KindOfObject) { tvCastToObjectInPlace(args-0); } fh_bzwrite(rv, &args[-0].m_data, &args[-1].m_data, (count > 2) ? (int)(args[-2].m_data.num) : (int)(0)); if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull; }
void fg1_xml_parse(TypedValue* rv, ActRec* ar, int32_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; switch (count) { default: // count >= 3 if ((args-2)->m_type != KindOfBoolean) { tvCastToBooleanInPlace(args-2); } case 2: break; } if (!IS_STRING_TYPE((args-1)->m_type)) { tvCastToStringInPlace(args-1); } if ((args-0)->m_type != KindOfObject) { tvCastToObjectInPlace(args-0); } rv->m_type = KindOfInt64; rv->m_data.num = (int64_t)fh_xml_parse(&args[-0].m_data, &args[-1].m_data, (count > 2) ? (bool)(args[-2].m_data.num) : (bool)(true)); }
TypedValue* fg_call_user_method(HPHP::VM::ActRec *ar) { TypedValue rv; long long count = ar->numArgs(); TypedValue* args UNUSED = ((TypedValue*)ar) - 1; if (count >= 2LL) { if (IS_STRING_TYPE((args-0)->m_type)) { Array extraArgs; { ArrayInit ai(count-2, false); for (long long i = 2; i < count; ++i) { TypedValue* extraArg = ar->getExtraArg(i-2); if (tvIsStronglyBound(extraArg)) { ai.setRef(i-2, tvAsVariant(extraArg)); } else { ai.set(i-2, tvAsVariant(extraArg)); } } extraArgs = ai.create(); } fh_call_user_method((&(rv)), (count), (Value*)(args-0), (args-1), (Value*)(&extraArgs)); if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull; frame_free_locals_no_this_inl(ar, 2); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; } else { fg1_call_user_method(&rv, ar, count); frame_free_locals_no_this_inl(ar, 2); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; } } else { throw_missing_arguments_nr("call_user_method", count+1, 1); } rv.m_data.num = 0LL; rv._count = 0; rv.m_type = KindOfNull; frame_free_locals_no_this_inl(ar, 2); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; return &ar->m_r; }
TypedValue* tg1_8DateTime___construct(TypedValue* rv, HPHP::VM::ActRec* ar, long long count, ObjectData* this_) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; rv->m_data.num = 0LL; rv->_count = 0; rv->m_type = KindOfNull; switch (count) { default: // count >= 2 if ((args-1)->m_type != KindOfObject) { tvCastToObjectInPlace(args-1); } case 1: if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } case 0: break; } String defVal0 = "now"; th_8DateTime___construct((this_), (count > 0) ? (Value*)(args-0) : (Value*)(&defVal0), (count > 1) ? (Value*)(args-1) : (Value*)(&null_object)); return rv; }
TypedValue * fg1_mssql_query(TypedValue* rv, HPHP::VM::ActRec* ar, long long count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; switch (count) { default: // count >= 3 if ((args-2)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-2); } case 2: case 1: if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } case 0: break; } String defVal0 = null; Variant defVal1; fh_mssql_query((rv), (count > 0) ? (Value*)(args-0) : (Value*)(&defVal0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1), (count > 2) ? (long long)(args[-2].m_data.num) : (long long)(0)); if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull; return rv; }
TypedValue * fg1_apc_store(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; rv->m_type = KindOfBoolean; switch (count) { default: // count >= 4 if ((args-3)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-3); } case 3: if ((args-2)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-2); } case 2: break; } if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } rv->m_data.num = (fh_apc_store((Value*)(args-0), (args-1), (count > 2) ? (long)(args[-2].m_data.num) : (long)(0), (count > 3) ? (long)(args[-3].m_data.num) : (long)(0))) ? 1LL : 0LL; return rv; }
TypedValue * fg1_stream_get_line(TypedValue* rv, HPHP::VM::ActRec* ar, long long count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; switch (count) { default: // count >= 3 if (!IS_STRING_TYPE((args-2)->m_type)) { tvCastToStringInPlace(args-2); } case 2: if ((args-1)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-1); } case 1: break; } if ((args-0)->m_type != KindOfObject) { tvCastToObjectInPlace(args-0); } fh_stream_get_line((rv), (Value*)(args-0), (count > 1) ? (int)(args[-1].m_data.num) : (int)(0), (count > 2) ? (Value*)(args-2) : (Value*)(&null_string)); if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull; return rv; }
TypedValue * fg1_extract(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; rv->m_type = KindOfInt64; switch (count) { default: // count >= 3 if (!IS_STRING_TYPE((args-2)->m_type)) { tvCastToStringInPlace(args-2); } case 2: if ((args-1)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-1); } case 1: break; } if ((args-0)->m_type != KindOfArray) { tvCastToArrayInPlace(args-0); } rv->m_data.num = (int64_t)fh_extract(&args[-0].m_data, (count > 1) ? (int)(args[-1].m_data.num) : (int)(k_EXTR_OVERWRITE), (count > 2) ? &args[-2].m_data : (Value*)(&empty_string)); return rv; }
TypedValue * fg1_xml_parse(TypedValue* rv, HPHP::VM::ActRec* ar, long long count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; rv->_count = 0; rv->m_type = KindOfInt64; switch (count) { default: // count >= 3 if ((args-2)->m_type != KindOfBoolean) { tvCastToBooleanInPlace(args-2); } case 2: break; } if (!IS_STRING_TYPE((args-1)->m_type)) { tvCastToStringInPlace(args-1); } if ((args-0)->m_type != KindOfObject) { tvCastToObjectInPlace(args-0); } rv->m_data.num = (long long)fh_xml_parse((Value*)(args-0), (Value*)(args-1), (count > 2) ? (bool)(args[-2].m_data.num) : (bool)(true)); return rv; }
TypedValue* fg_apd_echo(ActRec* ar) { TypedValue rvSpace; TypedValue* rv = &rvSpace; int32_t count = ar->numArgs(); TypedValue* args UNUSED = ((TypedValue*)ar) - 1; if (count == 1) { if (IS_STRING_TYPE((args - 0)->m_type)) { rv->m_type = KindOfBoolean; rv->m_data.num = (fh_apd_echo(&args[-0].m_data)) ? 1LL : 0LL; } else { fg1_apd_echo(rv, ar, count); } } else { throw_wrong_arguments_nr("apd_echo", count, 1, 1, 1); rv->m_data.num = 0LL; rv->m_type = KindOfNull; } frame_free_locals_no_this_inl(ar, 1); memcpy(&ar->m_r, rv, sizeof(TypedValue)); return &ar->m_r; }
TypedValue* fg_bzopen(ActRec* ar) { TypedValue rvSpace; TypedValue* rv = &rvSpace; int32_t count = ar->numArgs(); TypedValue* args UNUSED = ((TypedValue*)ar) - 1; if (count == 2) { if (IS_STRING_TYPE((args - 1)->m_type)) { fh_bzopen(rv, (args-0), &args[-1].m_data); if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull; } else { fg1_bzopen(rv, ar, count); } } else { throw_wrong_arguments_nr("bzopen", count, 2, 2, 1); rv->m_data.num = 0LL; rv->m_type = KindOfNull; } frame_free_locals_no_this_inl(ar, 2); memcpy(&ar->m_r, rv, sizeof(TypedValue)); return &ar->m_r; }
TypedValue * fg1_evhttp_async_get(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; switch (count) { default: // count >= 3 if ((args-2)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-2); } case 2: if ((args-1)->m_type != KindOfArray) { tvCastToArrayInPlace(args-1); } case 1: break; } if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } fh_evhttp_async_get((rv), &args[-0].m_data, (count > 1) ? &args[-1].m_data : (Value*)(&null_array), (count > 2) ? (int)(args[-2].m_data.num) : (int)(5)); if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull; return rv; }
TypedValue * fg1_evhttp_set_cache(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; rv->m_data.num = 0LL; rv->m_type = KindOfNull; switch (count) { default: // count >= 3 if ((args-2)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-2); } case 2: break; } if ((args-1)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-1); } if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } fh_evhttp_set_cache(&args[-0].m_data, (int)(args[-1].m_data.num), (count > 2) ? (int)(args[-2].m_data.num) : (int)(80)); return rv; }
TypedValue* fg_pack(HPHP::VM::ActRec *ar) { TypedValue rv; int64_t count = ar->numArgs(); TypedValue* args UNUSED = ((TypedValue*)ar) - 1; if (count >= 1LL) { if (IS_STRING_TYPE((args-0)->m_type)) { Array extraArgs; { ArrayInit ai(count-1); for (int64_t i = 1; i < count; ++i) { TypedValue* extraArg = ar->getExtraArg(i-1); if (tvIsStronglyBound(extraArg)) { ai.setRef(i-1, tvAsVariant(extraArg)); } else { ai.set(i-1, tvAsVariant(extraArg)); } } extraArgs = ai.create(); } fh_pack((&(rv)), (count), &args[-0].m_data, (Value*)(&extraArgs)); if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull; frame_free_locals_no_this_inl(ar, 1); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; } else { fg1_pack(&rv, ar, count); frame_free_locals_no_this_inl(ar, 1); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; } } else { throw_missing_arguments_nr("pack", 1, count, 1); } rv.m_data.num = 0LL; rv.m_type = KindOfNull; frame_free_locals_no_this_inl(ar, 1); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; return &ar->m_r; }
TypedValue* fg_call_user_func_rpc(HPHP::VM::ActRec *ar) { TypedValue rv; int64_t count = ar->numArgs(); TypedValue* args UNUSED = ((TypedValue*)ar) - 1; if (count >= 5LL) { if ((args-3)->m_type == KindOfInt64 && IS_STRING_TYPE((args-2)->m_type) && (args-1)->m_type == KindOfInt64 && IS_STRING_TYPE((args-0)->m_type)) { Array extraArgs; { ArrayInit ai(count-5); for (int64_t i = 5; i < count; ++i) { TypedValue* extraArg = ar->getExtraArg(i-5); if (tvIsStronglyBound(extraArg)) { ai.setRef(i-5, tvAsVariant(extraArg)); } else { ai.set(i-5, tvAsVariant(extraArg)); } } extraArgs = ai.create(); } fh_call_user_func_rpc((&(rv)), (count), (Value*)(args-0), (int)(args[-1].m_data.num), (Value*)(args-2), (int)(args[-3].m_data.num), (args-4), (Value*)(&extraArgs)); if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull; frame_free_locals_no_this_inl(ar, 5); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; } else { fg1_call_user_func_rpc(&rv, ar, count); frame_free_locals_no_this_inl(ar, 5); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; } } else { throw_missing_arguments_nr("call_user_func_rpc", count+1, 1); } rv.m_data.num = 0LL; rv.m_type = KindOfNull; frame_free_locals_no_this_inl(ar, 5); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; return &ar->m_r; }
TypedValue* fg_function_exists(ActRec* ar) { TypedValue rvSpace; TypedValue* rv = &rvSpace; int32_t count = ar->numArgs(); TypedValue* args UNUSED = ((TypedValue*)ar) - 1; if (count >= 1 && count <= 2) { if ((count <= 1 || (args - 1)->m_type == KindOfBoolean) && IS_STRING_TYPE((args - 0)->m_type)) { rv->m_type = KindOfBoolean; rv->m_data.num = (fh_function_exists(&args[-0].m_data, (count > 1) ? (bool)(args[-1].m_data.num) : (bool)(true))) ? 1LL : 0LL; } else { fg1_function_exists(rv, ar, count); } } else { throw_wrong_arguments_nr("function_exists", count, 1, 2, 1); rv->m_data.num = 0LL; rv->m_type = KindOfNull; } frame_free_locals_no_this_inl(ar, 2); memcpy(&ar->m_r, rv, sizeof(TypedValue)); return &ar->m_r; }