Q on: #37542: [TODO] core - document behavior of multiple :load subpragmas in same compilation unit

0 views
Skip to first unread message

Klaas-Jan Stol

unread,
Feb 19, 2007, 11:39:01 AM2/19/07
to Perl 6 Internals
I'm not sure how to respond on TODO tickets, any pointers would be
appreciated.
Meanwhile, I'll just compose an email, like this one.

Ticket:
#37542: [TODO] core - document behavior of multiple :load subpragmas in
same compilation unit

states:

the behavior of multiple subroutines marked with the ':load' subpragma
in the same compilation unit is currently undefined. PGE currently
uses a workaround for this limitation, as seen in
compilers/pge/PGE.pir.

However, this behavior *is* defined, according to
http://www.parrotcode.org/docs/imcc/calling_conventions.html:

:load
Run this subroutine during the load_library opcode. :load is
ignored, if another subroutine in that file is marked with :main. If
multiple subs have the :load pragma, the subs are run in source code order.

Does this mean this ticket can be closed?
kjs

Patrick R. Michaud

unread,
Feb 19, 2007, 12:19:06 PM2/19/07
to Klaas-Jan Stol, Perl 6 Internals
On Mon, Feb 19, 2007 at 05:39:01PM +0100, Klaas-Jan Stol wrote:
> Ticket:
> #37542: [TODO] core - document behavior of multiple :load subpragmas in
> same compilation unit
> : the behavior of multiple subroutines marked with the ':load' subpragma

> : in the same compilation unit is currently undefined. PGE currently
> : uses a workaround for this limitation, as seen in
> : compilers/pge/PGE.pir.
>
> However, this behavior *is* defined, according to
> http://www.parrotcode.org/docs/imcc/calling_conventions.html:
> ...

> Does this mean this ticket can be closed?

I agree that the ticket can probably be closed.

First, PGE no longer uses the workaround, and relies on the
fact that :load works as documented in calling_conventions.html .

But I also think that with things like this we want to make sure that
not only is the documentation updated (as given by the TODO), but
also that there is test coverage for the behavior described by
the new documentation.

Fortunately, in this case it looks to me as though t/pmc/sub.t
does have tests that check for proper execution of multiple
:load subs. So I think this ticket can be safely closed.

Thanks,

Pm

Will Coleda

unread,
Feb 19, 2007, 8:36:12 PM2/19/07
to Klaas-Jan Stol, Perl 6 Internals

On Feb 19, 2007, at 11:39 AM, Klaas-Jan Stol wrote:

> I'm not sure how to respond on TODO tickets, any pointers would be
> appreciated.
> Meanwhile, I'll just compose an email, like this one.

Go to RT and Comment on the ticket, CC'ing perl6-internals as
appropriate. Then your comment is logged for posterity with the
ticket, and (if you did it) also sent to the list, where others can
easily reply to it and have their comments saved.

In this case:


http://rt.perl.org/rt3/Ticket/Update.html?Action=Comment&id=37542

Regards.

--
Will "Coke" Coleda
wi...@coleda.com


Reply all
Reply to author
Forward
0 new messages