pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:295:   static struct mapping *lfun_types;      static const char *const raw_lfun_types[] = {   #ifdef PIKE_NEW_LFUN_LOOKUP    tFuncV(tNone,tVoid,tVoid), /* "__INIT", */    tFuncV(tNone,tZero,tVoid), /* "create", */    tFuncV(tOr(tVoid,tInt),tVoid,tInt01), /* "_destruct", */    tFuncV(tInt tOr(tMap(tStr,tInt),tVoid),tVoid,tStr), /* "_sprintf", */    0,    -  tFuncV(tZero,tZero,tMix), /* "`+", */ +  tFuncV(tZero,tVoid,tMix), /* "`+", */    tFunc(tOr(tVoid,tZero),tMix), /* "`-", */    tFuncV(tNone,tZero,tMix), /* "`*", */    tFuncV(tNone,tZero,tMix), /* "`/", */    tFuncV(tNone,tZero,tMix), /* "`%", */    tFuncV(tNone,tZero,tMix), /* "`&", */    tFuncV(tNone,tZero,tMix), /* "`|", */    tFuncV(tNone,tZero,tMix), /* "`^", */    tFuncV(tZero,tVoid,tMix), /* "`<<", */    tFuncV(tZero,tVoid,tMix), /* "`>>", */    tFuncV(tOr3(tInt,tFloat,tObj),tVoid,tOr3(tObj,tInt,tFloat)), /* "pow", */    0,    -  tFuncV(tZero,tZero,tMix), /* "``+", */ +  tFuncV(tZero,tVoid,tMix), /* "``+", */    tFuncV(tZero,tVoid,tMix), /* "``-", */    tFuncV(tNone,tZero,tMix), /* "``*", */    tFuncV(tNone,tZero,tMix), /* "``/", */    tFuncV(tNone,tZero,tMix), /* "``%", */    tFuncV(tNone,tZero,tMix), /* "``&", */    tFuncV(tNone,tZero,tMix), /* "``|", */    tFuncV(tNone,tZero,tMix), /* "``^", */    tFuncV(tZero,tVoid,tMix), /* "``<<", */    tFuncV(tZero,tVoid,tMix), /* "``>>", */    tFuncV(tOr3(tInt,tFloat,tObj),tVoid,tOr3(tObj,tInt,tFloat)), /* "rpow", */
pike.git/src/program.c:354: Inside #if defined(PIKE_NEW_LFUN_LOOKUP)
      tFuncV(tOr(tVoid,tObj) tOr(tVoid,tInt),tVoid,tInt), /* "_sizeof", */    tFuncV(tOr(tVoid,tObj) tOr(tVoid,tInt),tVoid,tArray), /* "_indices", */    tFuncV(tOr(tVoid,tObj) tOr(tVoid,tInt),tVoid,tArray), /* "_values", */    tFuncV(tNone,tVoid,tArray), /* "_types", */    tFuncV(tOr(tVoid,tObj) tOr(tVoid,tInt)    tOr(tInt01,tVoid),tVoid,tArray), /* "_annotations", */    tFuncV(tNone,tVoid,tObj), /* "_get_iterator", */    0,    -  tFuncV(tZero,tZero,tMix), /* "`+=", */ +  tFuncV(tZero,tVoid,tMix), /* "`+=", */    tFuncV(tZero tSetvar(0,tZero),tVoid,tVar(0)), /* "`[]=", */    tFuncV(tStr tSetvar(0,tZero) tOr(tVoid,tObj) tOr(tVoid,tInt),tVoid,tVar(0)), /* "`->=", */    tFuncV(tZero,tVoid,tMix), /* "_m_delete", */    tFuncV(tNone, tVoid, tVoid), /* "_m_clear", */    tFuncV(tZero, tVoid, tVoid), /* "_m_add", */    tFuncV(tZero tZero, tVoid, tMix), /* "_atomic_get_set", */    0,       tFuncV(tObj tZero, tVoid, tVoid), /* "_serialize", */    tFuncV(tObj tZero, tVoid, tVoid), /* "_deserialize", */
pike.git/src/program.c:377: Inside #if defined(PIKE_NEW_LFUN_LOOKUP)
   tFuncV(tNone, tZero, tMix), /* "_iterator_next", */    tFuncV(tNone, tZero, tMix), /* "_iterator_index", */    tFuncV(tNone, tZero, tMix), /* "_iterator_value", */    0,    0, /* End marker. */      #else    tFuncV(tNone,tVoid,tVoid), /* "__INIT", */    tFuncV(tNone,tZero,tVoid), /* "create", */    tFuncV(tOr(tVoid,tInt),tVoid,tInt01), /* "_destruct", */ -  tFuncV(tZero,tZero,tMix), /* "`+", */ +  tFuncV(tZero,tVoid,tMix), /* "`+", */    tFunc(tOr(tVoid,tZero),tMix), /* "`-", */    tFuncV(tNone,tZero,tMix), /* "`&", */    tFuncV(tNone,tZero,tMix), /* "`|", */    tFuncV(tNone,tZero,tMix), /* "`^", */    tFuncV(tZero,tVoid,tMix), /* "`<<", */    tFuncV(tZero,tVoid,tMix), /* "`>>", */    tFuncV(tNone,tZero,tMix), /* "`*", */    tFuncV(tNone,tZero,tMix), /* "`/", */    tFuncV(tNone,tZero,tMix), /* "`%", */    tFuncV(tNone,tVoid,tMix), /* "`~", */
pike.git/src/program.c:402:    tFuncV(tString,tVoid,tMix), /* "cast", */    tFuncV(tNone,tVoid,tInt), /* "`!", */    tFuncV(tZero,tVoid,tMix), /* "`[]", */    tFuncV(tZero tSetvar(0,tZero),tVoid,tVar(0)), /* "`[]=", */    tFuncV(tStr tOr(tVoid,tObj) tOr(tVoid,tInt),tVoid,tMix), /* "`->", */    tFuncV(tStr tSetvar(0,tZero) tOr(tVoid,tObj) tOr(tVoid,tInt),tVoid,tVar(0)), /* "`->=", */    tFuncV(tOr(tVoid,tObj) tOr(tVoid,tInt),tVoid,tInt), /* "_sizeof", */    tFuncV(tOr(tVoid,tObj) tOr(tVoid,tInt),tVoid,tArray), /* "_indices", */    tFuncV(tOr(tVoid,tObj) tOr(tVoid,tInt),tVoid,tArray), /* "_values", */    tFuncV(tNone,tZero,tMix), /* "`()", */ -  tFuncV(tZero,tZero,tMix), /* "``+", */ +  tFuncV(tZero,tVoid,tMix), /* "``+", */    tFuncV(tZero,tVoid,tMix), /* "``-", */    tFuncV(tNone,tZero,tMix), /* "``&", */    tFuncV(tNone,tZero,tMix), /* "``|", */    tFuncV(tNone,tZero,tMix), /* "``^", */    tFuncV(tZero,tVoid,tMix), /* "``<<", */    tFuncV(tZero,tVoid,tMix), /* "``>>", */    tFuncV(tNone,tZero,tMix), /* "``*", */    tFuncV(tNone,tZero,tMix), /* "``/", */    tFuncV(tNone,tZero,tMix), /* "``%", */ -  tFuncV(tZero,tZero,tMix), /* "`+=", */ +  tFuncV(tZero,tVoid,tMix), /* "`+=", */    tFuncV(tStr,tVoid,tInt), /* "_is_type", */    tFuncV(tInt tOr(tMap(tStr,tInt),tVoid),tVoid,tStr), /* "_sprintf", */    tFuncV(tMix,tVoid,tInt), /* "_equal", */    tFuncV(tZero,tVoid,tMix), /* "_m_delete", */    tFuncV(tNone,tVoid,tObj), /* "_get_iterator", */    tFuncV(tZero tRangeBound tZero tRangeBound, tVoid, tMix), /* "`[..]" */    /* NOTE: After this point there are only fake lfuns. */    tFuncV(tZero tOr(tZero, tVoid), tZero, tMix), /* "_search", */    tFuncV(tNone,tVoid,tArray), /* "_types", */    tFuncV(tObj tZero, tVoid, tVoid), /* "_serialize", */
pike.git/src/program.c:676:    *! still intact. They are not freed if the @expr{_destruct@} function    *! adds external references to them. However, all objects with    *! @[lfun::_destruct] in the cycle are already scheduled for    *! destruction and will therefore be destroyed even if external    *! references are added to them.    *!    *! @seealso    *! @[lfun::create()], @[predef::destruct()]    */    - /*! @decl mixed lfun::`+(zero arg, zero ... rest) + /*! @decl mixed lfun::`+(zero arg)    *!    *! Left side addition/concatenation callback.    *! -  *! This is used by @[predef::`+]. It's called with any arguments +  *! This is used by @[predef::`+]. It's called with the argument    *! that follow this object in the argument list of the call to    *! @[predef::`+]. The returned value should be a new instance that    *! represents the addition/concatenation between this object and -  *! the arguments in the order they are given. +  *! the argument.    *!    *! @note    *! It's assumed that this function is side-effect free.    *! -  +  *! @note +  *! In versions of Pike prior to 8.1.10 this function could get +  *! called with multiple arguments. +  *!    *! @seealso    *! @[lfun::``+()], @[lfun::`+=()], @[predef::`+()]    */    - /*! @decl this_program lfun::`+=(zero arg, zero ... rest) + /*! @decl this_program lfun::`+=(zero arg)    *!    *! Destructive addition/concatenation callback.    *! -  *! This is used by @[predef::`+]. It's called with any arguments +  *! This is used by @[predef::`+]. It's called with the argument    *! that follow this object in the argument list of the call to    *! @[predef::`+]. It should update this object to represent the -  *! addition/concatenation between it and the arguments in the order -  *! they are given. It should always return this object. +  *! addition/concatenation between it and the argument. +  *! It should always return this object.    *!    *! @note    *! This function should only be implemented if @[lfun::`+()] also    *! is. It should only work as a more optimized alternative to that    *! one, for the case when it's safe to change the object    *! destructively and use it directly as the result.    *!    *! @note    *! This function is not an lfun for the @expr{+=@} operator. It's    *! only whether or not it's safe to do a destructive change that    *! decides if this function or @[lfun::`+()] is called; both the    *! @expr{+@} operator and the @expr{+=@} operator can call either    *! one.    *! -  +  *! @note +  *! In versions of Pike prior to 8.1.10 this function could get +  *! called with multiple arguments. +  *!    *! @seealso    *! @[lfun::`+()], @[predef::`+()]    */    - /*! @decl mixed lfun::``+(zero arg, zero ... rest) + /*! @decl mixed lfun::``+(zero arg)    *!    *! Right side addition/concatenation callback.    *! -  *! This is used by @[predef::`+]. It's called with any arguments -  *! that precede this object in the argument list of the call to -  *! @[predef::`+]. The returned value should be a new instance that -  *! represents the addition/concatenation between the arguments in -  *! the order they are given and this object. +  *! This is used by @[predef::`+]. It's called with the sum of the +  *! arguments that precede this object in the argument list of the +  *! call to @[predef::`+]. The returned value should be a new +  *! instance that represents the addition/concatenation between the +  *! argument and this object.    *!    *! @note    *! It's assumed that this function is side-effect free.    *! -  +  *! @note +  *! In versions of Pike prior to 8.1.10 this function could get +  *! called with multiple arguments. +  *!    *! @seealso    *! @[lfun::`+()], @[predef::`+()]    */      /*! @decl mixed lfun::`-(void|zero arg)    *!    *! Negation and left side subtraction/set difference callback.    *!    *! This is used by @[predef::`-]. When called without an argument    *! the result should be a new instance that represents the negation