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) |
---|
-
runtime/parrot/library/HTTP/Daemon.pir
209 209 210 210 =item __get_bool() 211 211 212 Vtable method, called from the C<if> or C<unless> opcode. Returns212 Vtable function, called from the C<if> or C<unless> opcode. Returns 213 213 true, if the daemon object is listening on a socket, that is if the 214 214 initialization went ok. 215 215 -
runtime/parrot/library/Getopt/Obj.pir
357 357 358 358 =item C<push_string(STRING format)> 359 359 360 A vtable method, invoked by e.g. C<push getopts, "foo|f=s">. The format is as such.360 A vtable function, invoked by e.g. C<push getopts, "foo|f=s">. The format is as such. 361 361 362 362 =over 4 363 363 -
runtime/parrot/library/P6object.pir
727 727 728 728 =over 4 729 729 730 =item get_string() (vtable method)730 =item get_string() (vtable function) 731 731 732 732 Returns the "shortname" of the protoobject's class and parens. 733 733 … … 743 743 .return ($S0) 744 744 .end 745 745 746 =item defined() (vtable method)746 =item defined() (vtable function) 747 747 748 748 Protoobjects are always treated as being undefined. 749 749 … … 754 754 .end 755 755 756 756 757 =item name() (vtable method)757 =item name() (vtable function) 758 758 759 759 Have protoobjects return their longname in response to a 760 760 C<typeof_s_p> opcode. -
src/byteorder.c
10 10 11 11 These are assigned to a vtable when the PBC file is loaded. 12 12 13 If the vtable methodfor conversion from the native byteorder is called,13 If the vtable function for conversion from the native byteorder is called, 14 14 it is a I<no op> and will work, but the caller should know if the 15 15 byteorder in the PBC file is native and skip the conversion and just map 16 16 it in. -
src/oo.c
130 130 } 131 131 } 132 132 133 /* Import any vtable methods. */133 /* Import any vtable functions. */ 134 134 Parrot_pcc_invoke_method_from_c_args(interp, ns, CONST_STRING(interp, "get_associated_vtable_methods"), "->P", &vtable_overrides); 135 135 136 136 if (!PMC_IS_NULL(vtable_overrides)) { … … 500 500 VTABLE_get_pmc_keyed_str(interp, _class->parent_overrides, name); 501 501 502 502 if (PMC_IS_NULL(result)) { 503 /* Walk and search for the vtable method. */503 /* Walk and search for the vtable function. */ 504 504 const INTVAL num_classes = VTABLE_elements(interp, _class->all_parents); 505 505 INTVAL i; 506 506 -
src/pmc/role.pmc
750 750 METHOD inspect(STRING *what :optional, int got_what :opt_flag) { 751 751 PMC *found; 752 752 753 /* Just delegate to the appropriate vtable method. */753 /* Just delegate to the appropriate vtable function. */ 754 754 if (got_what) 755 755 found = VTABLE_inspect_str(interp, SELF, what); 756 756 else -
src/pmc/class.pmc
62 62 63 63 =item C<vtable_overrides> 64 64 65 A directory of vtable method names and methodbodies this class overrides.65 A directory of vtable function names and function bodies this class overrides. 66 66 An empty Hash PMC is allocated during initialization. 67 67 68 68 =item C<attrib_metadata> … … 767 767 EXCEPTION_METHOD_NOT_FOUND, 768 768 "'%S' is not a valid vtable function name.", name); 769 769 770 /* Add it to vtable methods list. */770 /* Add it to vtable functions list. */ 771 771 VTABLE_set_pmc_keyed_str(interp, _class->vtable_overrides, name, sub); 772 772 } 773 773 … … 1714 1714 =item C<void add_method(STRING *name, PMC *sub)> 1715 1715 1716 1716 Adds the given sub PMC as a method with the given name. Delegates to the 1717 C<add_method> vtable method.1717 C<add_method> vtable function. 1718 1718 1719 1719 =cut 1720 1720 … … 1728 1728 =item C<void add_vtable_override(STRING *name, PMC *sub)> 1729 1729 1730 1730 Adds the given sub PMC as a vtable override with the given name. Delegates to 1731 the C<add_vtable_override> vtable method.1731 the C<add_vtable_override> vtable function. 1732 1732 1733 1733 =cut 1734 1734 … … 1883 1883 METHOD inspect(STRING *what :optional, int has_what :opt_flag) { 1884 1884 PMC *found; 1885 1885 1886 /* Just delegate to the appropriate vtable method. */1886 /* Just delegate to the appropriate vtable function. */ 1887 1887 if (has_what) 1888 1888 found = SELF.inspect_str(what); 1889 1889 else -
src/pmc/object.pmc
430 430 Parrot_Class_attributes * const _class = PARROT_CLASS(obj->_class); 431 431 STRING * const meth_name = CONST_STRING(interp, "get_integer"); 432 432 433 /* Walk and search for the vtable method. */433 /* Walk and search for the vtable function. */ 434 434 const int num_classes = VTABLE_elements(interp, _class->all_parents); 435 435 int i; 436 436 for (i = 0; i < num_classes; i++) { … … 447 447 } 448 448 /* method name is get_integer */ 449 449 if (cur_class->vtable->base_type == enum_class_PMCProxy) { 450 /* Get the PMC instance and call the vtable methodon that. */450 /* Get the PMC instance and call the vtable function on that. */ 451 451 STRING * const proxy = CONST_STRING(interp, "proxy"); 452 452 PMC * const del_object = VTABLE_get_attr_str(interp, pmc, proxy); 453 453 … … 643 643 Parrot_Object_attributes * const obj = PARROT_OBJECT(pmc); 644 644 Parrot_Class_attributes * const _class = PARROT_CLASS(obj->_class); 645 645 646 /* Walk and search for the vtable method. */646 /* Walk and search for the vtable function. */ 647 647 const int num_classes = VTABLE_elements(interp, _class->all_parents); 648 648 int i; 649 649 … … 669 669 } 670 670 671 671 if (cur_class->vtable->base_type == enum_class_PMCProxy) { 672 /* Get the PMC instance and call the vtable methodon that. */672 /* Get the PMC instance and call the vtable function on that. */ 673 673 PMC * const del_object = 674 674 VTABLE_get_attr_keyed(interp, pmc, cur_class, proxy); 675 675 -
src/pmc/multisub.pmc
79 79 80 80 /* I don't really know how to implement these if they need something 81 81 special, so I'll sort the sub list and defer processing to the 82 ResizablePMCArray's VTABLE methods of the same names. Hopefully we82 ResizablePMCArray's VTABLE functions of the same names. Hopefully we 83 83 don't need anything beyond that. */ 84 84 VTABLE PMC *get_pmc_keyed(PMC *key) { 85 85 PMC * const sig_obj = CONTEXT(interp)->current_sig; -
src/pmc/namespace.pmc
68 68 /* Otherwise, store it in the namespace for the class to 69 69 * retrieve later */ 70 70 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. */ 72 72 if (PMC_IS_NULL(vtable)) 73 73 nsinfo->vtable = vtable = pmc_new(interp, enum_class_Hash); 74 74 … … 984 984 985 985 =item C<METHOD get_associated_vtable_methods()> 986 986 987 Gets the Hash of vtable methods associated with this namespace and removes it987 Gets the Hash of vtable functions associated with this namespace and removes it 988 988 from the namespace. 989 989 990 990 =cut -
src/pmc/pmcproxy.pmc
457 457 458 458 */ 459 459 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. */ 461 461 PMC * const found = 462 462 got_what 463 463 ? VTABLE_inspect_str(interp, SELF, what) -
src/pmc/arrayiterator.pmc
40 40 41 41 NB: for different direction you have to use different ops! 42 42 43 TODO: Discuss idea of having separate get_iter/get_reverse_iter VTABLE methods43 TODO: Discuss idea of having separate get_iter/get_reverse_iter VTABLE functions 44 44 to avoid this caveat. 45 45 46 46 =head1 Methods -
src/io/api.c
905 905 906 906 =item C<PIOOFF_T Parrot_io_make_offset_pmc(PARROT_INTERP, PMC *pmc)> 907 907 908 Returns the return value of the C<get_integer> vtable methodon C<*pmc>.908 Returns the return value of the C<get_integer> vtable function on C<*pmc>. 909 909 910 910 =cut 911 911 -
docs/pmc2c.pod
133 133 134 134 =item 3. 135 135 136 A list of vtable methodimplementations136 A list of vtable function implementations 137 137 138 138 =item 4. 139 139 … … 143 143 144 144 =head2 Method Body Substitutions 145 145 146 The vtable methodbodies can use the following substitutions:146 The vtable function bodies can use the following substitutions: 147 147 148 148 =over 4 149 149 … … 157 157 158 158 =item C<OtherClass.SELF.method(a,b,c)> 159 159 160 Calls the static vtable method'method' in C<OtherClass>.160 Calls the static vtable function 'method' in C<OtherClass>. 161 161 162 162 =item C<SELF.method(a,b,c)> 163 163 164 Calls the vtable method'method' using the dynamic type of C<SELF>.164 Calls the vtable functions 'method' using the dynamic type of C<SELF>. 165 165 166 166 =item C<SELF(a,b,c)> 167 167 … … 169 169 170 170 =item C<STATICSELF.method(a,b,c)> 171 171 172 Calls the vtable method'method' using the static type of C<SELF> (in172 Calls the vtable function 'method' using the static type of C<SELF> (in 173 173 other words, calls another method defined in the same file). 174 174 175 175 =item C<OtherClass.SUPER(a,b,c)> -
docs/book/draft/ch07_dynpmcs.pod
195 195 =head3 VTABLE Functions Parameters 196 196 197 197 VTABLE functions are defined just like ordinary C functions, almost. Here's 198 a normal definition for a VTABLE method:198 a normal definition for a VTABLE function: 199 199 200 200 VTABLE VTABLENAME (PARAMETERS) { 201 201 /* ordinary C here, almost */ -
docs/book/draft/chXX_hlls.pod
211 211 212 212 =over 4 213 213 214 =item * VTable methods214 =item * VTable functions 215 215 216 VTable methods are the standard interface for PMC data types, and all PMCs216 VTable functions are the standard interface for PMC data types, and all PMCs 217 217 have them. If the PMCs were written properly to satisfy this interface 218 218 all the necessary information from those PMCs. Operate on the PMCs at the 219 219 VTable level, and we can safely ignore the implementation details of them. -
docs/dev/infant.pod
142 142 + Fast mark phase (GC already manipulates the flags) 143 143 - Generation count must be maintained 144 144 - Disallows recursive opcode calls (necessary for eg implementing 145 vtable methods in pasm)145 vtable functions in pasm) 146 146 - Can temporarily use more memory (dead objects accumulate during the 147 147 current generation) 148 148 149 149 In order to allow recursive opcode calls, we could increment the generation 150 150 count in more places and make sure nothing is left unanchored at those points, 151 151 but 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 might152 difficult to call existing vtable functions (since you never know when they might 153 153 start running pasm code.) 154 154 155 155 =head2 Variant 5: generation stack -
docs/dev/pmc_freeze.pod
79 79 =head2 The visit_info structure 80 80 81 81 This structure holds all necessary information and function pointers specific 82 to the desired functionality. It gets passed on to all vtable methods and82 to the desired functionality. It gets passed on to all vtable functions and 83 83 callback functions. 84 84 85 85 =head2 Working loop … … 99 99 This is done by a callback function inside the B<visit_info> structure called 100 100 B<visit_pmc_now>. It gets called initially to put the first item on the list 101 101 and is called thereafter from all PMCs for contained PMCs inside the B<visit> 102 vtable method.102 vtable functions. 103 103 104 104 105 105 =head2 The visit() vtable … … 140 140 141 141 So after all we finally arrived at the point to actually perform the desired 142 142 functionality. First the PMC-specific part is done inside F<pmc_freeze.c> then 143 the specific vtable methodB<freeze>, B<thaw>, whatever, is called, again via a143 the specific vtable function B<freeze>, B<thaw>, whatever, is called, again via a 144 144 function pointer called B<visit_action>. 145 145 146 146 =head1 Freeze and thaw 147 147 148 148 As 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 to149 done by calling the PMCs vtable function. This parts could of course be moved to 150 150 F<default.pmc> too, so that it's simpler to override the functionality. 151 151 152 152 =head2 Serializer interface 153 153 154 154 During initialization the B<visit_info>s B<image_io> data pointer is filled 155 with an object having B<vtable> methodsthat remarkably look like a PMCs155 with an object having B<vtable> function that remarkably look like a PMCs 156 156 vtable. So B<io-E<gt>vtable-E<gt>push_integer> spits out an INTVAL to the 157 157 frozen B<image>, while B<shift_integer> gets an INTVAL from the frozen stream. 158 158 -
docs/dev/pmc_obj_design_meeting_notes.pod
60 60 statically calls the method in the current class. 61 61 62 62 B<Recommendation>: Throughout the source, rename SELF to STATIC_SELF, and 63 rename DYNSELF to SELF. Additionally, direct access to VTABLE methods should63 rename DYNSELF to SELF. Additionally, direct access to VTABLE functions should 64 64 be reviewed, and SELF should be used where possible to increase clarity and 65 65 maintainability (this is a good CAGE task.) Also, this should become a coding 66 66 standard for PMCs. -
docs/dev/pccmethods.pod
10 10 A C<PCCMETHOD> is a PMC method that follows Parrot Calling Conventions 11 11 (a.k.a. PCC). This allows PIR code to call PMC methods using slurpy, named, 12 12 and other types of arguments as specified in F<PDD03>. This offers flexibility 13 not found in a PMC C<METHOD> or a vtable methodusing C calling conventions.13 not found in a PMC C<METHOD> or a vtable function using C calling conventions. 14 14 15 15 C<PCCINVOKE> is used to call a method using the Parrot Calling Conventions. 16 16 It uses the standard find_method/invoke approach that the callmethodcc opcode … … 113 113 114 114 =head2 Performance 115 115 116 When a C<METHOD> or vtable methodis called, C<NCI> is used to map the116 When a C<METHOD> or vtable function is called, C<NCI> is used to map the 117 117 arguments held in the current Parrot_Context onto the C calling conventions. 118 118 That is, you still end up involving the Parrot Calling Conventions anyway, 119 119 so there is no reason to expect a C<PCCMETHOD> to be any slower. It may well -
lib/Parrot/Vtable.pm
67 67 68 68 [ return_type method_name parameters section MMD_type attributes ] 69 69 70 for each vtable methoddefined in C<$file>. If C<$file> is unspecified it70 for each vtable function defined in C<$file>. If C<$file> is unspecified it 71 71 defaults to F<src/vtable.tbl>. If it is not an MMD method, C<MMD_type> is -1. 72 72 73 73 =cut … … 209 209 210 210 /* 211 211 * vtable accessor macros 212 * as vtable methodsmight get moved around internally212 * as vtable function might get moved around internally 213 213 * these macros hide the details 214 214 */ 215 215 … … 281 281 282 282 =item C<vtbl_embed($vtable)> 283 283 284 Returns the C function definitions to call the vtable methodson a PMC for the284 Returns the C function definitions to call the vtable function on a PMC for the 285 285 elements in the referenced vtable array. 286 286 287 287 =cut -
lib/Parrot/Pmc2c/PMC/default.pm
32 32 sub pre_method_gen { 33 33 my ($self) = @_; 34 34 35 # vtable methods35 # vtable functions 36 36 foreach my $method ( @{ $self->vtable->methods } ) { 37 37 my $vt_method_name = $method->name; 38 38 next unless $self->unimplemented_vtable($vt_method_name); -
lib/Parrot/Pmc2c/PMC/Object.pm
22 22 Returns the C code for the method body. 23 23 24 24 Overrides the default implementation to direct all unknown methods to 25 first check if there is an implementation of the vtable methodin the26 vtable methods hash of this class of any others, and delegates up to25 first check if there is an implementation of the vtable function in the 26 vtable functions hash of this class of any others, and delegates up to 27 27 any PMCs in the MRO. 28 28 29 29 =cut … … 31 31 sub pre_method_gen { 32 32 my ($self) = @_; 33 33 34 # vtable methods34 # vtable functions 35 35 foreach my $method ( @{ $self->vtable->methods } ) { 36 36 my $vt_method_name = $method->name; 37 37 next unless $self->normal_unimplemented_vtable($vt_method_name); … … 56 56 Parrot_Class_attributes * const _class = PARROT_CLASS(obj->_class); 57 57 STRING * const meth_name = CONST_STRING_GEN(interp, "$vt_method_name"); 58 58 59 /* Walk and search for the vtable method. */59 /* Walk and search for the vtable functions. */ 60 60 const int num_classes = VTABLE_elements(interp, _class->all_parents); 61 61 int i; 62 62 for (i = 0; i < num_classes; i++) { … … 76 76 unless ($self->vtable_method_does_multi($vt_method_name)) { 77 77 $method_body_text .= <<"EOC"; 78 78 if (cur_class->vtable->base_type == enum_class_PMCProxy) { 79 /* Get the PMC instance and call the vtable methodon that. */79 /* Get the PMC instance and call the vtable function on that. */ 80 80 STRING * const proxy = CONST_STRING_GEN(interp, "proxy"); 81 81 PMC * const del_object = VTABLE_get_attr_str(interp, SELF, proxy); 82 82 -
lib/Parrot/Pmc2c/PMC/Null.pm
29 29 sub pre_method_gen { 30 30 my ($self) = @_; 31 31 32 # vtable methods32 # vtable functions 33 33 foreach my $method ( @{ $self->vtable->methods } ) { 34 34 my $vt_method_name = $method->name; 35 35 next unless $self->normal_unimplemented_vtable($vt_method_name); -
lib/Parrot/Pmc2c/PMC/ParrotClass.pm
66 66 sub pre_method_gen { 67 67 my ($self) = @_; 68 68 69 # vtable methods69 # vtable functions 70 70 foreach my $method ( @{ $self->vtable->methods } ) { 71 71 my $vt_method_name = $method->name; 72 72 next if exists $dont_delegate->{$vt_method_name}; -
lib/Parrot/Pmc2c/Object.pm
37 37 generating. 38 38 39 39 Overrides the default implementation to direct all unknown methods to 40 first check if there is an implementation of the vtable methodin the41 vtable methods hash of this class of any others, and delegates up to40 first check if there is an implementation of the vtable function in the 41 vtable functions hash of this class of any others, and delegates up to 42 42 any PMCs in the MRO. 43 43 44 44 =back -
lib/Parrot/Pmc2c/PMCEmitter.pm
167 167 my $name = $self->name; 168 168 my $lc_name = $self->name; 169 169 170 # generate decls for all vtable methods in this PMC170 # generate decls for all vtable functions in this PMC 171 171 foreach my $vt_method_name ( @{ $self->vtable->names } ) { 172 172 if ( $self->implements_vtable($vt_method_name) ) { 173 173 $hout .= … … 322 322 sub gen_methods { 323 323 my ($self) = @_; 324 324 325 # vtable methods325 # vtable functions 326 326 foreach my $method ( @{ $self->vtable->methods } ) { 327 327 my $vt_method_name = $method->name; 328 328 next if $vt_method_name eq 'class_init'; … … 1028 1028 push @{ $multi_methods{ $name } }, [ $sig[1], $ssig, $fsig, $ns, $func, $method ]; 1029 1029 } 1030 1030 1031 # vtable methods1031 # vtable functions 1032 1032 foreach my $method ( @{ $self->vtable->methods } ) { 1033 1033 my $vt_method_name = $method->name; 1034 1034 next if $vt_method_name eq 'class_init'; -
lib/Parrot/Pmc2c/MethodEmitter.pm
215 215 =item C<rewrite_vtable_method($self, $pmc, $super, $super_table)> 216 216 217 217 Rewrites the method body performing the various macro substitutions for 218 vtable methodbodies (see F<tools/build/pmc2c.pl>).218 vtable function bodies (see F<tools/build/pmc2c.pl>). 219 219 220 220 =cut 221 221 -
lib/Parrot/Pmc2c/PMC.pm
132 132 133 133 =item C<implements_vtable($method)> 134 134 135 True if pmc generates code for vtable methodC<$method>.135 True if pmc generates code for vtable function C<$method>. 136 136 137 137 =cut 138 138 … … 321 321 322 322 =item C<vtable_method_does_write($method)> 323 323 324 Returns true if the vtable methodC<$method> writes our value.324 Returns true if the vtable function C<$method> writes our value. 325 325 326 326 =back 327 327 -
lib/Parrot/Pmc2c/Parser.pm
279 279 } 280 280 else { 281 281 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. 283 283 if ( $marker) { 284 284 if ( $marker =~ /MULTI/ ) { 285 285 $method->type(Parrot::Pmc2c::Method::MULTI); -
compilers/pct/src/POST/Node.pir
82 82 .end 83 83 84 84 85 =item get_string() # vtable method85 =item get_string() # vtable function 86 86 87 87 Returns the result of the current node as a string. 88 88 -
compilers/pirc/src/pircompunit.c
184 184 set_sub_vtable(lexer_state * const lexer, char const * vtablename)> 185 185 186 186 Set 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 methodname.188 If the vtable methodname (either specified or the current sub's name) is189 in fact not a vtable method, an error message is emitted.187 is NULL, the name of the current sub is taken to be the vtable function name. 188 If the vtable function name (either specified or the current sub's name) is 189 in fact not a vtable function, an error message is emitted. 190 190 191 191 =cut 192 192 … … 198 198 if (vtablename == NULL) /* the sub's name I<is> the vtablename */ 199 199 vtablename = CURRENT_SUB(lexer)->info.subname; 200 200 201 /* get the index number of this vtable method*/201 /* get the index number of this vtable function */ 202 202 vtable_index = Parrot_get_vtable_index(lexer->interp, 203 203 Parrot_str_new(lexer->interp, vtablename, 204 204 strlen(vtablename))); 205 205 206 /* now check whether the method name actually a vtable method*/206 /* now check whether the method name actually a vtable function */ 207 207 if (vtable_index == -1) 208 208 yypirerror(lexer->yyscanner, lexer, 209 209 "'%s' is not a vtable method but was used with :vtable flag", vtablename); -
compilers/pirc/src/pircompunit.h
84 84 PIRC_SUB_FLAG_METHOD = 1 << 10, /* the sub is a method */ 85 85 PIRC_SUB_FLAG_HAS_OUTER = 1 << 11, /* the sub is lexically nested */ 86 86 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 */ 88 88 PIRC_SUB_FLAG_LEX = 1 << 14, /* this sub needs a LexPad */ 89 89 PIRC_SUB_FLAG_MULTI = 1 << 15, /* this sub is a multi method/sub */ 90 90 PIRC_SUB_FLAG_SUBID = 1 << 16, /* this sub has a namespace-unaware identifier */ -
t/pmc/pmcproxy.t
144 144 addparent $P0, $P1 145 145 ok(1, "added Class's PMCProxy as a parent of the PDD15 class") 146 146 147 #We will override the add_role vtable method.147 #We will override the add_role vtable function. 148 148 $P2 = get_global 'no_add_role' 149 149 $P0.'add_vtable_override'('add_role', $P2) 150 150 ok(1, 'overrode a vtable method') … … 178 178 addparent $P0, $P1 179 179 ok(1, "added Class's PMCProxy as a parent of the PDD15 class") 180 180 181 #We will override the inspect_str vtable method.181 #We will override the inspect_str vtable function. 182 182 $P2 = get_global 'always42' 183 183 $P0.'add_vtable_override'('inspect_str', $P2) 184 184 ok(1, 'overrode inspect_str method') -
t/pmc/exception-old.t
359 359 /Mark 500 not found/ 360 360 OUTPUT 361 361 362 # stringification is handled by a vtable method, which runs in a second362 # stringification is handled by a vtable function, which runs in a second 363 363 # runloop. when an error in the method tries to go to a Error_Handler defined 364 364 # outside it, it winds up going to the inner runloop, giving strange results. 365 365 pir_output_is( <<'CODE', <<'OUTPUT', 'pop_eh out of context (2)', todo => 'runloop shenanigans' ); -
t/dynpmc/rotest.t
49 49 my %tests = ( 50 50 51 51 # these first two tests would test overriding of the default 52 # read-onlyness notion of vtable methods52 # read-onlyness notion of vtable functions 53 53 q{value = 42} => [ 1, 0 ], 54 54 q{$I0 = value} => [ 0, 0 ], 55 55 -
t/op/exceptions.t
378 378 done. 379 379 OUTPUT 380 380 381 # stringification is handled by a vtable method, which runs in a second381 # stringification is handled by a vtable function, which runs in a second 382 382 # runloop. when an error in the method tries to go to a Error_Handler defined 383 383 # outside it, it winds up going to the inner runloop, giving strange results. 384 384 pir_output_is( <<'CODE', <<'OUTPUT', 'pop_eh out of context (2)', todo => 'runloop shenanigans' ); -
examples/tutorial/56_defined.pir
26 26 =pod 27 27 28 28 Most PMC's, but not all, should return true for C<defined>. It all 29 depends on how the PMC implements its vtable methodfor C<defined>.29 depends on how the PMC implements its vtable function for C<defined>. 30 30 For example the C<Undef> PMC always returns false (0) for C<defined>. 31 31 32 32 =cut