Perl

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • :init Where should we put the flag?

    6 answers - 1237 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    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 PFLAG to indicate a :init sub, but I
    stole PFLAG from SUB_FLAG_PF_PSTCMP.
    Leo suggested using PFLAG, 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.
    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 P
    Kevin
    SUB_FLAG_PF_INIT
    /*
    * Subroutine flags
    */
    typedef enum {
    /* runtime usage flags */
    SUB_FLAG_CRFF = PFLAG,
    SUB_FLAG_C_HANDLER = PFLAG, /* C exceptions only */
    SUB_FLAG_TAILCALL = PFLAG,
    SUB_FLAG_GENERATR = PFLAG, /* unused old python pmcs */
    /* compile/loadtime usage flags */
    /* from packfile */
    SUB_FLAG_ISUTER = PFLAG,
    SUB_FLAG_PF_INIT = PFLAG,
    SUB_FLAG_PF_ANN = PFLAG,
    SUB_FLAG_PF_MAIN = PFLAG,
    SUB_FLAG_PF_LAD = PFLAG,
    SUB_FLAG_PF_IMMEDIATE = PFLAG,
    SUB_FLAG_PF_PSTCMP = PFLAG,
    SUB_FLAG_PF_MASK = 0xfe /* anon postcomp, is_outer*/
    } sub_flags_enum;
  • No.1 | | 668 bytes | |

    Kevin Tew wrote:
    I've had :init implemented for a couple of weeks now, but I can't
    check it in because it needs its own flag.

    <snip>

    SUB_FLAG_GENERATR = PFLAG, /* unused old python
    pmcs */
    Have you tried this one? It's labeled unused, and I find no references
    to it at all in src or include, meaning it's not used in core Parrot
    (yes, two old unused Python PMCs use it; I'm sure they can be re-written
    not to use it without too much trouble, if they are used in the future -
    apologies if someone is actually maintaining these, I'm just going on
    the source comment)

    Jonathan
  • No.2 | | 445 bytes | |

    Am Sonntag, 29. 2006 21:25 schrieb Kevin Tew:
    I've had :init implemented for a couple of weeks now, but I can't check
    it in because it needs its own flag.

    I think I've answered that already. Again:

    * * SUB_FLAG_CRFF * * *= PFLAG,
    * * SUB_FLAG_C_HANDLER * *= PFLAG, /* C exceptions only */

    is/are runtime flags/s( and usuable as well as:

    * * SUB_FLAG_TAILCALL * * = PFLAG,

    leo
  • No.3 | | 4006 bytes | |

    Using either of those flags ( PFLAG or PFLAG
    ) break other tests.

    I'm up for more suggestions.
    Kevin

    Leopold Toetsch wrote:
    Am Sonntag, 29. 2006 21:25 schrieb Kevin Tew:

    >I've had :init implemented for a couple of weeks now, but I can't check
    >it in because it needs its own flag.
    >
    >

    I think I've answered that already. Again:

    SUB_FLAG_CRFF = PFLAG,
    SUB_FLAG_C_HANDLER = PFLAG, /* C exceptions only */

    is/are runtime flags/s( and usuable as well as:

    SUB_FLAG_TAILCALL = PFLAG,

    leo

    SUB_FLAG_PF_INIT = PFLAG

    Failed Test Stat Wstat Total Fail Failed List of
    Failed

    t/codingstd/c_code_coda.t 2 512 2 2 100.00% 1-2
    t/codingstd/cuddled_else.t 1 256 1 1 100.00% 1
    t/codingstd/tabs.t 1 256 1 1 100.00% 1
    t/compilers/imcc/reg/spill.t 1 256 9 1 11.11% 5
    t/compilers/imcc/syn/objects.t 11 2816 11 11 100.00% 1-11
    t/compilers/imcc/syn/tail.t 1 256 6 1 16.67% 6
    495 1 0.20% 324
    t/compilers/tge/grammar.t 2 512 3 2 66.67% 1-2
    2 512 2 2 100.00% 1-2
    t/examples/pir.t 1 256 19 1 5.26% 5
    t/examples/streams.t 4 1024 12 4 33.33% 3 5 7-8
    t/library/dumper.t 2 512 26 2 7.69% 12 26
    t/library/mime_base64.t 1 256 552 5 0.91% 550-552
    t/library/pg.t 0 6 43 77 179.07% 5-43
    t/library/streams.t 5 1280 20 5 25.00% 9-10
    15-16 19
    t/op/calling.t 7 1792 96 7 7.29% 39-41 54 64
    95-96
    t/op/gc.t 2 512 22 2 9.09% 10 13
    t/op/sprintf.t 308 37 12.01% 32-33
    37-43 56
    64 144
    153 187
    191 194-196
    216-223
    225-
    232 304-306
    t/op/string.t 1 256 160 1 0.62% 144
    t/pmc/delegate.t 2 512 9 2 22.22% 8-9
    t/pmc/freeze.t 2 512 25 2 8.00% 24-25
    t/pmc/mmd.t 3 768 39 3 7.69% 29-31
    t/pmc/object-meths.t 15 3840 34 15 44.12% 13-15 21-25
    28-34
    t/pmc/objects.t 15 3840 78 15 19.23% 17
    50-51 53-55
    59 64 68-71
    75-77
    t/pmc/parrotobject.t 3 768 5 3 60.00% 2-3 5
    t/pmc/resizablestringarray.t 173 10 5.78% 65-68 75-76
    83-84 91-92
    t/pmc/sub.t 1 256 58 1 1.72% 58
    t/pmc/threads.t 2 512 20 2 10.00% 13-14
    t/stm/queue.t 3 768 4 3 75.00% 1-3
    t/stm/runtime.t 2 512 5 2 40.00% 4-5
    t/tools/smartlinks.t 255 65280 65 129 198.46% 1-65
    8 tests and 532 subtests skipped.
    Failed 31/260 test scripts, 88.08% okay. 246/8079 subtests failed,
    96.96% okay.
    make: [test] Error 1

    SUB_FLAG_PF_INIT = PFLAG
    Failed Test Stat Wstat Total Fail Failed List of
    Failed

    t/codingstd/c_code_coda.t 2 512 2 2 100.00% 1-2
    t/codingstd/cuddled_else.t 1 256 1 1 100.00% 1
    t/codingstd/tabs.t 1 256 1 1 100.00% 1
    495 1 0.20% 324
    t/dynpmc/dynlexpad.t 4 1024 6 4 66.67% 2-5
    1 256 2 1 50.00% 2
    t/library/mime_base64.t 1 256 552 5 0.91% 550-552
    t/library/pg.t 0 6 43 77 179.07% 5-43
    t/op/calling.t 2 512 96 2 2.08% 95-96
    t/op/debuginfo.t 1 256 6 1 16.67% 4
    t/op/lexicals.t 1 256 41 1 2.44% 22
    t/op/sprintf.t 308 37 12.01% 32-33
    37-43 56
    64 144
    153 187
    191 194-196
    216-223
    225-
    232 304-306
    t/pmc/resizablestringarray.t 173 10 5.78% 65-68 75-76
    83-84 91-92
    t/tools/smartlinks.t 255 65280 65 129 198.46% 1-65
    8 tests and 532 subtests skipped.
    Failed 14/260 test scripts, 94.62% okay. 168/8079 subtests failed,
    97.92% okay.

    SUB_FLAG_PF_INIT = PFLAG
    Failed Test Stat Wstat Total Fail Failed List of
    Failed

    t/codingstd/c_code_coda.t 2 512 2 2 100.00% 1-2
    t/codingstd/cuddled_else.t 1 256 1 1 100.00% 1
    t/codingstd/tabs.t 1 256 1 1 100.00% 1
    495 1 0.20% 324
    1 256 2 1 50.00% 2
    t/library/mime_base64.t 1 256 552 5 0.91% 550-552
    t/library/pg.t 0 6 43 77 179.07% 5-43
    t/op/calling.t 2 512 96 2 2.08% 95-96
    t/op/sprintf.t 308 37 12.01% 32-33
    37-43 56
    64 144
    153 187
    191 194-196
    216-223
    225-
    232 304-306
    t/pmc/resizablestringarray.t 173 10 5.78% 65-68 75-76
    83-84 91-92
    t/tools/smartlinks.t 255 65280 65 129 198.46% 1-65
  • No.4 | | 4006 bytes | |

    Using either of those flags ( PFLAG or PFLAG
    ) break other tests.

    I'm up for more suggestions.
    Kevin

    Leopold Toetsch wrote:
    Am Sonntag, 29. 2006 21:25 schrieb Kevin Tew:

    >I've had :init implemented for a couple of weeks now, but I can't check
    >it in because it needs its own flag.
    >
    >

    I think I've answered that already. Again:

    SUB_FLAG_CRFF = PFLAG,
    SUB_FLAG_C_HANDLER = PFLAG, /* C exceptions only */

    is/are runtime flags/s( and usuable as well as:

    SUB_FLAG_TAILCALL = PFLAG,

    leo

    SUB_FLAG_PF_INIT = PFLAG

    Failed Test Stat Wstat Total Fail Failed List of
    Failed

    t/codingstd/c_code_coda.t 2 512 2 2 100.00% 1-2
    t/codingstd/cuddled_else.t 1 256 1 1 100.00% 1
    t/codingstd/tabs.t 1 256 1 1 100.00% 1
    t/compilers/imcc/reg/spill.t 1 256 9 1 11.11% 5
    t/compilers/imcc/syn/objects.t 11 2816 11 11 100.00% 1-11
    t/compilers/imcc/syn/tail.t 1 256 6 1 16.67% 6
    495 1 0.20% 324
    t/compilers/tge/grammar.t 2 512 3 2 66.67% 1-2
    2 512 2 2 100.00% 1-2
    t/examples/pir.t 1 256 19 1 5.26% 5
    t/examples/streams.t 4 1024 12 4 33.33% 3 5 7-8
    t/library/dumper.t 2 512 26 2 7.69% 12 26
    t/library/mime_base64.t 1 256 552 5 0.91% 550-552
    t/library/pg.t 0 6 43 77 179.07% 5-43
    t/library/streams.t 5 1280 20 5 25.00% 9-10
    15-16 19
    t/op/calling.t 7 1792 96 7 7.29% 39-41 54 64
    95-96
    t/op/gc.t 2 512 22 2 9.09% 10 13
    t/op/sprintf.t 308 37 12.01% 32-33
    37-43 56
    64 144
    153 187
    191 194-196
    216-223
    225-
    232 304-306
    t/op/string.t 1 256 160 1 0.62% 144
    t/pmc/delegate.t 2 512 9 2 22.22% 8-9
    t/pmc/freeze.t 2 512 25 2 8.00% 24-25
    t/pmc/mmd.t 3 768 39 3 7.69% 29-31
    t/pmc/object-meths.t 15 3840 34 15 44.12% 13-15 21-25
    28-34
    t/pmc/objects.t 15 3840 78 15 19.23% 17
    50-51 53-55
    59 64 68-71
    75-77
    t/pmc/parrotobject.t 3 768 5 3 60.00% 2-3 5
    t/pmc/resizablestringarray.t 173 10 5.78% 65-68 75-76
    83-84 91-92
    t/pmc/sub.t 1 256 58 1 1.72% 58
    t/pmc/threads.t 2 512 20 2 10.00% 13-14
    t/stm/queue.t 3 768 4 3 75.00% 1-3
    t/stm/runtime.t 2 512 5 2 40.00% 4-5
    t/tools/smartlinks.t 255 65280 65 129 198.46% 1-65
    8 tests and 532 subtests skipped.
    Failed 31/260 test scripts, 88.08% okay. 246/8079 subtests failed,
    96.96% okay.
    make: [test] Error 1

    SUB_FLAG_PF_INIT = PFLAG
    Failed Test Stat Wstat Total Fail Failed List of
    Failed

    t/codingstd/c_code_coda.t 2 512 2 2 100.00% 1-2
    t/codingstd/cuddled_else.t 1 256 1 1 100.00% 1
    t/codingstd/tabs.t 1 256 1 1 100.00% 1
    495 1 0.20% 324
    t/dynpmc/dynlexpad.t 4 1024 6 4 66.67% 2-5
    1 256 2 1 50.00% 2
    t/library/mime_base64.t 1 256 552 5 0.91% 550-552
    t/library/pg.t 0 6 43 77 179.07% 5-43
    t/op/calling.t 2 512 96 2 2.08% 95-96
    t/op/debuginfo.t 1 256 6 1 16.67% 4
    t/op/lexicals.t 1 256 41 1 2.44% 22
    t/op/sprintf.t 308 37 12.01% 32-33
    37-43 56
    64 144
    153 187
    191 194-196
    216-223
    225-
    232 304-306
    t/pmc/resizablestringarray.t 173 10 5.78% 65-68 75-76
    83-84 91-92
    t/tools/smartlinks.t 255 65280 65 129 198.46% 1-65
    8 tests and 532 subtests skipped.
    Failed 14/260 test scripts, 94.62% okay. 168/8079 subtests failed,
    97.92% okay.

    SUB_FLAG_PF_INIT = PFLAG
    Failed Test Stat Wstat Total Fail Failed List of
    Failed

    t/codingstd/c_code_coda.t 2 512 2 2 100.00% 1-2
    t/codingstd/cuddled_else.t 1 256 1 1 100.00% 1
    t/codingstd/tabs.t 1 256 1 1 100.00% 1
    495 1 0.20% 324
    1 256 2 1 50.00% 2
    t/library/mime_base64.t 1 256 552 5 0.91% 550-552
    t/library/pg.t 0 6 43 77 179.07% 5-43
    t/op/calling.t 2 512 96 2 2.08% 95-96
    t/op/sprintf.t 308 37 12.01% 32-33
    37-43 56
    64 144
    153 187
    191 194-196
    216-223
    225-
    232 304-306
    t/pmc/resizablestringarray.t 173 10 5.78% 65-68 75-76
    83-84 91-92
    t/tools/smartlinks.t 255 65280 65 129 198.46% 1-65
  • No.5 | | 938 bytes | |

    Am Montag, 30. 2006 22:58 schrieb Kevin Tew:
    Using either of those flags ( PFLAG or *PFLAG
    ) break other tests.

    I'm up for more suggestions.

    Sorry for the very delayed answer.

    Reusing these compile-time flags isn't really safe obviously, as running the
    code of course might need the reused flags for runtime. I should have thought
    of that in the first place.

    Therefore we need:
    - a new field in the struct Parrot_sub / struct Parrot_coro: UINTVAL
    comp_flags [1]
    - it's usable as PMC_sub(pmc)->comp_flags then
    - all the compile time flags should go there (moving the new one first as a
    test is of course ok)
    - the flags can then be defined in sub.h and imcc can just reuse these defines
    (using the current imcc bits, which are more restricted)

    leo

    [1] include/parrot/sub.h
    please regard the common order of fields in these 2 structs
  • No.6 | | 938 bytes | |

    Am Montag, 30. 2006 22:58 schrieb Kevin Tew:
    Using either of those flags ( PFLAG or *PFLAG
    ) break other tests.

    I'm up for more suggestions.

    Sorry for the very delayed answer.

    Reusing these compile-time flags isn't really safe obviously, as running the
    code of course might need the reused flags for runtime. I should have thought
    of that in the first place.

    Therefore we need:
    - a new field in the struct Parrot_sub / struct Parrot_coro: UINTVAL
    comp_flags [1]
    - it's usable as PMC_sub(pmc)->comp_flags then
    - all the compile time flags should go there (moving the new one first as a
    test is of course ok)
    - the flags can then be defined in sub.h and imcc can just reuse these defines
    (using the current imcc bits, which are more restricted)

    leo

    [1] include/parrot/sub.h
    please regard the common order of fields in these 2 structs

Re: :init Where should we put the flag?


max 4000 letters.
Your nickname that display:
In order to stop the spam: 6 + 5 =
QUESTION ON "Perl"

EMSDN.COM