[svn:parrot] r45297 - in trunk: compilers/imcc compilers/pct/src/POST compilers/pirc/src docs docs/book/draft docs/dev docs/pdds docs/pdds/draft docs/pmc examples/tutorial lib/Parrot lib/Parrot/Pmc2c lib/Parrot/Pmc2c/PMC runtime/parrot/library runtime/parrot/library/Getopt runtime/parrot/library/HTTP src src/io src/pmc t/dynpmc t/op t/pmc

coke at svn.parrot.org coke at svn.parrot.org
Tue Mar 30 01:33:48 UTC 2010


Author: coke
Date: Tue Mar 30 01:33:45 2010
New Revision: 45297
URL: https://trac.parrot.org/parrot/changeset/45297

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

This resolves TT #487

Modified:
   trunk/compilers/imcc/pbc.c
   trunk/compilers/pct/src/POST/Node.pir
   trunk/compilers/pirc/src/pircompunit.c
   trunk/docs/book/draft/ch07_dynpmcs.pod
   trunk/docs/book/draft/chXX_hlls.pod
   trunk/docs/dev/infant.pod
   trunk/docs/dev/pccmethods.pod
   trunk/docs/dev/pmc_freeze.pod
   trunk/docs/dev/pmc_obj_design_meeting_notes.pod
   trunk/docs/pdds/draft/pdd06_pasm.pod
   trunk/docs/pdds/draft/pdd08_keys.pod
   trunk/docs/pdds/draft/pdd10_embedding.pod
   trunk/docs/pdds/pdd09_gc.pod
   trunk/docs/pdds/pdd17_pmc.pod
   trunk/docs/pmc/documentation.pod
   trunk/docs/pmc2c.pod
   trunk/examples/tutorial/56_defined.pir
   trunk/lib/Parrot/Pmc2c/MethodEmitter.pm
   trunk/lib/Parrot/Pmc2c/Object.pm
   trunk/lib/Parrot/Pmc2c/PMC.pm
   trunk/lib/Parrot/Pmc2c/PMC/Null.pm
   trunk/lib/Parrot/Pmc2c/PMC/Object.pm
   trunk/lib/Parrot/Pmc2c/PMC/ParrotClass.pm
   trunk/lib/Parrot/Pmc2c/PMC/default.pm
   trunk/lib/Parrot/Pmc2c/PMCEmitter.pm
   trunk/lib/Parrot/Pmc2c/Parser.pm
   trunk/lib/Parrot/Vtable.pm
   trunk/runtime/parrot/library/Getopt/Obj.pir
   trunk/runtime/parrot/library/HTTP/Daemon.pir
   trunk/runtime/parrot/library/P6object.pir
   trunk/src/byteorder.c
   trunk/src/io/api.c
   trunk/src/oo.c
   trunk/src/pmc/arrayiterator.pmc
   trunk/src/pmc/class.pmc
   trunk/src/pmc/exporter.pmc
   trunk/src/pmc/multisub.pmc
   trunk/src/pmc/namespace.pmc
   trunk/src/pmc/object.pmc
   trunk/src/pmc/pmcproxy.pmc
   trunk/src/pmc/role.pmc
   trunk/t/dynpmc/rotest.t
   trunk/t/op/exceptions.t
   trunk/t/pmc/exception-old.t
   trunk/t/pmc/objects.t
   trunk/t/pmc/parrotobject.t
   trunk/t/pmc/pmcproxy.t

