Ticket #487: replacing_vtable_method_with_vtable_function.patch

File replacing_vtable_method_with_vtable_function.patch, 30.1 KB (added by tcurtis, 12 years ago)

Replaces "vtable method" with "vtable function" in most places(ignoring strings and actual code).

  • runtime/parrot/library/HTTP/Daemon.pir

     
    209209 
    210210=item __get_bool() 
    211211 
    212 Vtable method, called from the C<if> or C<unless> opcode. Returns 
     212Vtable function, called from the C<if> or C<unless> opcode. Returns 
    213213true, if the daemon object is listening on a socket, that is if the 
    214214initialization went ok. 
    215215 
  • runtime/parrot/library/Getopt/Obj.pir

     
    357357 
    358358=item C<push_string(STRING format)> 
    359359 
    360 A vtable method, invoked by e.g. C<push getopts, "foo|f=s">.  The format is as such. 
     360A vtable function, invoked by e.g. C<push getopts, "foo|f=s">.  The format is as such. 
    361361 
    362362=over 4 
    363363 
  • runtime/parrot/library/P6object.pir

     
    727727 
    728728=over 4 
    729729 
    730 =item get_string()  (vtable method) 
     730=item get_string()  (vtable function) 
    731731 
    732732Returns the "shortname" of the protoobject's class and parens. 
    733733 
     
    743743    .return ($S0) 
    744744.end 
    745745 
    746 =item defined()  (vtable method) 
     746=item defined()  (vtable function) 
    747747 
    748748Protoobjects are always treated as being undefined. 
    749749 
     
    754754.end 
    755755 
    756756 
    757 =item name()  (vtable method) 
     757=item name()  (vtable function) 
    758758 
    759759Have protoobjects return their longname in response to a 
    760760C<typeof_s_p> opcode. 
  • src/byteorder.c

     
    1010 
    1111These are assigned to a vtable when the PBC file is loaded. 
    1212 
    13 If the vtable method for conversion from the native byteorder is called, 
     13If the vtable function for conversion from the native byteorder is called, 
    1414it is a I<no op> and will work, but the caller should know if the 
    1515byteorder in the PBC file is native and skip the conversion and just map 
    1616it in. 
  • src/oo.c

     
    130130        } 
    131131    } 
    132132 
    133     /* Import any vtable methods. */ 
     133    /* Import any vtable functions. */ 
    134134    Parrot_pcc_invoke_method_from_c_args(interp, ns, CONST_STRING(interp, "get_associated_vtable_methods"), "->P", &vtable_overrides); 
    135135 
    136136    if (!PMC_IS_NULL(vtable_overrides)) { 
     
    500500        VTABLE_get_pmc_keyed_str(interp, _class->parent_overrides, name); 
    501501 
    502502    if (PMC_IS_NULL(result)) { 
    503         /* Walk and search for the vtable method. */ 
     503        /* Walk and search for the vtable function. */ 
    504504        const INTVAL num_classes = VTABLE_elements(interp, _class->all_parents); 
    505505        INTVAL       i; 
    506506 
  • src/pmc/role.pmc

     
    750750    METHOD inspect(STRING *what :optional, int got_what :opt_flag) { 
    751751        PMC *found; 
    752752 
    753         /* Just delegate to the appropriate vtable method. */ 
     753        /* Just delegate to the appropriate vtable function. */ 
    754754        if (got_what) 
    755755            found = VTABLE_inspect_str(interp, SELF, what); 
    756756        else 
  • src/pmc/class.pmc

     
    6262 
    6363=item C<vtable_overrides> 
    6464 
    65 A directory of vtable method names and method bodies this class overrides. 
     65A directory of vtable function names and function bodies this class overrides. 
    6666An empty Hash PMC is allocated during initialization. 
    6767 
    6868=item C<attrib_metadata> 
     
    767767                EXCEPTION_METHOD_NOT_FOUND, 
    768768                "'%S' is not a valid vtable function name.", name); 
    769769 
    770         /* Add it to vtable methods list. */ 
     770        /* Add it to vtable functions list. */ 
    771771        VTABLE_set_pmc_keyed_str(interp, _class->vtable_overrides, name, sub); 
    772772    } 
    773773 
     
    17141714=item C<void add_method(STRING *name, PMC *sub)> 
    17151715 
    17161716Adds the given sub PMC as a method with the given name. Delegates to the 
    1717 C<add_method> vtable method. 
     1717C<add_method> vtable function. 
    17181718 
    17191719=cut 
    17201720 
     
    17281728=item C<void add_vtable_override(STRING *name, PMC *sub)> 
    17291729 
    17301730Adds the given sub PMC as a vtable override with the given name. Delegates to 
    1731 the C<add_vtable_override> vtable method. 
     1731the C<add_vtable_override> vtable function. 
    17321732 
    17331733=cut 
    17341734 
     
    18831883    METHOD inspect(STRING *what :optional, int has_what :opt_flag) { 
    18841884        PMC *found; 
    18851885 
    1886         /* Just delegate to the appropriate vtable method. */ 
     1886        /* Just delegate to the appropriate vtable function. */ 
    18871887        if (has_what) 
    18881888            found = SELF.inspect_str(what); 
    18891889        else 
  • src/pmc/object.pmc

     
    430430        Parrot_Class_attributes  * const _class    = PARROT_CLASS(obj->_class); 
    431431        STRING * const meth_name = CONST_STRING(interp, "get_integer"); 
    432432 
    433         /* Walk and search for the vtable method. */ 
     433        /* Walk and search for the vtable function. */ 
    434434        const int num_classes = VTABLE_elements(interp, _class->all_parents); 
    435435        int i; 
    436436        for (i = 0; i < num_classes; i++) { 
     
    447447            } 
    448448            /* method name is get_integer */ 
    449449            if (cur_class->vtable->base_type == enum_class_PMCProxy) { 
    450                 /* Get the PMC instance and call the vtable method on that. */ 
     450                /* Get the PMC instance and call the vtable function on that. */ 
    451451                STRING * const proxy      = CONST_STRING(interp, "proxy"); 
    452452                PMC    * const del_object = VTABLE_get_attr_str(interp, pmc, proxy); 
    453453 
     
    643643        Parrot_Object_attributes * const obj    = PARROT_OBJECT(pmc); 
    644644        Parrot_Class_attributes  * const _class = PARROT_CLASS(obj->_class); 
    645645 
    646         /* Walk and search for the vtable method. */ 
     646        /* Walk and search for the vtable function. */ 
    647647        const int num_classes = VTABLE_elements(interp, _class->all_parents); 
    648648        int i; 
    649649 
     
    669669            } 
    670670 
    671671            if (cur_class->vtable->base_type == enum_class_PMCProxy) { 
    672                 /* Get the PMC instance and call the vtable method on that. */ 
     672                /* Get the PMC instance and call the vtable function on that. */ 
    673673                PMC * const del_object = 
    674674                    VTABLE_get_attr_keyed(interp, pmc, cur_class, proxy); 
    675675 
  • src/pmc/multisub.pmc

     
    7979 
    8080    /* I don't really know how to implement these if they need something 
    8181       special, so I'll sort the sub list and defer processing to the 
    82        ResizablePMCArray's VTABLE methods of the same names. Hopefully we 
     82       ResizablePMCArray's VTABLE functions of the same names. Hopefully we 
    8383       don't need anything beyond that. */ 
    8484    VTABLE PMC *get_pmc_keyed(PMC *key) { 
    8585        PMC * const sig_obj = CONTEXT(interp)->current_sig; 
  • src/pmc/namespace.pmc

     
    6868        /* Otherwise, store it in the namespace for the class to 
    6969         * retrieve later */ 
    7070        else { 
    71             /* If we don't have a place to hang vtable methods, make one. */ 
     71            /* If we don't have a place to hang vtable functions, make one. */ 
    7272            if (PMC_IS_NULL(vtable)) 
    7373                nsinfo->vtable = vtable = pmc_new(interp, enum_class_Hash); 
    7474 
     
    984984 
    985985=item C<METHOD get_associated_vtable_methods()> 
    986986 
    987 Gets the Hash of vtable methods associated with this namespace and removes it 
     987Gets the Hash of vtable functions associated with this namespace and removes it 
    988988from the namespace. 
    989989 
    990990=cut 
  • src/pmc/pmcproxy.pmc

     
    457457 
    458458*/ 
    459459    METHOD inspect(STRING *what :optional, int got_what :opt_flag) { 
    460         /* Just delegate to the appropriate vtable method. */ 
     460        /* Just delegate to the appropriate vtable function. */ 
    461461        PMC * const found = 
    462462            got_what 
    463463                ? VTABLE_inspect_str(interp, SELF, what) 
  • src/pmc/arrayiterator.pmc

     
    4040 
    4141NB: for different direction you have to use different ops! 
    4242 
    43 TODO: Discuss idea of having separate get_iter/get_reverse_iter VTABLE methods 
     43TODO: Discuss idea of having separate get_iter/get_reverse_iter VTABLE functions 
    4444to avoid this caveat. 
    4545 
    4646=head1 Methods 
  • src/io/api.c

     
    905905 
    906906=item C<PIOOFF_T Parrot_io_make_offset_pmc(PARROT_INTERP, PMC *pmc)> 
    907907 
    908 Returns the return value of the C<get_integer> vtable method on C<*pmc>. 
     908Returns the return value of the C<get_integer> vtable function on C<*pmc>. 
    909909 
    910910=cut 
    911911 
  • docs/pmc2c.pod

     
    133133 
    134134=item 3. 
    135135 
    136 A list of vtable method implementations 
     136A list of vtable function implementations 
    137137 
    138138=item 4. 
    139139 
     
    143143 
    144144=head2 Method Body Substitutions 
    145145 
    146 The vtable method bodies can use the following substitutions: 
     146The vtable function bodies can use the following substitutions: 
    147147 
    148148=over 4 
    149149 
     
    157157 
    158158=item C<OtherClass.SELF.method(a,b,c)> 
    159159 
    160 Calls the static vtable method 'method' in C<OtherClass>. 
     160Calls the static vtable function 'method' in C<OtherClass>. 
    161161 
    162162=item C<SELF.method(a,b,c)> 
    163163 
    164 Calls the vtable method 'method' using the dynamic type of C<SELF>. 
     164Calls the vtable functions 'method' using the dynamic type of C<SELF>. 
    165165 
    166166=item C<SELF(a,b,c)> 
    167167 
     
    169169 
    170170=item C<STATICSELF.method(a,b,c)> 
    171171 
    172 Calls the vtable method 'method' using the static type of C<SELF> (in 
     172Calls the vtable function 'method' using the static type of C<SELF> (in 
    173173other words, calls another method defined in the same file). 
    174174 
    175175=item C<OtherClass.SUPER(a,b,c)> 
  • docs/book/draft/ch07_dynpmcs.pod

     
    195195=head3 VTABLE Functions Parameters 
    196196 
    197197VTABLE functions are defined just like ordinary C functions, almost. Here's 
    198 a normal definition for a VTABLE method: 
     198a normal definition for a VTABLE function: 
    199199 
    200200  VTABLE VTABLENAME (PARAMETERS) { 
    201201    /* ordinary C here, almost */ 
  • docs/book/draft/chXX_hlls.pod

     
    211211 
    212212=over 4 
    213213 
    214 =item * VTable methods 
     214=item * VTable functions 
    215215 
    216 VTable methods are the standard interface for PMC data types, and all PMCs 
     216VTable functions are the standard interface for PMC data types, and all PMCs 
    217217have them. If the PMCs were written properly to satisfy this interface 
    218218all the necessary information from those PMCs. Operate on the PMCs at the 
    219219VTable level, and we can safely ignore the implementation details of them. 
  • docs/dev/infant.pod

     
    142142 + Fast mark phase (GC already manipulates the flags) 
    143143 - Generation count must be maintained 
    144144 - Disallows recursive opcode calls (necessary for eg implementing 
    145    vtable methods in pasm) 
     145   vtable functions in pasm) 
    146146 - Can temporarily use more memory (dead objects accumulate during the 
    147147   current generation) 
    148148 
    149149In order to allow recursive opcode calls, we could increment the generation 
    150150count in more places and make sure nothing is left unanchored at those points, 
    151151but that would gradually remove all advantages of this scheme and make it more 
    152 difficult to call existing vtable methods (since you never know when they might 
     152difficult to call existing vtable functions (since you never know when they might 
    153153start running pasm code.) 
    154154 
    155155=head2 Variant 5: generation stack 
  • docs/dev/pmc_freeze.pod

     
    7979=head2 The visit_info structure 
    8080 
    8181This structure holds all necessary information and function pointers specific 
    82 to the desired functionality. It gets passed on to all vtable methods and 
     82to the desired functionality. It gets passed on to all vtable functions and 
    8383callback functions. 
    8484 
    8585=head2 Working loop 
     
    9999This is done by a callback function inside the B<visit_info> structure called 
    100100B<visit_pmc_now>. It gets called initially to put the first item on the list 
    101101and is called thereafter from all PMCs for contained PMCs inside the B<visit> 
    102 vtable method. 
     102vtable functions. 
    103103 
    104104 
    105105=head2 The visit() vtable 
     
    140140 
    141141So after all we finally arrived at the point to actually perform the desired 
    142142functionality. First the PMC-specific part is done inside F<pmc_freeze.c> then 
    143 the specific vtable method B<freeze>, B<thaw>, whatever, is called, again via a 
     143the specific vtable function B<freeze>, B<thaw>, whatever, is called, again via a 
    144144function pointer called B<visit_action>. 
    145145 
    146146=head1 Freeze and thaw 
    147147 
    148148As stated PMCs are currently processed inside the core, PMC-specific parts are 
    149 done by calling the PMCs vtable method. This parts could of course be moved to 
     149done by calling the PMCs vtable function. This parts could of course be moved to 
    150150F<default.pmc> too, so that it's simpler to override the functionality. 
    151151 
    152152=head2 Serializer interface 
    153153 
    154154During initialization the B<visit_info>s B<image_io> data pointer is filled 
    155 with an object having B<vtable> methods that remarkably look like a PMCs 
     155with an object having B<vtable> function that remarkably look like a PMCs 
    156156vtable. So B<io-E<gt>vtable-E<gt>push_integer> spits out an INTVAL to the 
    157157frozen B<image>, while B<shift_integer> gets an INTVAL from the frozen stream. 
    158158 
  • docs/dev/pmc_obj_design_meeting_notes.pod

     
    6060statically calls the method in the current class. 
    6161 
    6262B<Recommendation>: Throughout the source, rename SELF to STATIC_SELF, and 
    63 rename DYNSELF to SELF. Additionally, direct access to VTABLE methods should 
     63rename DYNSELF to SELF. Additionally, direct access to VTABLE functions should 
    6464be reviewed, and SELF should be used where possible to increase clarity and 
    6565maintainability (this is a good CAGE task.) Also, this should become a coding 
    6666standard for PMCs. 
  • docs/dev/pccmethods.pod

     
    1010A C<PCCMETHOD> is a PMC method that follows Parrot Calling Conventions 
    1111(a.k.a. PCC). This allows PIR code to call PMC methods using slurpy, named, 
    1212and other types of arguments as specified in F<PDD03>. This offers flexibility 
    13 not found in a PMC C<METHOD> or a vtable method using C calling conventions. 
     13not found in a PMC C<METHOD> or a vtable function using C calling conventions. 
    1414 
    1515C<PCCINVOKE> is used to call a method using the Parrot Calling Conventions. 
    1616It uses the standard find_method/invoke approach that the callmethodcc opcode 
     
    113113 
    114114=head2 Performance 
    115115 
    116 When a C<METHOD> or vtable method is called, C<NCI> is used to map the 
     116When a C<METHOD> or vtable function is called, C<NCI> is used to map the 
    117117arguments held in the current Parrot_Context onto the C calling conventions. 
    118118That is, you still end up involving the Parrot Calling Conventions anyway, 
    119119so there is no reason to expect a C<PCCMETHOD> to be any slower. It may well 
  • lib/Parrot/Vtable.pm

     
    6767 
    6868  [ return_type method_name parameters section MMD_type attributes ] 
    6969 
    70 for each vtable method defined in C<$file>. If C<$file> is unspecified it 
     70for each vtable function defined in C<$file>. If C<$file> is unspecified it 
    7171defaults to F<src/vtable.tbl>.  If it is not an MMD method, C<MMD_type> is -1. 
    7272 
    7373=cut 
     
    209209 
    210210/* 
    211211 * vtable accessor macros 
    212  * as vtable methods might get moved around internally 
     212 * as vtable function might get moved around internally 
    213213 * these macros hide the details 
    214214 */ 
    215215 
     
    281281 
    282282=item C<vtbl_embed($vtable)> 
    283283 
    284 Returns the C function definitions to call the vtable methods on a PMC for the 
     284Returns the C function definitions to call the vtable function on a PMC for the 
    285285elements in the referenced vtable array. 
    286286 
    287287=cut 
  • lib/Parrot/Pmc2c/PMC/default.pm

     
    3232sub pre_method_gen { 
    3333    my ($self) = @_; 
    3434 
    35     # vtable methods 
     35    # vtable functions 
    3636    foreach my $method ( @{ $self->vtable->methods } ) { 
    3737        my $vt_method_name = $method->name; 
    3838        next unless $self->unimplemented_vtable($vt_method_name); 
  • lib/Parrot/Pmc2c/PMC/Object.pm

     
    2222Returns the C code for the method body. 
    2323 
    2424Overrides the default implementation to direct all unknown methods to 
    25 first check if there is an implementation of the vtable method in the 
    26 vtable methods hash of this class of any others, and delegates up to 
     25first check if there is an implementation of the vtable function in the 
     26vtable functions hash of this class of any others, and delegates up to 
    2727any PMCs in the MRO. 
    2828 
    2929=cut 
     
    3131sub pre_method_gen { 
    3232    my ($self) = @_; 
    3333 
    34     # vtable methods 
     34    # vtable functions 
    3535    foreach my $method ( @{ $self->vtable->methods } ) { 
    3636        my $vt_method_name = $method->name; 
    3737        next unless $self->normal_unimplemented_vtable($vt_method_name); 
     
    5656    Parrot_Class_attributes  * const _class    = PARROT_CLASS(obj->_class); 
    5757    STRING        * const meth_name = CONST_STRING_GEN(interp, "$vt_method_name"); 
    5858 
    59     /* Walk and search for the vtable method. */ 
     59    /* Walk and search for the vtable functions. */ 
    6060    const int num_classes = VTABLE_elements(interp, _class->all_parents); 
    6161    int i; 
    6262    for (i = 0; i < num_classes; i++) { 
     
    7676        unless ($self->vtable_method_does_multi($vt_method_name)) { 
    7777            $method_body_text .= <<"EOC"; 
    7878        if (cur_class->vtable->base_type == enum_class_PMCProxy) { 
    79             /* Get the PMC instance and call the vtable method on that. */ 
     79            /* Get the PMC instance and call the vtable function on that. */ 
    8080            STRING * const proxy      = CONST_STRING_GEN(interp, "proxy"); 
    8181            PMC    * const del_object = VTABLE_get_attr_str(interp, SELF, proxy); 
    8282 
  • lib/Parrot/Pmc2c/PMC/Null.pm

     
    2929sub pre_method_gen { 
    3030    my ($self) = @_; 
    3131 
    32     # vtable methods 
     32    # vtable functions 
    3333    foreach my $method ( @{ $self->vtable->methods } ) { 
    3434        my $vt_method_name = $method->name; 
    3535        next unless $self->normal_unimplemented_vtable($vt_method_name); 
  • lib/Parrot/Pmc2c/PMC/ParrotClass.pm

     
    6666sub pre_method_gen { 
    6767    my ($self) = @_; 
    6868 
    69     # vtable methods 
     69    # vtable functions 
    7070    foreach my $method ( @{ $self->vtable->methods } ) { 
    7171        my $vt_method_name = $method->name; 
    7272        next if exists $dont_delegate->{$vt_method_name}; 
  • lib/Parrot/Pmc2c/Object.pm

     
    3737generating. 
    3838 
    3939Overrides the default implementation to direct all unknown methods to 
    40 first check if there is an implementation of the vtable method in the 
    41 vtable methods hash of this class of any others, and delegates up to 
     40first check if there is an implementation of the vtable function in the 
     41vtable functions hash of this class of any others, and delegates up to 
    4242any PMCs in the MRO. 
    4343 
    4444=back 
  • lib/Parrot/Pmc2c/PMCEmitter.pm

     
    167167    my $name    = $self->name; 
    168168    my $lc_name = $self->name; 
    169169 
    170     # generate decls for all vtable methods in this PMC 
     170    # generate decls for all vtable functions in this PMC 
    171171    foreach my $vt_method_name ( @{ $self->vtable->names } ) { 
    172172        if ( $self->implements_vtable($vt_method_name) ) { 
    173173            $hout .= 
     
    322322sub gen_methods { 
    323323    my ($self) = @_; 
    324324 
    325     # vtable methods 
     325    # vtable functions 
    326326    foreach my $method ( @{ $self->vtable->methods } ) { 
    327327        my $vt_method_name = $method->name; 
    328328        next if $vt_method_name eq 'class_init'; 
     
    10281028        push @{ $multi_methods{ $name } }, [ $sig[1], $ssig, $fsig, $ns, $func, $method ]; 
    10291029    } 
    10301030 
    1031     # vtable methods 
     1031    # vtable functions 
    10321032    foreach my $method ( @{ $self->vtable->methods } ) { 
    10331033        my $vt_method_name = $method->name; 
    10341034        next if $vt_method_name eq 'class_init'; 
  • lib/Parrot/Pmc2c/MethodEmitter.pm

     
    215215=item C<rewrite_vtable_method($self, $pmc, $super, $super_table)> 
    216216 
    217217Rewrites the method body performing the various macro substitutions for 
    218 vtable method bodies (see F<tools/build/pmc2c.pl>). 
     218vtable function bodies (see F<tools/build/pmc2c.pl>). 
    219219 
    220220=cut 
    221221 
  • lib/Parrot/Pmc2c/PMC.pm

     
    132132 
    133133=item C<implements_vtable($method)> 
    134134 
    135 True if pmc generates code for vtable method C<$method>. 
     135True if pmc generates code for vtable function C<$method>. 
    136136 
    137137=cut 
    138138 
     
    321321 
    322322=item C<vtable_method_does_write($method)> 
    323323 
    324 Returns true if the vtable method C<$method> writes our value. 
     324Returns true if the vtable function C<$method> writes our value. 
    325325 
    326326=back 
    327327 
  • lib/Parrot/Pmc2c/Parser.pm

     
    279279        } 
    280280        else { 
    281281 
    282             # Name-mangle NCI and multi methods to avoid conflict with vtable methods. 
     282            # Name-mangle NCI and multi methods to avoid conflict with vtable functions. 
    283283            if ( $marker) { 
    284284                if ( $marker =~ /MULTI/ ) { 
    285285                    $method->type(Parrot::Pmc2c::Method::MULTI); 
  • compilers/pct/src/POST/Node.pir

     
    8282.end 
    8383 
    8484 
    85 =item get_string()   # vtable method 
     85=item get_string()   # vtable function 
    8686 
    8787Returns the result of the current node as a string. 
    8888 
  • compilers/pirc/src/pircompunit.c

     
    184184set_sub_vtable(lexer_state * const lexer, char const * vtablename)> 
    185185 
    186186Set the :vtable() flag argument to the current subroutine. If C<vtablename> 
    187 is NULL, the name of the current sub is taken to be the vtable method name. 
    188 If the vtable method name (either specified or the current sub's name) is 
    189 in fact not a vtable method, an error message is emitted. 
     187is NULL, the name of the current sub is taken to be the vtable function name. 
     188If the vtable function name (either specified or the current sub's name) is 
     189in fact not a vtable function, an error message is emitted. 
    190190 
    191191=cut 
    192192 
     
    198198    if (vtablename == NULL)  /* the sub's name I<is> the vtablename */ 
    199199        vtablename = CURRENT_SUB(lexer)->info.subname; 
    200200 
    201     /* get the index number of this vtable method */ 
     201    /* get the index number of this vtable function */ 
    202202    vtable_index = Parrot_get_vtable_index(lexer->interp, 
    203203                                           Parrot_str_new(lexer->interp, vtablename, 
    204204                                                               strlen(vtablename))); 
    205205 
    206     /* now check whether the method name actually a vtable method */ 
     206    /* now check whether the method name actually a vtable function */ 
    207207    if (vtable_index == -1) 
    208208        yypirerror(lexer->yyscanner, lexer, 
    209209                   "'%s' is not a vtable method but was used with :vtable flag", vtablename); 
  • compilers/pirc/src/pircompunit.h

     
    8484    PIRC_SUB_FLAG_METHOD     = 1 << 10, /* the sub is a method */ 
    8585    PIRC_SUB_FLAG_HAS_OUTER  = 1 << 11, /* the sub is lexically nested */ 
    8686    PIRC_SUB_FLAG_IS_OUTER   = 1 << 12, /* the sub contains lexically nested subs. */ 
    87     PIRC_SUB_FLAG_VTABLE     = 1 << 13, /* this sub overrides a vtable method */ 
     87    PIRC_SUB_FLAG_VTABLE     = 1 << 13, /* this sub overrides a vtable function */ 
    8888    PIRC_SUB_FLAG_LEX        = 1 << 14, /* this sub needs a LexPad */ 
    8989    PIRC_SUB_FLAG_MULTI      = 1 << 15, /* this sub is a multi method/sub */ 
    9090    PIRC_SUB_FLAG_SUBID      = 1 << 16, /* this sub has a namespace-unaware identifier */ 
  • t/pmc/pmcproxy.t

     
    144144    addparent $P0, $P1 
    145145    ok(1, "added Class's PMCProxy as a parent of the PDD15 class") 
    146146 
    147     #We will override the add_role vtable method. 
     147    #We will override the add_role vtable function. 
    148148    $P2 = get_global 'no_add_role' 
    149149    $P0.'add_vtable_override'('add_role', $P2) 
    150150    ok(1, 'overrode a vtable method') 
     
    178178    addparent $P0, $P1 
    179179    ok(1, "added Class's PMCProxy as a parent of the PDD15 class") 
    180180 
    181     #We will override the inspect_str vtable method. 
     181    #We will override the inspect_str vtable function. 
    182182    $P2 = get_global 'always42' 
    183183    $P0.'add_vtable_override'('inspect_str', $P2) 
    184184    ok(1, 'overrode inspect_str method') 
  • t/pmc/exception-old.t

     
    359359/Mark 500 not found/ 
    360360OUTPUT 
    361361 
    362 # stringification is handled by a vtable method, which runs in a second 
     362# stringification is handled by a vtable function, which runs in a second 
    363363# runloop. when an error in the method tries to go to a Error_Handler defined 
    364364# outside it, it winds up going to the inner runloop, giving strange results. 
    365365pir_output_is( <<'CODE', <<'OUTPUT', 'pop_eh out of context (2)', todo => 'runloop shenanigans' ); 
  • t/dynpmc/rotest.t

     
    4949    my %tests = ( 
    5050 
    5151        # these first two tests would test overriding of the default 
    52         # read-onlyness notion of vtable methods 
     52        # read-onlyness notion of vtable functions 
    5353        q{value = 42}  => [ 1, 0 ], 
    5454        q{$I0 = value} => [ 0, 0 ], 
    5555 
  • t/op/exceptions.t

     
    378378done. 
    379379OUTPUT 
    380380 
    381 # stringification is handled by a vtable method, which runs in a second 
     381# stringification is handled by a vtable function, which runs in a second 
    382382# runloop. when an error in the method tries to go to a Error_Handler defined 
    383383# outside it, it winds up going to the inner runloop, giving strange results. 
    384384pir_output_is( <<'CODE', <<'OUTPUT', 'pop_eh out of context (2)', todo => 'runloop shenanigans' ); 
  • examples/tutorial/56_defined.pir

     
    2626=pod 
    2727 
    2828Most PMC's, but not all, should return true for C<defined>.  It all 
    29 depends on how the PMC implements its vtable method for C<defined>. 
     29depends on how the PMC implements its vtable function for C<defined>. 
    3030For example the C<Undef> PMC always returns false (0) for C<defined>. 
    3131 
    3232=cut