develooper Front page | perl.perl6.internals | Postings from July 2002

[perl #15306] [PATCH] pmc RECALL command implemented

Thread Next
Tanton Gibbs
July 21, 2002 21:26
[perl #15306] [PATCH] pmc RECALL command implemented
Message ID:
# New Ticket Created by  "Tanton Gibbs" 
# Please include the string:  [perl #15306]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This patch does a number of things

1.) adds the RECALL command.  This command was described in a previous
email, but basically after a CHANGE_TYPE(SELF, X), code should not be
Instead the function should be relooked up in the new vtable and recalled.
The RECALL preprocessor directive automates that.  This has the benefit that
a pmc's
code is not duplicated (perhaps erroneously) every time a type is changed.
It is worth noting that perlundef.pmc was already doing this, but manually
(which is error prone).

2.) adds POD to - this file was completely uncommented...I added
POD and comments to help describe what was happening.

3.) changes perlnum, perlstring, perlundef, and perlint to use RECALL when

4.) a few minor style corrections to perlint.pmc

There are two notes:

1.) This may run slightly slower because of the additional function calls.
However, this ensures correct semantics and I think is worth the price.
     I sent out previous timings which noted a 6.5 tenth of a second
slowdown over 10,000,000 calls on a cygwin machine (which runs slow anyway).

2.) This will run much slower for X -> string conversions because it was
previously only doing an assign, now it is calling the set_string function
      perlstring.pmc which does a string_copy (and thus an allocation).  I'm
not sure whether an allocation should be done or not, but at least
      is doing it the same way and can be fixed in only one place.

Also, I apologize for sending out multiple diff files, but everytime I did a
cvs diff it gave me the following error message:

cvs server: failed to create lock directory for `/cvs/public/parrot/Parrot'
s/public/parrot/Parrot/#cvs.lock): No such file or directory
cvs server: failed to obtain dir lock in repository
cvs [server aborted]: read lock failed - giving up

Does anyone know why?


-- attachment  1 ------------------------------------------------------

-- attachment  2 ------------------------------------------------------

-- attachment  3 ------------------------------------------------------

-- attachment  4 ------------------------------------------------------

-- attachment  5 ------------------------------------------------------

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About