I've had :init implemented for a couple of weeks now, but I can't check it in because it needs its own flag. Currently I'm using PObj_private7_FLAG to indicate a :init sub, but I stole PObj_private7_FLAG from SUB_FLAG_PF_POSTCOMP. Leo suggested using PObj_private2_FLAG, but when I did tons of tests broke. The :init flag is used at loadtime which is part of runtime. So that might explain the conflict.

Ok enough history. I'd like to get this feature checked in. The question is where should the flag go?
As things sit now we've run out of space in PObj_private.

Kevin

SUB_FLAG_PF_INIT

/*
* Subroutine flags
*/
typedef enum {
    /* runtime usage flags */
   SUB_FLAG_CORO_FF      = PObj_private0_FLAG,
   SUB_FLAG_C_HANDLER    = PObj_private0_FLAG, /* C exceptions only */
   SUB_FLAG_TAILCALL     = PObj_private2_FLAG,
   SUB_FLAG_GENERATOR    = PObj_private3_FLAG, /* unused old python pmcs */

   /* compile/loadtime usage flags */
   /* from packfile */
   SUB_FLAG_IS_OUTER     = PObj_private1_FLAG,
   SUB_FLAG_PF_INIT      = PObj_private7_FLAG,
   SUB_FLAG_PF_ANON      = PObj_private3_FLAG,
   SUB_FLAG_PF_MAIN      = PObj_private4_FLAG,
   SUB_FLAG_PF_LOAD      = PObj_private5_FLAG,
   SUB_FLAG_PF_IMMEDIATE = PObj_private6_FLAG,
   SUB_FLAG_PF_POSTCOMP  = PObj_private7_FLAG,

   SUB_FLAG_PF_MASK      = 0xfe   /* anon ... postcomp, is_outer*/
} sub_flags_enum;

Reply via email to