[parrot-tickets] [Parrot] #1308: NQPrx does not vivify globals in all cases

Parrot parrot-tickets at lists.parrot.org
Wed Nov 18 10:12:46 UTC 2009


#1308: NQPrx does not vivify globals in all cases
-----------------------------+----------------------------------------------
 Reporter:  Austin_Hastings  |       Owner:  pmichaud
     Type:  bug              |      Status:  new     
 Priority:  normal           |   Milestone:          
Component:  nqp              |     Version:  1.8.0   
 Severity:  medium           |    Keywords:          
     Lang:                   |       Patch:          
 Platform:                   |  
-----------------------------+----------------------------------------------
 This code:
 {{{
 module Z;
 our $Global;
 sub zzz() {
         unless $Global {
                 say("Not set");
         }
 }
 INIT {
         zzz();
 }

 module A;

 sub aaa() {
         our $G2;

         unless $G2 {
                 say("Not set");
         }
 }
 }}}

 generates:
 {{{
     get_global $P21, "$Global"
     unless $P21, unless_20
 }}}

 for the access code in `sub zzz`. There is no guard for null. But in the
 access code in `sub aaa` there is this:
 {{{
     get_global $P31, "$G2"
     unless_null $P31, vivify_17
 }}}
 Apparently the scope isn't being looked up correctly, or something?

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1308>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development


More information about the parrot-tickets mailing list