Skip Menu |
 
Report information
Id: 60384
Status: resolved
Priority: 0/
Queue: perl6

Owner: pmichaud <pmichaud [at] pobox.com>
Requestors: chris [at] chrisdolan.net
Cc:
AdminCc:

Severity: (no value)
Tag: Patch
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [PATCH] Remove references to __get_string() and related methods in PGE POD
Date: Thu, 6 Nov 2008 20:25:58 -0600
To: rakudobug [...] perl.org
From: Chris Dolan <chris [...] chrisdolan.net>
Download (untitled) / with headers
text/plain 106b
The attached patch does s{__get_}{get_} on compilers/pge/PGE/ Match.pir to make POD match up with code.
Download __get_string.patch
text/plain 804b

Message body is not shown because sender requested not to inline it.

Subject: PGE/PCT: Deprecate method access to get_string, get_bool, etc. vtable functions
Download (untitled) / with headers
text/plain 601b
Actually, the vtable functions should not have method names at all -- i.e., instead of .sub 'get_bool' :method :vtable we should have .sub '' :method :vtable('get_bool') At present there may be some users of pge that expect to use the methods directly -- as in: $I0 = match.'get_bool'() This will go away, and the correct approach is: $I0 = istrue match So, I've marked the old named-method invocation as deprecated for all PGE and PCT items, and this can be done after the next release. In the meantime I'll apply the patch to remove the leading underscores in the POD. Thanks! Pm
RT-Send-CC: parrot-dev [...] lists.parrot.org
Download (untitled) / with headers
text/plain 315b
On Tue Nov 25 13:12:31 2008, pmichaud wrote: Show quoted text
> Actually, the vtable functions should not have method names at all -- > i.e., instead of > > .sub 'get_bool' :method :vtable > > we should have > > .sub '' :method :vtable('get_bool')
Hello, there is small patch for Rakudo to anonymize vtable methods. -- Bacek
Download anon.patch
text/plain 3.7k
diff --git a/languages/perl6/src/classes/Capture.pir b/languages/perl6/src/classes/Capture.pir index e763e53..0152321 100644 --- a/languages/perl6/src/classes/Capture.pir +++ b/languages/perl6/src/classes/Capture.pir @@ -29,7 +29,7 @@ This file sets up the Perl 6 C<Capture> class. =cut -.sub 'VTABLE_get_string' :method :vtable('get_string') +.sub '' :method :vtable('get_string') $S0 = self.'list'() .return ($S0) .end diff --git a/languages/perl6/src/classes/IO.pir b/languages/perl6/src/classes/IO.pir index 210c843..5ed0a01 100644 --- a/languages/perl6/src/classes/IO.pir +++ b/languages/perl6/src/classes/IO.pir @@ -172,7 +172,7 @@ The IOIterator class implements the I/O iterator. =cut -.sub get_bool :method :vtable +.sub '' :method :vtable('get_bool') .local pmc PIO $P0 = getattribute self, "$!IO" PIO = getattribute $P0, "$!PIO" @@ -201,7 +201,7 @@ Return the value inside this container in item context. .return($P0) .end -.sub 'get_string' :vtable +.sub '' :method :vtable('get_string') .tailcall self.'item'() .end diff --git a/languages/perl6/src/classes/List.pir b/languages/perl6/src/classes/List.pir index 204f502..199eba0 100644 --- a/languages/perl6/src/classes/List.pir +++ b/languages/perl6/src/classes/List.pir @@ -43,7 +43,7 @@ Return a clone of this list. (Clones its elements also.) =cut .namespace ['List'] -.sub 'clone' :vtable :method +.sub '' :method :vtable('clone') .local pmc p6meta, result, iter $P0 = typeof self result = new $P0 @@ -65,7 +65,7 @@ Return the elements of the list joined by spaces. =cut -.sub 'get_string' :vtable :method +.sub '' :method :vtable('get_string') $S0 = join ' ', self .return ($S0) .end diff --git a/languages/perl6/src/classes/Mapping.pir b/languages/perl6/src/classes/Mapping.pir index f3d9f7d..f6cb26d 100644 --- a/languages/perl6/src/classes/Mapping.pir +++ b/languages/perl6/src/classes/Mapping.pir @@ -50,7 +50,7 @@ ourself in a ObjectRef. .end -.sub 'get_string' :method :vtable +.sub '' :method :vtable('get_string') $S0 = '' .local pmc iter iter = new 'Iterator', self diff --git a/languages/perl6/src/classes/Object.pir b/languages/perl6/src/classes/Object.pir index 09f4077..1336207 100644 --- a/languages/perl6/src/classes/Object.pir +++ b/languages/perl6/src/classes/Object.pir @@ -650,7 +650,7 @@ Returns a proto-object with an autovivification closure attached to it. =cut -.sub get_pmc_keyed :vtable :method +.sub '' :method :vtable('get_pmc_keyed') .param pmc what # We'll build auto-vivification hash of values. diff --git a/languages/perl6/src/classes/Pair.pir b/languages/perl6/src/classes/Pair.pir index 66efaa5..fcc077b 100644 --- a/languages/perl6/src/classes/Pair.pir +++ b/languages/perl6/src/classes/Pair.pir @@ -68,7 +68,7 @@ Stringify the Pair. =cut -.sub 'get_string' :method :vtable +.sub '' :method :vtable('get_string') $S0 = self.'key'() concat $S0, "\t" $S1 = self.'value'() diff --git a/languages/perl6/src/classes/Range.pir b/languages/perl6/src/classes/Range.pir index f81e0c6..14da86f 100644 --- a/languages/perl6/src/classes/Range.pir +++ b/languages/perl6/src/classes/Range.pir @@ -30,19 +30,19 @@ src/classes/Range.pir - methods for the Range class =cut -.sub 'VTABLE_get_integer' :method :vtable('get_integer') +.sub '' :method :vtable('get_integer') $P0 = self.'list'() $I0 = $P0 .return ($I0) .end -.sub 'VTABLE_get_number' :method :vtable('get_number') +.sub '' :method :vtable('get_number') $P0 = self.'list'() $N0 = $P0 .return ($N0) .end -.sub 'VTABLE_get_string' :method :vtable('get_string') +.sub '' :method :vtable('get_string') $P0 = self.'list'() $S0 = $P0 .return ($S0)
Download (untitled) / with headers
text/plain 174b
Show quoted text
> there is small patch for Rakudo to anonymize vtable methods.
Not all of the Rakudo vtable functions should be anonymized -- i.e., 'clone' is a real method as well. Pm
Download (untitled) / with headers
text/plain 110b
PGE patch applied in r33256 -- moving ticket back to the perl6 queue so that we can look at bacek's patch. Pm
Download (untitled) / with headers
text/plain 159b
Closing ticket -- many of the vtable methods have been migrated, and the rest are being taken care of as part of a general refactor of all of the builtins. Pm


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org