From: Nicholas Clark Date: Sun, 6 Apr 2008 19:32:03 +0000 (+0000) Subject: Add attempting Exterminate! cop_label to perltodo. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=439cad7f0af0ff91bdf31605de1593fa2b4842c3;p=p5sagit%2Fp5-mst-13.2.git Add attempting Exterminate! cop_label to perltodo. p4raw-id: //depot/perl@33652 --- diff --git a/pod/perltodo.pod b/pod/perltodo.pod index 227fd6b..35ee02a 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -720,6 +720,28 @@ also the warning messages (see L, C). These tasks would need C knowledge, and knowledge of how the interpreter works, or a willingness to learn. +=head2 Abolish cop_label? + +C contains + + char * cop_label; /* label for this construct */ + +Most statements don't have labels. It might be possible to eliminate this +member and instead store the label, if present, in + + struct refcounted_he * cop_hints_hash; + +(with a hint bit, similar to + + #define HINT_ARYBASE 0x00000010 /* $[ is non-zero */ + #define HINT_LEXICAL_IO_IN 0x00040000 /* ${^OPEN} is set for input */ + #define HINT_LEXICAL_IO_OUT 0x00080000 /* ${^OPEN} is set for output */ + +). The trick would be ensuring that this faked lexical hint doesn't get +propagated to nested scopes. It might be as simple as moving the setting of +"cop_label" in C after the code to set up +Ccop_hints_hash>. + =head2 lexicals used only once This warns: