Browse files

Eliminate 'vtable method'. It's a vtable, or a vtable function.

This resolves TT #487



git-svn-id: https://svn.parrot.org/parrot/trunk@45297 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 740536d commit 1df1b75471e4412bbe2ecafc7f3a0be5ac958d5e @coke coke committed Mar 30, 2010
Showing with 106 additions and 105 deletions.
  1. +2 −2 compilers/imcc/pbc.c
  2. +1 −1 compilers/pct/src/POST/Node.pir
  3. +6 −6 compilers/pirc/src/pircompunit.c
  4. +1 −1 docs/book/draft/ch07_dynpmcs.pod
  5. +2 −2 docs/book/draft/chXX_hlls.pod
  6. +3 −3 docs/dev/infant.pod
  7. +2 −2 docs/dev/pccmethods.pod
  8. +6 −6 docs/dev/pmc_freeze.pod
  9. +1 −1 docs/dev/pmc_obj_design_meeting_notes.pod
  10. +2 −2 docs/pdds/draft/pdd06_pasm.pod
  11. +5 −5 docs/pdds/draft/pdd08_keys.pod
  12. +1 −1 docs/pdds/draft/pdd10_embedding.pod
  13. +2 −2 docs/pdds/pdd09_gc.pod
  14. +1 −1 docs/pdds/pdd17_pmc.pod
  15. +2 −1 docs/pmc/documentation.pod
  16. +5 −5 docs/pmc2c.pod
  17. +1 −1 examples/tutorial/56_defined.pir
  18. +2 −2 lib/Parrot/Pmc2c/MethodEmitter.pm
  19. +2 −2 lib/Parrot/Pmc2c/Object.pm
  20. +2 −2 lib/Parrot/Pmc2c/PMC.pm
  21. +1 −1 lib/Parrot/Pmc2c/PMC/Null.pm
  22. +5 −5 lib/Parrot/Pmc2c/PMC/Object.pm
  23. +1 −1 lib/Parrot/Pmc2c/PMC/ParrotClass.pm
  24. +1 −1 lib/Parrot/Pmc2c/PMC/default.pm
  25. +6 −6 lib/Parrot/Pmc2c/PMCEmitter.pm
  26. +1 −1 lib/Parrot/Pmc2c/Parser.pm
  27. +3 −3 lib/Parrot/Vtable.pm
  28. +1 −1 runtime/parrot/library/Getopt/Obj.pir
  29. +2 −3 runtime/parrot/library/HTTP/Daemon.pir
  30. +3 −3 runtime/parrot/library/P6object.pir
  31. +1 −1 src/byteorder.c
  32. +1 −1 src/io/api.c
  33. +2 −2 src/oo.c
  34. +1 −1 src/pmc/arrayiterator.pmc
  35. +6 −6 src/pmc/class.pmc
  36. +2 −1 src/pmc/exporter.pmc
  37. +1 −1 src/pmc/multisub.pmc
  38. +2 −2 src/pmc/namespace.pmc
  39. +4 −4 src/pmc/object.pmc
  40. +1 −1 src/pmc/pmcproxy.pmc
  41. +2 −2 src/pmc/role.pmc
  42. +1 −1 t/dynpmc/rotest.t
  43. +1 −1 t/op/exceptions.t
  44. +1 −1 t/pmc/exception-old.t
  45. +2 −2 t/pmc/objects.t
  46. +1 −1 t/pmc/parrotobject.t
  47. +4 −4 t/pmc/pmcproxy.t
