#1481: P6metaclass.register does not catch second registration of PMC Class
-----------------------------+----------------------------------------------
 Reporter:  Austin_Hastings  |       Owner:       
     Type:  bug              |      Status:  new  
 Priority:  normal           |   Milestone:       
Component:  none             |     Version:  2.1.0
 Severity:  medium           |    Keywords:       
     Lang:                   |       Patch:       
 Platform:                   |  
-----------------------------+----------------------------------------------
Description changed by Austin_Hastings:

Old description:

> Registering a PMC class works. Registering the same class a second time
> does not produce a diagnostic - although attempting to register a non-PMC
> class twice does.
>
> Also, the second register produces some horrible results.
>
> {{{
> main();
>
> sub main() {
>         pir::load_bytecode('dumper.pbc');
>         pir::load_bytecode('P6object.pbc');
>         my $nsp;
>

>         $nsp := Q:PIR {
>                 %r = get_hll_namespace ['Key']
>         };
>         _dumper($nsp);
>
>         P6metaclass.register('Key');
>
>         $nsp := Q:PIR {
>                 %r = get_hll_namespace ['Key']
>         };
>         _dumper($nsp);
>

>         P6metaclass.register('Key');
>
>         $nsp := Q:PIR {
>                 %r = get_hll_namespace ['Key']
>         };
>         _dumper($nsp);
> }}}

New description:

 Registering a PMC class works. Registering the same class a second time
 does not produce a diagnostic - although attempting to register a non-PMC
 class twice does.

 Also, the second register produces some horrible results.

 {{{
 main();

 sub main() {
         pir::load_bytecode('dumper.pbc');
         pir::load_bytecode('P6object.pbc');
         my $nsp;


         $nsp := Q:PIR {
                 %r = get_hll_namespace ['Key']
         };
         _dumper($nsp);

         P6metaclass.register('Key');

         $nsp := Q:PIR {
                 %r = get_hll_namespace ['Key']
         };
         _dumper($nsp);


         P6metaclass.register('Key');

         $nsp := Q:PIR {
                 %r = get_hll_namespace ['Key']
         };
         _dumper($nsp);
 }
 }}}

--

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1481#comment:1>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to