Modified: trunk/compilers/imcc/pbc.c
==============================================================================
--- trunk/compilers/imcc/pbc.c	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/compilers/imcc/pbc.c	Tue Mar 30 01:33:45 2010	(r45297)
@@ -1395,7 +1395,7 @@
         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 @@
         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) {

Modified: trunk/compilers/pct/src/POST/Node.pir
==============================================================================
--- trunk/compilers/pct/src/POST/Node.pir	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/compilers/pct/src/POST/Node.pir	Tue Mar 30 01:33:45 2010	(r45297)
@@ -82,7 +82,7 @@
 .end
 
 
-=item get_string()   # vtable method
+=item get_string()
 
 Returns the result of the current node as a string.
 

Modified: trunk/compilers/pirc/src/pircompunit.c
==============================================================================
--- trunk/compilers/pirc/src/pircompunit.c	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/compilers/pirc/src/pircompunit.c	Tue Mar 30 01:33:45 2010	(r45297)
@@ -274,9 +274,9 @@
 =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 @@
     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 */

Modified: trunk/docs/book/draft/ch07_dynpmcs.pod
==============================================================================
--- trunk/docs/book/draft/ch07_dynpmcs.pod	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/docs/book/draft/ch07_dynpmcs.pod	Tue Mar 30 01:33:45 2010	(r45297)
@@ -195,7 +195,7 @@
 =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 */

Modified: trunk/docs/book/draft/chXX_hlls.pod
==============================================================================
--- trunk/docs/book/draft/chXX_hlls.pod	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/docs/book/draft/chXX_hlls.pod	Tue Mar 30 01:33:45 2010	(r45297)
@@ -211,9 +211,9 @@
 
 =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.

Modified: trunk/docs/dev/infant.pod
==============================================================================
--- trunk/docs/dev/infant.pod	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/docs/dev/infant.pod	Tue Mar 30 01:33:45 2010	(r45297)
@@ -142,15 +142,15 @@
  + 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
 

Modified: trunk/docs/dev/pccmethods.pod
==============================================================================
--- trunk/docs/dev/pccmethods.pod	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/docs/dev/pccmethods.pod	Tue Mar 30 01:33:45 2010	(r45297)
@@ -10,7 +10,7 @@
 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 @@
 
 =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

Modified: trunk/docs/dev/pmc_freeze.pod
==============================================================================
--- trunk/docs/dev/pmc_freeze.pod	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/docs/dev/pmc_freeze.pod	Tue Mar 30 01:33:45 2010	(r45297)
@@ -79,7 +79,7 @@
 =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 @@
 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 @@
 
 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.
 

Modified: trunk/docs/dev/pmc_obj_design_meeting_notes.pod
==============================================================================
--- trunk/docs/dev/pmc_obj_design_meeting_notes.pod	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/docs/dev/pmc_obj_design_meeting_notes.pod	Tue Mar 30 01:33:45 2010	(r45297)
@@ -60,7 +60,7 @@
 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.

Modified: trunk/docs/pdds/draft/pdd06_pasm.pod
==============================================================================
--- trunk/docs/pdds/draft/pdd06_pasm.pod	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/docs/pdds/draft/pdd06_pasm.pod	Tue Mar 30 01:33:45 2010	(r45297)
@@ -172,7 +172,7 @@
 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 @@
 
     $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
 

Modified: trunk/docs/pdds/draft/pdd08_keys.pod
==============================================================================
--- trunk/docs/pdds/draft/pdd08_keys.pod	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/docs/pdds/draft/pdd08_keys.pod	Tue Mar 30 01:33:45 2010	(r45297)
@@ -91,7 +91,7 @@
 =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 @@
 
 =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 @@
 
     $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 @@
 =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
 

Modified: trunk/docs/pdds/draft/pdd10_embedding.pod
==============================================================================
--- trunk/docs/pdds/draft/pdd10_embedding.pod	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/docs/pdds/draft/pdd10_embedding.pod	Tue Mar 30 01:33:45 2010	(r45297)
@@ -74,7 +74,7 @@
 
 =back
 
-=item * probably includes vtable methods on PMCs
+=item * probably includes vtable functions on PMCs
 
 =back
 

Modified: trunk/docs/pdds/pdd09_gc.pod
==============================================================================
--- trunk/docs/pdds/pdd09_gc.pod	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/docs/pdds/pdd09_gc.pod	Tue Mar 30 01:33:45 2010	(r45297)
@@ -421,7 +421,7 @@
 =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 @@
 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
 

Modified: trunk/docs/pdds/pdd17_pmc.pod
==============================================================================
--- trunk/docs/pdds/pdd17_pmc.pod	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/docs/pdds/pdd17_pmc.pod	Tue Mar 30 01:33:45 2010	(r45297)
@@ -1656,7 +1656,7 @@
 =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)

Modified: trunk/docs/pmc/documentation.pod
==============================================================================
--- trunk/docs/pmc/documentation.pod	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/docs/pmc/documentation.pod	Tue Mar 30 01:33:45 2010	(r45297)
@@ -36,7 +36,8 @@
  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:
 

Modified: trunk/docs/pmc2c.pod
==============================================================================
--- trunk/docs/pmc2c.pod	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/docs/pmc2c.pod	Tue Mar 30 01:33:45 2010	(r45297)
@@ -144,7 +144,7 @@
 
 =item 4.
 
-A list of vtable method implementations
+A list of vtable function implementations
 
 =item 5.
 
@@ -154,7 +154,7 @@
 
 =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,11 +168,11 @@
 
 =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)>
 
@@ -180,7 +180,7 @@
 
 =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)>

Modified: trunk/examples/tutorial/56_defined.pir
==============================================================================
--- trunk/examples/tutorial/56_defined.pir	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/examples/tutorial/56_defined.pir	Tue Mar 30 01:33:45 2010	(r45297)
@@ -26,7 +26,7 @@
 =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

Modified: trunk/lib/Parrot/Pmc2c/MethodEmitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/MethodEmitter.pm	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/lib/Parrot/Pmc2c/MethodEmitter.pm	Tue Mar 30 01:33:45 2010	(r45297)
@@ -163,7 +163,7 @@
 =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 @@
     # 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...)