View
4 compilers/imcc/pbc.c
@@ -1395,7 +1395,7 @@ add_const_pmc_sub(PARROT_INTERP, ARGMOD(SymReg *r), size_t offs, size_t end)
STRING *vtable_name;
INTVAL vtable_index;
- /* Work out the name of the vtable method. */
+ /* Work out the name of the vtable function. */
if (unit->vtable_name) {
vtable_name = Parrot_str_new(interp, unit->vtable_name + 1,
strlen(unit->vtable_name) - 2);
@@ -1404,7 +1404,7 @@ add_const_pmc_sub(PARROT_INTERP, ARGMOD(SymReg *r), size_t offs, size_t end)
else
vtable_name = sub->name;
- /* Check this is a valid vtable method to override. */
+ /* Check this is a valid vtable function to override. */
vtable_index = Parrot_get_vtable_index(interp, vtable_name);
if (vtable_index == -1) {
View
2 compilers/pct/src/POST/Node.pir
@@ -82,7 +82,7 @@ as the result of the current node.
.end
-=item get_string() # vtable method
+=item get_string()
Returns the result of the current node as a string.
View
12 compilers/pirc/src/pircompunit.c
@@ -274,9 +274,9 @@ add_self_parameter(ARGIN(lexer_state * const lexer))
=item C<void set_sub_vtable(lexer_state * const lexer, char const * vtablename)>
Set the :vtable() flag argument to the current subroutine. If C<vtablename>
-is NULL, the name of the current sub is taken to be the vtable method name.
-If the vtable method name (either specified or the current sub's name) is
-in fact not a vtable method, an error message is emitted.
+is NULL, the name of the current sub is taken to be the vtable name.
+If the vtable name (either specified or the current sub's name) is
+not a valid vtable, an error message is emitted.
=cut
@@ -290,15 +290,15 @@ set_sub_vtable(ARGIN(lexer_state * const lexer),
if (vtablename == NULL) /* the sub's name I<is> the vtablename */
vtablename = CURRENT_SUB(lexer)->info.subname;
- /* get the index number of this vtable method */
+ /* get the index number of this vtable */
vtable_index = Parrot_get_vtable_index(lexer->interp,
Parrot_str_new(lexer->interp, vtablename,
strlen(vtablename)));
- /* now check whether the method name actually a vtable method */
+ /* now check whether the method name actually a vtable */
if (vtable_index == -1)
yypirerror(lexer->yyscanner, lexer,
- "'%s' is not a vtable method but was used with :vtable flag", vtablename);
+ "'%s' is not a vtable but was used with :vtable flag", vtablename);
else {
/* test for duplicate :vtable on a sub */
View
2 docs/book/draft/ch07_dynpmcs.pod
@@ -195,7 +195,7 @@ when building Parrot.
=head3 VTABLE Functions Parameters
VTABLE functions are defined just like ordinary C functions, almost. Here's
-a normal definition for a VTABLE method:
+a normal definition for a VTABLE function:
VTABLE VTABLENAME (PARAMETERS) {
/* ordinary C here, almost */
View
4 docs/book/draft/chXX_hlls.pod
@@ -211,9 +211,9 @@ at the data level? There are two ways:
=over 4
-=item * VTable methods
+=item * VTable Functions
-VTable methods are the standard interface for PMC data types, and all PMCs
+VTable functions are the standard interface for PMC data types, and all PMCs
have them. If the PMCs were written properly to satisfy this interface
all the necessary information from those PMCs. Operate on the PMCs at the
VTable level, and we can safely ignore the implementation details of them.
View
6 docs/dev/infant.pod
@@ -142,15 +142,15 @@ opcodes, so that there is no chance of unanchored temporaries.
+ Fast mark phase (GC already manipulates the flags)
- Generation count must be maintained
- Disallows recursive opcode calls (necessary for eg implementing
- vtable methods in pasm)
+ vtable functions in pasm)
- Can temporarily use more memory (dead objects accumulate during the
current generation)
In order to allow recursive opcode calls, we could increment the generation
count in more places and make sure nothing is left unanchored at those points,
but that would gradually remove all advantages of this scheme and make it more
-difficult to call existing vtable methods (since you never know when they might
-start running pasm code.)
+difficult to call existing vtable functions (since you never know when they
+might start running pasm code.)
=head2 Variant 5: generation stack
View
4 docs/dev/pccmethods.pod
@@ -10,7 +10,7 @@ docs/dev/pccmethods.pod - Parrot Calling Conventions in C
A C<PCCMETHOD> is a PMC method that follows Parrot Calling Conventions
(a.k.a. PCC). This allows PIR code to call PMC methods using slurpy, named,
and other types of arguments as specified in F<PDD03>. This offers flexibility
-not found in a PMC C<METHOD> or a vtable method using C calling conventions.
+not found in a PMC C<METHOD> or a vtable function using C calling conventions.
C<PCCINVOKE> is used to call a method using the Parrot Calling Conventions.
It uses the standard find_method/invoke approach that the callmethodcc opcode
@@ -113,7 +113,7 @@ not next to the type.
=head2 Performance
-When a C<METHOD> or vtable method is called, C<NCI> is used to map the
+When a C<METHOD> or vtable function is called, C<NCI> is used to map the
arguments held in the current Parrot_Context onto the C calling conventions.
That is, you still end up involving the Parrot Calling Conventions anyway,
so there is no reason to expect a C<PCCMETHOD> to be any slower. It may well
View
12 docs/dev/pmc_freeze.pod
@@ -79,7 +79,7 @@ The basic scheme of operation looks like this:
=head2 The visit_info structure
This structure holds all necessary information and function pointers specific
-to the desired functionality. It gets passed on to all vtable methods and
+to the desired functionality. It gets passed on to all vtable functions and
callback functions.
=head2 Working loop
@@ -99,7 +99,7 @@ thread-safe.
This is done by a callback function inside the B<visit_info> structure called
B<visit_pmc_now>. It gets called initially to put the first item on the list
and is called thereafter from all PMCs for contained PMCs inside the B<visit>
-vtable method.
+vtable function.
=head2 The visit() vtable
@@ -140,19 +140,19 @@ amount of time.
So after all we finally arrived at the point to actually perform the desired
functionality. First the PMC-specific part is done inside F<pmc_freeze.c> then
-the specific vtable method B<freeze>, B<thaw>, whatever, is called, again via a
-function pointer called B<visit_action>.
+the specific vtable function B<freeze>, B<thaw>, whatever, is called, again
+via a function pointer called B<visit_action>.
=head1 Freeze and thaw
As stated PMCs are currently processed inside the core, PMC-specific parts are
-done by calling the PMCs vtable method. This parts could of course be moved to
+done by calling the PMCs vtable function. This parts could of course be moved to
F<default.pmc> too, so that it's simpler to override the functionality.
=head2 Serializer interface
During initialization the B<visit_info>s B<image_io> data pointer is filled
-with an object having B<vtable> methods that remarkably look like a PMCs
+with an object having B<vtable> functions that remarkably look like a PMCs
vtable. So B<io-E<gt>vtable-E<gt>push_integer> spits out an INTVAL to the
frozen B<image>, while B<shift_integer> gets an INTVAL from the frozen stream.
View
2 docs/dev/pmc_obj_design_meeting_notes.pod
@@ -60,7 +60,7 @@ worthy of the name SELF, it is DYNSELF. DYNSELF does dispatching, while SELF
statically calls the method in the current class.
B<Recommendation>: Throughout the source, rename SELF to STATIC_SELF, and
-rename DYNSELF to SELF. Additionally, direct access to VTABLE methods should
+rename DYNSELF to SELF. Additionally, direct access to VTABLE functions should
be reviewed, and SELF should be used where possible to increase clarity and
maintainability (this is a good CAGE task.) Also, this should become a coding
standard for PMCs.
View
4 docs/pdds/draft/pdd06_pasm.pod
@@ -172,7 +172,7 @@ of the form:
where register_type is 0x100, 0x200, 0x400, or 0x800 for PMC, string, integer,
or number respectively. So N19 would be 0x413.
-B<Note>: Instructions tagged with a * will call a vtable method to handle the
+B<Note>: Instructions tagged with a * will call a vtable function to handle the
instruction if used on PMC registers.
In all cases, the letters x, y, and z refer to register numbers. The letter t
@@ -244,7 +244,7 @@ does a value assignment, as:
$foo = $bar;
-X's assign vtable method is invoked and it does whatever is appropriate.
+X's assign vtable function is invoked and it does whatever is appropriate.
=item clone Px, Py
View
10 docs/pdds/draft/pdd08_keys.pod
@@ -91,7 +91,7 @@ manipulate keys, can be found in F<include/parrot/key.h>
=head3 Aggregate and non-aggregate PMCs
We've already said that what separates the aggregate PMCs from the
-non-aggregates is their implementation of the C<_keyed> vtable methods. So it
+non-aggregates is their implementation of the C<_keyed> vtable functions. So it
is Hereby Decreed that the default vtable which everyone inherits from defines
the C<_keyed> forms to throw an exception.
@@ -105,9 +105,9 @@ screw-up, since code which indexes a non-aggregate shouldn't be generated.
=back
-=head3 C<_keyed> vtable methods
+=head3 C<_keyed> vtable functions
-So what of these magical C<_keyed> vtable methods? They are generated when you
+So what of these magical C<_keyed> vtable functions? They are generated when you
add the C<keyed> tag to the appropriate entry in F<src/vtable.tbl>. They are
constructed by following B<every> C<PMC> argument with a second C<PMC>
argument which acts as the key for that argument; the name of the second
@@ -123,7 +123,7 @@ and
$a = @b[$c]
-use the same vtable method, reducing the multiplicity of methods. Secondly, a
+use the same vtable function, reducing the multiplicity of methods. Secondly, a
three-argument C<assign> as suggested by the code above would be ambiguous -
the code above uses 3 PMCs in different ways.
@@ -296,7 +296,7 @@ list. - steve@fink.com
=item Fri Mar 8 18:47:34 GMT 2002 : Version 1.1
updated to reflect Dan's comments that non-aggregates also support C<_keyed>
-variant vtable methods.
+variant vtable functions.
=back
View
2 docs/pdds/draft/pdd10_embedding.pod
@@ -74,7 +74,7 @@ Perl 5 problem
=back
-=item * probably includes vtable methods on PMCs
+=item * probably includes vtable functions on PMCs
=back
View
4 docs/pdds/pdd09_gc.pod
@@ -421,7 +421,7 @@ proper operation.
=item C<void (*finalize_gc_system) (Interp *)>
Called during interpreter destruction. Free used resources and memory pools.
-All PMCs must be swept, and PMCs with custom destroy VTABLE methods must have
+All PMCs must be swept, and PMCs with custom destroy VTABLE functions must have
those called.
=item C<void (*init_pool) (Interp *, Fixed_Size_Pool *)>
@@ -563,7 +563,7 @@ within C<src/gc/api.c:Parrot_gc_free_pmc>.
The C<mark> vtable slot will be called during the GC mark phase. The mark
function must call C<Parrot_gc_mark_PObj_alive> for all non-NULL objects
(Buffers and PMCs) that PMC refers to. This flag is typically tested and the
-custom mark VTABLE method called from C<src/gc/api.c:mark_special>.
+custom mark VTABLE function called from C<src/gc/api.c:mark_special>.
=item PObj_external_FLAG
View
2 docs/pdds/pdd17_pmc.pod
@@ -1656,7 +1656,7 @@ C<ResizablePMCArray>, but that's likely to change.
=head4 Array types
Note that for the following types you can set the size of the array by using
-the VTABLE_set_integer_native() method. Assigning an integer to the array as a
+the VTABLE_set_integer_native() function. Assigning an integer to the array as a
whole sets the array to that size.
Size-changing operations (such as push, pop, shift, unshift, and splice)
View
3 docs/pmc/documentation.pod
@@ -36,7 +36,8 @@ in the C<pmclass> declaration.
F<docs/pdds/pdd21_namespaces.pod>.
Exporter is not derived from any other PMC, and does not provide any
- standard interface--its interface consists solely of non-vtable methods.
+ standard interface--its interface consists solely of methods, not
+ vtable functions.
The B<DESCRIPTION> section is further broken down as follows:
View
10 docs/pmc2c.pod
@@ -144,7 +144,7 @@ types are generally only used by low-level internal PMCs.
=item 4.
-A list of vtable method implementations
+A list of vtable function implementations
=item 5.
@@ -154,7 +154,7 @@ The final close C<}>
=head2 Method Body Substitutions
-The vtable method bodies can use the following substitutions:
+The vtable function bodies can use the following substitutions:
=over 4
@@ -168,19 +168,19 @@ Converted to the interpreter object.
=item C<OtherClass.SELF.method(a,b,c)>
-Calls the static vtable method 'method' in C<OtherClass>.
+Calls the static vtable or method 'method' in C<OtherClass>.
=item C<SELF.method(a,b,c)>
-Calls the vtable method 'method' using the dynamic type of C<SELF>.
+Calls the vtable or method 'method' using the dynamic type of C<SELF>.
=item C<SELF(a,b,c)>
Same as above, but calls the current method.
=item C<STATICSELF.method(a,b,c)>
-Calls the vtable method 'method' using the static type of C<SELF> (in
+Calls the vtable or method 'method' using the static type of C<SELF> (in
other words, calls another method defined in the same file).
=item C<OtherClass.SUPER(a,b,c)>
View
2 examples/tutorial/56_defined.pir
@@ -26,7 +26,7 @@ been defined may throw an exception or cause a bigger problem.
=pod
Most PMC's, but not all, should return true for C<defined>. It all
-depends on how the PMC implements its vtable method for C<defined>.
+depends on how the PMC implements its vtable function for C<defined>.
For example the C<Undef> PMC always returns false (0) for C<defined>.
=cut
View
4 lib/Parrot/Pmc2c/MethodEmitter.pm
@@ -163,7 +163,7 @@ sub rewrite_nci_method {
=item C<rewrite_vtable_method($self, $pmc, $super, $super_table)>
Rewrites the method body performing the various macro substitutions for
-vtable method bodies (see F<tools/build/pmc2c.pl>).
+vtable function bodies (see F<tools/build/pmc2c.pl>).
=cut
@@ -180,7 +180,7 @@ sub rewrite_vtable_method {
# Some MMD variants don't have a super mapping.
if ($super) {
my $supertype = "enum_class_$super";
- die "$pmcname defines unknown vtable method '$name'\n" unless defined $super_table->{$name};
+ die "$pmcname defines unknown vtable function '$name'\n" unless defined $super_table->{$name};
my $supermethod = "Parrot_" . $super_table->{$name} . "_$name";
# Rewrite OtherClass.SUPER(args...)
View
4 lib/Parrot/Pmc2c/Object.pm
@@ -37,8 +37,8 @@ the number of lines, C<$out_name> is the name of the output file we are
generating.
Overrides the default implementation to direct all unknown methods to
-first check if there is an implementation of the vtable method in the
-vtable methods hash of this class of any others, and delegates up to
+first check if there is an implementation of the vtable function in the
+vtable function hash of this class of any others, and delegates up to
any PMCs in the MRO.
=back
View
4 lib/Parrot/Pmc2c/PMC.pm
@@ -132,7 +132,7 @@ Determines if a given PMC type is dynamically loaded or not.
=item C<implements_vtable($method)>
-True if pmc generates code for vtable method C<$method>.
+True if pmc generates code for vtable C<$method>.
=cut
@@ -321,7 +321,7 @@ sub method_attrs {
=item C<vtable_method_does_write($method)>
-Returns true if the vtable method C<$method> writes our value.
+Returns true if the vtable C<$method> writes our value.
=back
View
2 lib/Parrot/Pmc2c/PMC/Null.pm
@@ -29,7 +29,7 @@ The C<Null> PMC throws an execption for all methods.
sub pre_method_gen {
my ($self) = @_;
- # vtable methods
+ # vtables
foreach my $method ( @{ $self->vtable->methods } ) {
my $vt_method_name = $method->name;
next unless $self->normal_unimplemented_vtable($vt_method_name);
View
10 lib/Parrot/Pmc2c/PMC/Object.pm
@@ -22,16 +22,16 @@ PMC to C Methods
Returns the C code for the method body.
Overrides the default implementation to direct all unknown methods to
-first check if there is an implementation of the vtable method in the
-vtable methods hash of this class of any others, and delegates up to
+first check if there is an implementation of the vtable function in the
+vtable function hash of this class of any others, and delegates up to
any PMCs in the MRO.
=cut
sub pre_method_gen {
my ($self) = @_;
- # vtable methods
+ # vtables
foreach my $method ( @{ $self->vtable->methods } ) {
my $vt_method_name = $method->name;
next unless $self->normal_unimplemented_vtable($vt_method_name);
@@ -56,7 +56,7 @@ sub pre_method_gen {
Parrot_Class_attributes * const _class = PARROT_CLASS(obj->_class);
STRING * const meth_name = CONST_STRING_GEN(interp, "$vt_method_name");
- /* Walk and search for the vtable method. */
+ /* Walk and search for the vtable. */
const int num_classes = VTABLE_elements(interp, _class->all_parents);
int i;
for (i = 0; i < num_classes; i++) {
@@ -76,7 +76,7 @@ EOC
unless ($self->vtable_method_does_multi($vt_method_name)) {
$method_body_text .= <<"EOC";
if (cur_class->vtable->base_type == enum_class_PMCProxy) {
- /* Get the PMC instance and call the vtable method on that. */
+ /* Get the PMC instance and call the vtable on that. */
STRING * const proxy = CONST_STRING_GEN(interp, "proxy");
PMC * const del_object = VTABLE_get_attr_str(interp, SELF, proxy);
View
2 lib/Parrot/Pmc2c/PMC/ParrotClass.pm
@@ -66,7 +66,7 @@ our $dont_delegate = { map { $_, 1 } (@dont_delegate) };
sub pre_method_gen {
my ($self) = @_;
- # vtable methods
+ # vtables
foreach my $method ( @{ $self->vtable->methods } ) {
my $vt_method_name = $method->name;
next if exists $dont_delegate->{$vt_method_name};
View
2 lib/Parrot/Pmc2c/PMC/default.pm
@@ -32,7 +32,7 @@ Always true.
sub pre_method_gen {
my ($self) = @_;
- # vtable methods
+ # vtables
foreach my $method ( @{ $self->vtable->methods } ) {
my $vt_method_name = $method->name;
next unless $self->unimplemented_vtable($vt_method_name);
View
12 lib/Parrot/Pmc2c/PMCEmitter.pm
@@ -167,7 +167,7 @@ sub hdecls {
my $name = $self->name;
my $lc_name = $self->name;
- # generate decls for all vtable methods in this PMC
+ # generate decls for all vtables in this PMC
foreach my $vt_method_name ( @{ $self->vtable->names } ) {
if ( $self->implements_vtable($vt_method_name) ) {
$hout .=
@@ -274,7 +274,7 @@ Returns the C code for the pmc methods.
sub gen_methods {
my ($self) = @_;
- # vtable methods
+ # vtables
foreach my $method ( @{ $self->vtable->methods } ) {
my $vt_method_name = $method->name;
next if $vt_method_name eq 'class_init';
@@ -284,7 +284,7 @@ sub gen_methods {
}
}
- # non-vtable methods
+ # methods
foreach my $method ( @{ $self->methods } ) {
next if $method->is_vtable;
$method->generate_body($self);
@@ -718,7 +718,7 @@ EOC
=item C<update_vtable_func()>
-Returns the C code for the PMC's update_vtable method.
+Returns the C code for the PMC's update_vtable.
=cut
@@ -887,7 +887,7 @@ EOC
=item C<get_vtable_func()>
-Returns the C code for the PMC's update_vtable method.
+Returns the C code for the PMC's update_vtable.
=cut
@@ -989,7 +989,7 @@ sub gen_switch_vtable {
push @{ $multi_methods{ $name } }, [ $sig[1], $ssig, $fsig, $ns, $func, $method ];
}
- # vtable methods
+ # vtables
foreach my $method ( @{ $self->vtable->methods } ) {
my $vt_method_name = $method->name;
next if $vt_method_name eq 'class_init';
View
2 lib/Parrot/Pmc2c/Parser.pm
@@ -279,7 +279,7 @@ sub find_methods {
}
else {
- # Name-mangle NCI and multi methods to avoid conflict with vtable methods.
+ # Name-mangle NCI and multi methods to avoid conflict with vtables
if ( $marker) {
if ( $marker =~ /MULTI/ ) {
$method->type(Parrot::Pmc2c::Method::MULTI);
View
6 lib/Parrot/Vtable.pm
@@ -67,7 +67,7 @@ Returns a reference to an array containing
[ return_type method_name parameters section MMD_type attributes ]
-for each vtable method defined in C<$file>. If C<$file> is unspecified it
+for each vtable function defined in C<$file>. If C<$file> is unspecified it
defaults to F<src/vtable.tbl>. If it is not an MMD method, C<MMD_type> is -1.
=cut
@@ -209,7 +209,7 @@ sub vtbl_macros {
/*
* vtable accessor macros
- * as vtable methods might get moved around internally
+ * as vtable functions might get moved around internally
* these macros hide the details
*/
@@ -281,7 +281,7 @@ EOM
=item C<vtbl_embed($vtable)>
-Returns the C function definitions to call the vtable methods on a PMC for the
+Returns the C function definitions to call the vtable functions on a PMC for the
elements in the referenced vtable array.
=cut
View
2 runtime/parrot/library/Getopt/Obj.pir
@@ -357,7 +357,7 @@ finish:
=item C<push_string(STRING format)>
-A vtable method, invoked by e.g. C<push getopts, "foo|f=s">. The format is as such.
+A vtable, invoked by e.g. C<push getopts, "foo|f=s">. The format is:
=over 4
View
5 runtime/parrot/library/HTTP/Daemon.pir
@@ -207,10 +207,9 @@ set_it:
$P0 = doc_root
.end
-=item __get_bool()
+=item get_bool()
-Vtable method, called from the C<if> or C<unless> opcode. Returns
-true, if the daemon object is listening on a socket, that is if the
+Object is true if the daemon is listening on a socket, that is if the
initialization went ok.
=cut
View
6 runtime/parrot/library/P6object.pir
@@ -727,7 +727,7 @@ Multimethod helper to return the parrotclass for C<x>.
=over 4
-=item get_string() (vtable method)
+=item get_string()
Returns the "shortname" of the protoobject's class and parens.
@@ -743,7 +743,7 @@ Returns the "shortname" of the protoobject's class and parens.
.return ($S0)
.end
-=item defined() (vtable method)
+=item defined()
Protoobjects are always treated as being undefined.
@@ -754,7 +754,7 @@ Protoobjects are always treated as being undefined.
.end
-=item name() (vtable method)
+=item name()
Have protoobjects return their longname in response to a
C<typeof_s_p> opcode.
View
2 src/byteorder.c
@@ -10,7 +10,7 @@ src/byteorder.c - Byteordering functions
These are assigned to a vtable when the PBC file is loaded.
-If the vtable method for conversion from the native byteorder is called,
+If the vtable function for conversion from the native byteorder is called,
it is a I<no op> and will work, but the caller should know if the
byteorder in the PBC file is native and skip the conversion and just map
it in.
View
2 src/io/api.c
@@ -904,7 +904,7 @@ Parrot_io_make_offset32(INTVAL hi, INTVAL lo)
=item C<PIOOFF_T Parrot_io_make_offset_pmc(PARROT_INTERP, PMC *pmc)>
-Returns the return value of the C<get_integer> vtable method on C<*pmc>.
+Returns the return value of the C<get_integer> vtable on C<*pmc>.
=cut
View
4 src/oo.c
@@ -130,7 +130,7 @@ Parrot_oo_extract_methods_from_namespace(PARROT_INTERP, ARGIN(PMC *self), ARGIN(
}
}
- /* Import any vtable methods. */
+ /* Import any vtables. */
Parrot_pcc_invoke_method_from_c_args(interp, ns, CONST_STRING(interp, "get_associated_vtable_methods"), "->P", &vtable_overrides);
if (!PMC_IS_NULL(vtable_overrides)) {
@@ -471,7 +471,7 @@ Parrot_oo_find_vtable_override(PARROT_INTERP,
VTABLE_get_pmc_keyed_str(interp, _class->parent_overrides, name);
if (PMC_IS_NULL(result)) {
- /* Walk and search for the vtable method. */
+ /* Walk and search for the vtable. */
const INTVAL num_classes = VTABLE_elements(interp, _class->all_parents);
INTVAL i;
View
2 src/pmc/arrayiterator.pmc
@@ -40,7 +40,7 @@ Generic iterator for traversing arrays.
NB: for different direction you have to use different ops!
-TODO: Discuss idea of having separate get_iter/get_reverse_iter VTABLE methods
+TODO: Discuss idea of having separate get_iter/get_reverse_iter VTABLEs
to avoid this caveat.
=head1 Methods
View
12 src/pmc/class.pmc
@@ -62,7 +62,7 @@ An empty Hash PMC is allocated during initialization.
=item C<vtable_overrides>
-A directory of vtable method names and method bodies this class overrides.
+A directory of vtable function names and method bodies this class overrides.
An empty Hash PMC is allocated during initialization.
=item C<attrib_metadata>
@@ -851,7 +851,7 @@ Adds the given sub PMC as a vtable override with the given name.
EXCEPTION_METHOD_NOT_FOUND,
"'%S' is not a valid vtable function name.", name);
- /* Add it to vtable methods list. */
+ /* Add it to vtable list. */
VTABLE_set_pmc_keyed_str(interp, _class->vtable_overrides, name, sub);
}
@@ -1654,7 +1654,7 @@ Called after the class has been thawed.
}
/* **********************************************************************
- * Below here are non-vtable methods that eventually will go in a role
+ * Below here are methods that eventually will go in a role
* that is composed into here to optionally give a nice interface from
* PIR (ParrotClass isa Class does ClassMethods or something like this).
* **********************************************************************/
@@ -1798,7 +1798,7 @@ Return a hash where the keys are method names and the values are methods.
=item C<void add_method(STRING *name, PMC *sub)>
Adds the given sub PMC as a method with the given name. Delegates to the
-C<add_method> vtable method.
+C<add_method> vtable.
=cut
@@ -1812,7 +1812,7 @@ C<add_method> vtable method.
=item C<void add_vtable_override(STRING *name, PMC *sub)>
Adds the given sub PMC as a vtable override with the given name. Delegates to
-the C<add_vtable_override> vtable method.
+the C<add_vtable_override> vtable.
=cut
@@ -1967,7 +1967,7 @@ parameter is supplied, a particular item of introspection data.
METHOD inspect(STRING *what :optional, int has_what :opt_flag) {
PMC *found;
- /* Just delegate to the appropriate vtable method. */
+ /* Just delegate to the appropriate vtable. */
if (has_what)
found = SELF.inspect_str(what);
else
View
3 src/pmc/exporter.pmc
@@ -49,7 +49,8 @@ the typed namespace interface, as outlined in
F<docs/pdds/pdd21_namespaces.pod>.
Exporter is not derived from any other PMC, and does not provide any
-vtable interface--its interface consists solely of non-vtable methods.
+vtable interface--its interface consists solely of methods, not
+vtable functions.
=head2 Structure
View
2 src/pmc/multisub.pmc
@@ -83,7 +83,7 @@ pmclass MultiSub extends ResizablePMCArray auto_attrs provides array {
/* I don't really know how to implement these if they need something
special, so I'll sort the sub list and defer processing to the
- ResizablePMCArray's VTABLE methods of the same names. Hopefully we
+ ResizablePMCArray's VTABLEs of the same names. Hopefully we
don't need anything beyond that. */
VTABLE PMC *get_pmc_keyed(PMC *key) {
PMC * const sig_obj = CONTEXT(interp)->current_sig;
View
4 src/pmc/namespace.pmc
@@ -144,7 +144,7 @@ ns_insert_sub_keyed_str(PARROT_INTERP, ARGIN(PMC *self), ARGIN(STRING *key),
/* Otherwise, store it in the namespace for the class to
* retrieve later */
else {
- /* If we don't have a place to hang vtable methods, make one. */
+ /* If we don't have a place to hang vtables, make one. */
if (PMC_IS_NULL(vtable))
nsinfo->vtable = vtable = Parrot_pmc_new(interp, enum_class_Hash);
@@ -1093,7 +1093,7 @@ the namespace.
=item C<METHOD get_associated_vtable_methods()>
-Gets the Hash of vtable methods associated with this namespace and removes it
+Gets the Hash of vtables associated with this namespace and removes it
from the namespace.
=cut
View
8 src/pmc/object.pmc
@@ -500,7 +500,7 @@ Invoke the PIR-defined vtable override, or call the default get_integer.
Parrot_Class_attributes * const _class = PARROT_CLASS(obj->_class);
STRING * const meth_name = CONST_STRING(interp, "get_integer");
- /* Walk and search for the vtable method. */
+ /* Walk and search for the vtable. */
const int num_classes = VTABLE_elements(interp, _class->all_parents);
int i;
for (i = 0; i < num_classes; i++) {
@@ -517,7 +517,7 @@ Invoke the PIR-defined vtable override, or call the default get_integer.
}
/* method name is get_integer */
if (cur_class->vtable->base_type == enum_class_PMCProxy) {
- /* Get the PMC instance and call the vtable method on that. */
+ /* Get the PMC instance and call the vtable function on that. */
STRING * const proxy = CONST_STRING(interp, "proxy");
PMC * const del_object = VTABLE_get_attr_str(interp, pmc, proxy);
@@ -713,7 +713,7 @@ Invokes the object (if this vtable function is overridden).
Parrot_Object_attributes * const obj = PARROT_OBJECT(pmc);
Parrot_Class_attributes * const _class = PARROT_CLASS(obj->_class);
- /* Walk and search for the vtable method. */
+ /* Walk and search for the vtable. */
const int num_classes = VTABLE_elements(interp, _class->all_parents);
int i;
@@ -738,7 +738,7 @@ Invokes the object (if this vtable function is overridden).
}
if (cur_class->vtable->base_type == enum_class_PMCProxy) {
- /* Get the PMC instance and call the vtable method on that. */
+ /* Get the PMC instance and call the vtable function on that. */
PMC * const del_object =
VTABLE_get_attr_keyed(interp, pmc, cur_class, proxy);
View
2 src/pmc/pmcproxy.pmc
@@ -465,7 +465,7 @@ parameter is supplied, a particular item of introspection data.
*/
METHOD inspect(STRING *what :optional, int got_what :opt_flag) {
- /* Just delegate to the appropriate vtable method. */
+ /* Just delegate to the appropriate vtable. */
PMC * const found =
got_what
? VTABLE_inspect_str(interp, SELF, what)
View
4 src/pmc/role.pmc
@@ -573,7 +573,7 @@ Returns whether the class does the givne C<*role>.
}
/*
- * Below here are non-vtable methods that eventually will go in a role
+ * Below here are methods that eventually will go in a role
* that is composed into here to optionally give a nice interface from
* PIR (ParrotRole isa Role does RoleMethods or something like this).
*/
@@ -770,7 +770,7 @@ parameter is supplied, a particular item of introspection data.
METHOD inspect(STRING *what :optional, int got_what :opt_flag) {
PMC *found;
- /* Just delegate to the appropriate vtable method. */
+ /* Just delegate to the appropriate vtable. */
if (got_what)
found = VTABLE_inspect_str(interp, SELF, what);
else
View
2 t/dynpmc/rotest.t
@@ -49,7 +49,7 @@ CODE
my %tests = (
# these first two tests would test overriding of the default
- # read-onlyness notion of vtable methods
+ # read-onlyness notion of vtables
q{value = 42} => [ 1, 0 ],
q{$I0 = value} => [ 0, 0 ],
View
2 t/op/exceptions.t
@@ -378,7 +378,7 @@ Error: No handler to delete.
done.
OUTPUT
-# stringification is handled by a vtable method, which runs in a second
+# stringification is handled by a vtable, which runs in a second
# runloop. when an error in the method tries to go to a Error_Handler defined
# outside it, it winds up going to the inner runloop, giving strange results.
pir_output_is( <<'CODE', <<'OUTPUT', 'pop_eh out of context (2)', todo => 'runloop shenanigans' );
View
2 t/pmc/exception-old.t
@@ -359,7 +359,7 @@ CODE
/Mark 500 not found/
OUTPUT
-# stringification is handled by a vtable method, which runs in a second
+# stringification is handled by a vtable, which runs in a second
# runloop. when an error in the method tries to go to a Error_Handler defined
# outside it, it winds up going to the inner runloop, giving strange results.
pir_output_is( <<'CODE', <<'OUTPUT', 'pop_eh out of context (2)', todo => 'runloop shenanigans' );
View
4 t/pmc/objects.t
@@ -1377,11 +1377,11 @@ l1:
$P1 = new 'Foo41'
$S1 = $P1
- is( $S1, 'Hello world', 'get_string method' )
+ is( $S1, 'Hello world', 'get_string :vtable :method' )
$P1 = new 'Bar41'
$S1 = $P1
- is( $S1, 'Hello world', 'vtable method get_string' )
+ is( $S1, 'Hello world', 'get_string :method :vtable' )
.end
.namespace [ 'Foo41' ]
View
2 t/pmc/parrotobject.t
@@ -84,7 +84,7 @@ pir_error_output_like( <<'CODE', <<'OUT', ':vtable with bad name' );
.return("monkey")
.end
CODE
-/'not_in_the_vtable' is not a v-table method, but was used with :vtable/
+/'not_in_the_vtable' is not a vtable, but was used with :vtable/
OUT
# '
View
8 t/pmc/pmcproxy.t
@@ -144,10 +144,10 @@ Tests the PMCProxy PMC.
addparent $P0, $P1
ok(1, "added Class's PMCProxy as a parent of the PDD15 class")
- #We will override the add_role vtable method.
+ #We will override the add_role vtable
$P2 = get_global 'no_add_role'
$P0.'add_vtable_override'('add_role', $P2)
- ok(1, 'overrode a vtable method')
+ ok(1, 'overrode a vtable')
$P2 = $P0.'new'()
ok(1, 'instantiated the class')
@@ -178,7 +178,7 @@ Tests the PMCProxy PMC.
addparent $P0, $P1
ok(1, "added Class's PMCProxy as a parent of the PDD15 class")
- #We will override the inspect_str vtable method.
+ #We will override the inspect_str vtable
$P2 = get_global 'always42'
$P0.'add_vtable_override'('inspect_str', $P2)
ok(1, 'overrode inspect_str method')
@@ -188,7 +188,7 @@ Tests the PMCProxy PMC.
$P3 = $P2.'inspect'('methods')
is($P3, 42, "the magic overriding sub was called")
- ok(1, 'Called non-overridden method, which called overridden vtable method')
+ ok(1, 'Called non-overridden method, which called overridden vtable')
.end
.sub always42 :method
.param string what

0 comments on commit 1df1b75

Please sign in to comment.