New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove references to __get_string() and related methods in PGE POD #394
Comments
From @chrisdolanThe attached patch does s{__get_}{get_} on compilers/pge/PGE/ |
From @chrisdolan__get_string.patchIndex: compilers/pge/PGE/Match.pir
===================================================================
--- compilers/pge/PGE/Match.pir (revision 32414)
+++ compilers/pge/PGE/Match.pir (working copy)
@@ -333,7 +333,7 @@
.end
-=item C<__get_bool()>
+=item C<get_bool()>
Returns 1 if this object successfully matched the target string,
0 otherwise.
@@ -347,7 +347,7 @@
.return ($I1)
.end
-=item C<__get_integer()>
+=item C<get_integer()>
Returns the integer value of this match.
@@ -358,7 +358,7 @@
.return ($I0)
.end
-=item C<__get_number()>
+=item C<get_number()>
Returns the numeric value of this match.
@@ -369,7 +369,7 @@
.return ($N0)
.end
-=item C<__get_string()>
+=item C<get_string()>
Returns the portion of the target string matched by this object.
|
From @pmichaudActually, the vtable functions should not have method names at all -- .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 $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 In the meantime I'll apply the patch to remove the leading underscores Pm |
The RT System itself - Status changed from 'new' to 'open' |
From @bacekOn Tue Nov 25 13:12:31 2008, pmichaud wrote:
Hello, there is small patch for Rakudo to anonymize vtable methods. -- |
From @bacekanon.patchdiff --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)
|
From @pmichaud
Not all of the Rakudo vtable functions should be anonymized -- i.e., Pm |
From @pmichaudPGE patch applied in r33256 -- moving ticket back to the perl6 queue so Pm |
From @pmichaudClosing ticket -- many of the vtable methods have been migrated, and the Pm |
@pmichaud - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#60384 (status was 'resolved')
Searchable as RT60384$
The text was updated successfully, but these errors were encountered: