Ticket #487: replace-vtable-method-stage1.patch
File replace-vtable-method-stage1.patch, 6.5 KB (added by Aninhumer, 12 years ago) |
---|
-
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/pmc/documentation.pod
36 36 F<docs/pdds/pdd21_namespaces.pod>. 37 37 38 38 Exporter is not derived from any other PMC, and does not provide any 39 standard interface--its interface consists solely of non-vtablemethods.39 standard interface--its interface consists solely of methods. 40 40 41 41 The B<DESCRIPTION> section is further broken down as follows: 42 42 -
src/pmc/exporter.pmc
49 49 F<docs/pdds/pdd21_namespaces.pod>. 50 50 51 51 Exporter is not derived from any other PMC, and does not provide any 52 vtable interface--its interface consists solely of non-vtablemethods.52 vtable interface--its interface consists solely of methods. 53 53 54 54 =head2 Structure 55 55 -
docs/pdds/draft/pdd06_pasm.pod
172 172 where register_type is 0x100, 0x200, 0x400, or 0x800 for PMC, string, integer, 173 173 or number respectively. So N19 would be 0x413. 174 174 175 B<Note>: Instructions tagged with a * will call a vtable method to handle the176 instruction if used on PMC registers.175 B<Note>: Instructions tagged with a * will call a vtable function to handle 176 the instruction if used on PMC registers. 177 177 178 178 In all cases, the letters x, y, and z refer to register numbers. The letter t 179 179 refers to a generic register (P, S, I, or N). A lowercase p, s, i, or n means … … 244 244 245 245 $foo = $bar; 246 246 247 X's assign vtable methodis invoked and it does whatever is appropriate.247 X's assign vtable function is invoked and it does whatever is appropriate. 248 248 249 249 =item clone Px, Py 250 250 -
docs/pdds/draft/pdd10_embedding.pod
74 74 75 75 =back 76 76 77 =item * probably includes vtable methods on PMCs77 =item * probably includes vtable functions on PMCs 78 78 79 79 =back 80 80 -
docs/pdds/pdd09_gc.pod
421 421 =item C<void (*finalize_gc_system) (Interp *)> 422 422 423 423 Called during interpreter destruction. Free used resources and memory pools. 424 All PMCs must be swept, and PMCs with custom destroy VTABLE methods must have425 those called.424 All PMCs must be swept, and PMCs with custom destroy VTABLE functions must 425 have those called. 426 426 427 427 =item C<void (*init_pool) (Interp *, Fixed_Size_Pool *)> 428 428 … … 563 563 The C<mark> vtable slot will be called during the GC mark phase. The mark 564 564 function must call C<Parrot_gc_mark_PObj_alive> for all non-NULL objects 565 565 (Buffers and PMCs) that PMC refers to. This flag is typically tested and the 566 custom mark VTABLE methodcalled from C<src/gc/api.c:mark_special>.566 custom mark VTABLE function called from C<src/gc/api.c:mark_special>. 567 567 568 568 =item PObj_external_FLAG 569 569 -
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 might153 start running pasm code.)152 difficult to call existing vtable functions (since you never know when they 153 might start running pasm code.) 154 154 155 155 =head2 Variant 5: generation stack 156 156 -
docs/pdds/pdd17_pmc.pod
1636 1636 1637 1637 Note that assigning to the reference PMC will be equivalent to a keyed set on 1638 1638 the referenced aggregate PMC - that is, it modifies the element rather than 1639 doing a v -table call on the element itself. It is important to be aware of1639 doing a vtable call on the element itself. It is important to be aware of 1640 1640 this when assigning a PMC through this reference; it is not the same behaviour 1641 1641 as the Ref PMC. 1642 1642 … … 1649 1649 A weak register reference can only be created by the C<register_ref> opcode. 1650 1650 Any assignment to the register will behave like a set instruction. That is, 1651 1651 when assigning a PMC using a WeakRegisterRef PMC, the register will be updated 1652 to reference that PMC rather than calling the assign v -table call on the PMC1652 to reference that PMC rather than calling the assign vtable call on the PMC 1653 1653 in that register. This is not the same behaviour as the Ref PMC. 1654 1654 1655 1655 =item Exception