Am Montag, 4. September 2006 00:15 schrieb Jonathan Worthington: > Hi, > > As discussed at YAPC::Europe, here's my suggestions for two new core > PMCs to handle: > > * References to a particular element in an aggregate type > * References to a register
NB: typical usage for these besides dotnet: Tcl's upvar or P5 local lvalue refs (maybe). > The second of these needs an opcode to create it, which I have > proposed a name for. The first of them I'd *like* to have an opcode to > create for consistency, but we can do it by passing stuff to > parameters to the PMC initialization method I *think* (can we?). We can pass one additional PMC argument, which is handled by the C<init_pmc> vtable. .local pmc reg_ref, initializer ... reg_ref = new .WeakRegisterRef, initializer It's up to the PMC what the initializer actually is. > These are basically working in .Net and the plan is to move the > functionality into the core, as well as complete the safety stuff in > the Parrot core to really get the "weak reference" semantics when > referencing a register. > Jonathan leo