Modified: trunk/lib/Parrot/Pmc2c/Object.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/Object.pm	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/lib/Parrot/Pmc2c/Object.pm	Tue Mar 30 01:33:45 2010	(r45297)
@@ -37,8 +37,8 @@
 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

Modified: trunk/lib/Parrot/Pmc2c/PMC.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMC.pm	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/lib/Parrot/Pmc2c/PMC.pm	Tue Mar 30 01:33:45 2010	(r45297)
@@ -132,7 +132,7 @@
 
 =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 @@
 
 =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
 

Modified: trunk/lib/Parrot/Pmc2c/PMC/Null.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMC/Null.pm	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/lib/Parrot/Pmc2c/PMC/Null.pm	Tue Mar 30 01:33:45 2010	(r45297)
@@ -29,7 +29,7 @@
 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);

Modified: trunk/lib/Parrot/Pmc2c/PMC/Object.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMC/Object.pm	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/lib/Parrot/Pmc2c/PMC/Object.pm	Tue Mar 30 01:33:45 2010	(r45297)
@@ -22,8 +22,8 @@
 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
@@ -31,7 +31,7 @@
 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 @@
     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 @@
         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);
 

Modified: trunk/lib/Parrot/Pmc2c/PMC/ParrotClass.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMC/ParrotClass.pm	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/lib/Parrot/Pmc2c/PMC/ParrotClass.pm	Tue Mar 30 01:33:45 2010	(r45297)
@@ -66,7 +66,7 @@
 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};

Modified: trunk/lib/Parrot/Pmc2c/PMC/default.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMC/default.pm	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/lib/Parrot/Pmc2c/PMC/default.pm	Tue Mar 30 01:33:45 2010	(r45297)
@@ -32,7 +32,7 @@
 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);

Modified: trunk/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMCEmitter.pm	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/lib/Parrot/Pmc2c/PMCEmitter.pm	Tue Mar 30 01:33:45 2010	(r45297)
@@ -167,7 +167,7 @@
     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 @@
 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 @@
         }
     }
 
-    # non-vtable methods
+    # methods
     foreach my $method ( @{ $self->methods } ) {
         next if $method->is_vtable;
         $method->generate_body($self);
@@ -718,7 +718,7 @@
 
 =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 @@
 
 =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 @@
         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';

Modified: trunk/lib/Parrot/Pmc2c/Parser.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/Parser.pm	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/lib/Parrot/Pmc2c/Parser.pm	Tue Mar 30 01:33:45 2010	(r45297)
@@ -279,7 +279,7 @@
         }
         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);

