pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:9183:    ADD_EFUN("floatp", f_floatp,tFunc(tMix,tInt01),OPT_TRY_OPTIMIZE);      /* function(mixed:int) */    ADD_EFUN("functionp", f_functionp,tFunc(tMix,tInt01),OPT_TRY_OPTIMIZE);      /* function(mixed:int) */    ADD_EFUN("callablep", f_callablep,tFunc(tMix,tInt01),OPT_TRY_OPTIMIZE);      /* function(string,string:int(0..1))|function(string,string*:array(string)) */    ADD_EFUN("glob",f_glob, -  tOr(tFunc(tOr(tStr,tArr(tStr)) tStr,tInt01),tFunc(tOr(tStr,tArr(tStr)) tSetvar(1,tArr(tStr)),tVar(1))), +  tOr(tFunc(tOr(tStr,tArr(tStr)) tStr,tInt01), +  tFunc(tOr(tStr,tArr(tStr)) tSetvar(1,tArr(tStr)),tVar(1))),    OPT_TRY_OPTIMIZE);      /* function(string,int|void:int) */    ADD_EFUN("hash",f_hash,tFunc(tStr tOr(tInt,tVoid),tInt),OPT_TRY_OPTIMIZE);       ADD_EFUN("hash_7_0",f_hash_7_0,    tFunc(tStr tOr(tInt,tVoid),tInt),OPT_TRY_OPTIMIZE);       ADD_EFUN("hash_7_4",f_hash_7_4,    tFunc(tStr tOr(tInt,tVoid),tInt),OPT_TRY_OPTIMIZE);
pike.git/src/builtin_functions.c:9206:       ADD_EFUN2("indices",f_indices,    tOr3(tFunc(tArray,tArr(tIntPos)),    tFunc(tOr3(tMap(tSetvar(1,tMix),tMix),    tSet(tSetvar(1,tMix)),    tNStr(tSetvar(1,tInt))),    tArr(tVar(1))),    tFunc(tOr(tObj,tPrg(tObj)),tArr(tStr))),    OPT_TRY_OPTIMIZE,fix_indices_type,0);    -  ADD_EFUN2("undefinedp", f_undefinedp, tFunc(tMix,tInt01), OPT_TRY_OPTIMIZE, 0, generate_undefinedp); -  ADD_EFUN2("destructedp", f_destructedp, tFunc(tMix,tInt01), OPT_TRY_OPTIMIZE,0, generate_destructedp); +  ADD_EFUN2("undefinedp", f_undefinedp, tFunc(tMix,tInt01), OPT_TRY_OPTIMIZE, +  0, generate_undefinedp); +  ADD_EFUN2("destructedp", f_destructedp, tFunc(tMix,tInt01), OPT_TRY_OPTIMIZE, +  0, generate_destructedp);      /* function(mixed:int) */    ADD_EFUN("intp", f_intp,tFunc(tMix,tInt01),OPT_TRY_OPTIMIZE);      /* function(mixed:int) */    ADD_EFUN("multisetp", f_multisetp,tFunc(tMix,tInt01),OPT_TRY_OPTIMIZE);      /* function(string:string)|function(int:int) */    ADD_EFUN("lower_case",f_lower_case,    tOr(tFunc(tStr,tStr), tFunc(tInt,tInt)),OPT_TRY_OPTIMIZE);
pike.git/src/builtin_functions.c:9281:    tFunc(tArr(tSetvar(0,tMix)) tArr(tInt), tArr(tVar(1))),    tFunc(tArray tArr(tNot(tInt)), tArray),    tFunc(tOr4(tObj,tFunction,tPrg(tObj),tInt) tArray, tArray)), 0);       /* FIXME: Is the third arg a good idea when the first is a mapping? */    ADD_EFUN("search",f_search,    tOr4(tFunc(tStr tOr(tStr,tInt) tOr(tVoid,tInt),    tInt),    tFunc(tArr(tSetvar(0,tMix)) tVar(0) tOr(tVoid,tInt),    tInt), -  tFunc(tMap(tSetvar(1,tMix),tSetvar(2,tMix)) tVar(2) tOr(tVoid,tVar(1)), -  tVar(1)), +  tFunc(tMap(tSetvar(1,tMix),tSetvar(2,tMix)) tVar(2) +  tOr(tVoid,tVar(1)), tVar(1)),    tFunc(tObj tMix tOr(tVoid, tSetvar(3, tMix)), tVar(3))),    0);       ADD_EFUN2("has_prefix", f_has_prefix, tFunc(tOr(tStr,tObj) tStr,tInt01),    OPT_TRY_OPTIMIZE, 0, 0);       ADD_EFUN2("has_suffix", f_has_suffix, tFunc(tStr tStr,tInt01),    OPT_TRY_OPTIMIZE, 0, 0);       ADD_EFUN("has_index",f_has_index,
pike.git/src/builtin_functions.c:9486:    tFunc(tStr tOr(tVoid,tObj),tMix), OPT_TRY_OPTIMIZE);      /* function(object,string:int) */    ADD_EFUN("object_variablep", f_object_variablep,    tFunc(tObj tStr,tInt), OPT_EXTERNAL_DEPEND);       /* function(array(mapping(int:mixed)):array(int)) */    ADD_FUNCTION2("interleave_array", f_interleave_array,    tFunc(tArr(tMap(tInt, tMix)), tArr(tInt)), 0,    OPT_TRY_OPTIMIZE); +     /* function(array(0=mixed),array(1=mixed):array(array(array(0)|array(1))) */    ADD_FUNCTION2("diff", f_diff,    tFunc(tArr(tSetvar(0,tMix)) tArr(tSetvar(1,tMix)),    tArr(tArr(tOr(tArr(tVar(0)),tArr(tVar(1)))))), 0,    OPT_TRY_OPTIMIZE);    -  /* Generate the n:th permutation of the array given as the first argument */ +     ADD_FUNCTION2("permute", f_permute, tFunc(tArray tIntPos,tArray), 0,    OPT_TRY_OPTIMIZE);       /* function(array,array:array(int)) */    ADD_FUNCTION2("diff_longest_sequence", f_diff_longest_sequence,    tFunc(tArray tArray,tArr(tInt)), 0, OPT_TRY_OPTIMIZE); -  +     /* function(array,array:array(int)) */    ADD_FUNCTION2("diff_dyn_longest_sequence", f_diff_dyn_longest_sequence,    tFunc(tArray tArray,tArr(tInt)), 0, OPT_TRY_OPTIMIZE); -  +     /* function(array,array:array(array)) */    ADD_FUNCTION2("diff_compare_table", f_diff_compare_table,    tFunc(tArray tArray, tArr(tArr(tInt))), 0, OPT_TRY_OPTIMIZE); -  +     /* function(array:array(int)) */    ADD_FUNCTION2("longest_ordered_sequence", f_longest_ordered_sequence,    tFunc(tArray,tArr(tInt)), 0, OPT_TRY_OPTIMIZE);      #define tMapStuff(IN,SUB,OUTFUN,OUTSET,OUTPROG,OUTMIX,OUTARR,OUTMAP) \    tOr6( tFuncV(IN tFuncV(SUB,tSetvar(0,tAnd(tMix,tZero)), \    tSetvar(2,tAny)),tVar(0), \    OUTFUN), \    tFuncV(IN tSet(tMix),tMix,OUTSET), \    tFuncV(IN tMap(tMix, tSetvar(2,tMix)), tMix, OUTMAP), \
pike.git/src/builtin_functions.c:9599:    tFunc(tIntPos tInt tOr(tVoid,tInt),tArr(tInt)),    tFunc(tIntPos tFloat tOr3(tVoid,tInt,tFloat),tArr(tFloat)),    tFunc(tIntPos tOr(tInt,tFloat) tFloat,tArr(tFloat)),    tFunc(tIntPos tMix tObj,tArr(tVar(1))),    tFunc(tIntPos tObj tOr(tVoid,tMix),tArr(tVar(1))),    tFunc(tIntPos tMix tMix    tFuncV(tNone,tMix,tSetvar(1,tMix)),tArr(tVar(1)))),    OPT_TRY_OPTIMIZE);       ADD_FUNCTION2("inherit_list", f_inherit_list, -  tFunc(tOr(tObj,tPrg(tObj)),tArr(tPrg(tObj))), 0, OPT_TRY_OPTIMIZE); +  tFunc(tOr(tObj,tPrg(tObj)),tArr(tPrg(tObj))), 0, +  OPT_TRY_OPTIMIZE); +     ADD_FUNCTION2("program_identifier_defined", f_program_identifier_defined, -  tFunc(tOr(tObj,tPrg(tObj)) tString,tString), 0, OPT_TRY_OPTIMIZE); +  tFunc(tOr(tObj,tPrg(tObj)) tString,tString), 0, +  OPT_TRY_OPTIMIZE); +     ADD_FUNCTION2("function_defined", f_function_defined,    tFunc(tFunction,tString), 0, OPT_TRY_OPTIMIZE);       ADD_EFUN("_gdb_breakpoint", pike_gdb_breakpoint,    tFunc(tNone,tVoid), OPT_SIDE_EFFECT);       ADD_EFUN("_gc_status",f__gc_status,    tFunc(tNone,tMap(tString,tOr(tInt,tFloat))),    OPT_EXTERNAL_DEPEND); -  +     ADD_FUNCTION ("implicit_gc_real_time", f_implicit_gc_real_time,    tFunc(tOr(tInt,tVoid),tInt), OPT_EXTERNAL_DEPEND); -  +     ADD_FUNCTION ("count_memory", f_count_memory,    tFuncV(tOr(tInt,tMap(tString,tInt)),    tOr8(tArray,tMultiset,tMapping,tObj,tPrg(tObj),    tString,tType(tMix),tInt),    tInt), 0); -  +     ADD_FUNCTION("identify_cycle", f_identify_cycle,    tFunc(tOr7(tArray,tMultiset,tMapping,tObj,tPrg(tObj),    tString,tType(tMix)),    tArr(tOr7(tArray,tMultiset,tMapping,tObj,tPrg(tObj),    tString,tType(tMix)))), 0);       ADD_INT_CONSTANT ("NATIVE_INT_MAX", MAX_INT_TYPE, 0);    ADD_INT_CONSTANT ("NATIVE_INT_MIN", MIN_INT_TYPE, 0);       /* Maybe make PIKEFLOAT_MANT_DIG, PIKEFLOAT_MIN_EXP and