Author: kjs Date: Wed Aug 20 09:51:31 2008 New Revision: 30384 Modified: trunk/docs/pdds/pdd26_ast.pod
Log: [pdd26] add description for "register" scope + add missing ')' + mention :vtable subs have 'self' too (in attribute scope description). Modified: trunk/docs/pdds/pdd26_ast.pod ============================================================================== --- trunk/docs/pdds/pdd26_ast.pod (original) +++ trunk/docs/pdds/pdd26_ast.pod Wed Aug 20 09:51:31 2008 @@ -203,7 +203,21 @@ the attribute belongs. If this child is not present, the attribute is assumed to belong to the current invocant, indicated by the special variable C<self> (which is implicitly passed to all subs -that are flagged as a C<:method>. +that are flagged as a C<:method> or C<:vtable>). + +=item "register" + +Register variables are limited in scope to the C<PAST::Block> node +in which they are declared. This is different from the C<lexical> +scope, which I<includes> any nested C<PAST::Block> nodes. If the +node's C<isdecl> attribute is true, then this node defines a new +register variable within the current block. Register variables +are mapped to Parrot registers, and are useful for handling the +PIR pseudo-variable C<self> and storing intermediate results. +Names given to the C<name> attribute must conform to rules for +PIR identifiers. If no C<name> atribute is set, Parrot registers +are used. In this case, setting the C<isdecl> does not have any +effect. =back