#1988: lib/Parrot/Pmc2c/PMCEmitter.pm:  Is this file useless?
-----------------------+----------------------------------------------------
 Reporter:  jkeenan    |       Owner:       
     Type:  bug        |      Status:  new  
 Priority:  normal     |   Milestone:       
Component:  configure  |     Version:  3.0.0
 Severity:  medium     |    Keywords:       
     Lang:             |       Patch:       
 Platform:             |  
-----------------------+----------------------------------------------------
 During cage-cleaning today I reviewed TT #682 in which chromatic commented
 on some consequences of a modification of
 ''lib/Parrot/Pmc2c/PMCEmitter.pm''.  I subsequently examined this file and
 was puzzled by what I saw:

 1.  The file is named ''lib/Parrot/Pmc2c/PMCEmitter.pm'' and the POD that
 appears at the head of the file is consistent with that:
 {{{
 NAME
     Parrot::Pmc2c::PMCEmitter - PMC to C Code Generation

 SYNOPSIS
         use Parrot::Pmc2c::PMCEmitter;

 DESCRIPTION
     "Parrot::Pmc2c::PMCEmitter" is used by tools/build/pmc2c.pl to
 generate
     C code from PMC files.
 }}}
 But then the '''package''' declaration is this:
 {{{
 package Parrot::Pmc2c::PMC;
 }}}
 ... which flies in the face of '''this''' file:
 ''lib/Parrot/Pmc2c/PMC.pm'', which itself contains a `package
 Parrot::Pmc2c::PMC;` declaration.

 ack-ing for PMCEmitter shows this:
 {{{
 lib/Parrot/Pmc2c/Library.pm:27:use Parrot::Pmc2c::PMCEmitter ();
 lib/Parrot/Pmc2c/PMC/RO.pm:28:use Parrot::Pmc2c::PMCEmitter ();
 }}}
 ... but, AFAICT, no functions from lib/Parrot/Pmc2c/PMCEmitter.pm are ever
 called in Parrot::Pmc2c::Library or Parrot::Pmc2c::PMC::RO.

 All of which suggests that this file is dead code which can be ripped out.
 I am going to start a branch to explore that possibility -- but does
 anyone have any better insight into this?

 Thank you very much.

 kid51

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1988>
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