Modified: trunk/lib/Parrot/Vtable.pm
==============================================================================
--- trunk/lib/Parrot/Vtable.pm	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/lib/Parrot/Vtable.pm	Tue Mar 30 01:33:45 2010	(r45297)
@@ -67,7 +67,7 @@
 
   [ 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 @@
 
 /*
  * 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 @@
 
 =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

Modified: trunk/runtime/parrot/library/Getopt/Obj.pir
==============================================================================
--- trunk/runtime/parrot/library/Getopt/Obj.pir	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/runtime/parrot/library/Getopt/Obj.pir	Tue Mar 30 01:33:45 2010	(r45297)
@@ -357,7 +357,7 @@
 
 =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
 

Modified: trunk/runtime/parrot/library/HTTP/Daemon.pir
==============================================================================
--- trunk/runtime/parrot/library/HTTP/Daemon.pir	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/runtime/parrot/library/HTTP/Daemon.pir	Tue Mar 30 01:33:45 2010	(r45297)
@@ -207,10 +207,9 @@
     $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

Modified: trunk/runtime/parrot/library/P6object.pir
==============================================================================
--- trunk/runtime/parrot/library/P6object.pir	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/runtime/parrot/library/P6object.pir	Tue Mar 30 01:33:45 2010	(r45297)
@@ -727,7 +727,7 @@
 
 =over 4
 
-=item get_string()  (vtable method)
+=item get_string()
 
 Returns the "shortname" of the protoobject's class and parens.
 
@@ -743,7 +743,7 @@
     .return ($S0)
 .end
 
-=item defined()  (vtable method)
+=item defined()
 
 Protoobjects are always treated as being undefined.
 
@@ -754,7 +754,7 @@
 .end
 
 
-=item name()  (vtable method)
+=item name()
 
 Have protoobjects return their longname in response to a
 C<typeof_s_p> opcode.

Modified: trunk/src/byteorder.c
==============================================================================
--- trunk/src/byteorder.c	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/src/byteorder.c	Tue Mar 30 01:33:45 2010	(r45297)
@@ -10,7 +10,7 @@
 
 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.

Modified: trunk/src/io/api.c
==============================================================================
--- trunk/src/io/api.c	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/src/io/api.c	Tue Mar 30 01:33:45 2010	(r45297)
@@ -904,7 +904,7 @@
 
 =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
 

Modified: trunk/src/oo.c
==============================================================================
--- trunk/src/oo.c	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/src/oo.c	Tue Mar 30 01:33:45 2010	(r45297)
@@ -130,7 +130,7 @@
         }
     }
 
-    /* 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 @@
         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;
 

Modified: trunk/src/pmc/arrayiterator.pmc
==============================================================================
--- trunk/src/pmc/arrayiterator.pmc	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/src/pmc/arrayiterator.pmc	Tue Mar 30 01:33:45 2010	(r45297)
@@ -40,7 +40,7 @@
 
 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

Modified: trunk/src/pmc/class.pmc
==============================================================================
--- trunk/src/pmc/class.pmc	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/src/pmc/class.pmc	Tue Mar 30 01:33:45 2010	(r45297)
@@ -62,7 +62,7 @@
 
 =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 @@
                 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 @@
     }
 
     /* **********************************************************************
-     * 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 @@
 =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 @@
 =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 @@
     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

Modified: trunk/src/pmc/exporter.pmc
==============================================================================
--- trunk/src/pmc/exporter.pmc	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/src/pmc/exporter.pmc	Tue Mar 30 01:33:45 2010	(r45297)
@@ -49,7 +49,8 @@
 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
 

Modified: trunk/src/pmc/multisub.pmc
==============================================================================
--- trunk/src/pmc/multisub.pmc	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/src/pmc/multisub.pmc	Tue Mar 30 01:33:45 2010	(r45297)
@@ -83,7 +83,7 @@
 
     /* 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;

Modified: trunk/src/pmc/namespace.pmc
==============================================================================
--- trunk/src/pmc/namespace.pmc	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/src/pmc/namespace.pmc	Tue Mar 30 01:33:45 2010	(r45297)
@@ -144,7 +144,7 @@
         /* 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 @@
 
 =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

Modified: trunk/src/pmc/object.pmc
==============================================================================
--- trunk/src/pmc/object.pmc	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/src/pmc/object.pmc	Tue Mar 30 01:33:45 2010	(r45297)
@@ -500,7 +500,7 @@
         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 @@
             }
             /* 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 @@
         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 @@
             }
 
             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);
 

Modified: trunk/src/pmc/pmcproxy.pmc
==============================================================================
--- trunk/src/pmc/pmcproxy.pmc	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/src/pmc/pmcproxy.pmc	Tue Mar 30 01:33:45 2010	(r45297)
@@ -465,7 +465,7 @@
 */
 
     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)

Modified: trunk/src/pmc/role.pmc
==============================================================================
--- trunk/src/pmc/role.pmc	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/src/pmc/role.pmc	Tue Mar 30 01:33:45 2010	(r45297)
@@ -573,7 +573,7 @@
     }
 
     /*
-     * 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 @@
     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

Modified: trunk/t/dynpmc/rotest.t
==============================================================================
--- trunk/t/dynpmc/rotest.t	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/t/dynpmc/rotest.t	Tue Mar 30 01:33:45 2010	(r45297)
@@ -49,7 +49,7 @@
     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 ],
 

Modified: trunk/t/op/exceptions.t
==============================================================================
--- trunk/t/op/exceptions.t	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/t/op/exceptions.t	Tue Mar 30 01:33:45 2010	(r45297)
@@ -378,7 +378,7 @@
 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' );

Modified: trunk/t/pmc/exception-old.t
==============================================================================
--- trunk/t/pmc/exception-old.t	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/t/pmc/exception-old.t	Tue Mar 30 01:33:45 2010	(r45297)
@@ -359,7 +359,7 @@
 /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' );

Modified: trunk/t/pmc/objects.t
==============================================================================
--- trunk/t/pmc/objects.t	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/t/pmc/objects.t	Tue Mar 30 01:33:45 2010	(r45297)
@@ -1377,11 +1377,11 @@
 
     $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' ]

Modified: trunk/t/pmc/parrotobject.t
==============================================================================
--- trunk/t/pmc/parrotobject.t	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/t/pmc/parrotobject.t	Tue Mar 30 01:33:45 2010	(r45297)
@@ -84,7 +84,7 @@
     .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
 
 # '

Modified: trunk/t/pmc/pmcproxy.t
==============================================================================
--- trunk/t/pmc/pmcproxy.t	Tue Mar 30 01:29:20 2010	(r45296)
+++ trunk/t/pmc/pmcproxy.t	Tue Mar 30 01:33:45 2010	(r45297)
@@ -144,10 +144,10 @@
     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 @@
     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 @@
 
     $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


More information about the parrot-commits mailing list