Change 33652 by [EMAIL PROTECTED] on 2008/04/06 19:32:03

        Add attempting Exterminate! cop_label to perltodo.

Affected files ...

... //depot/perl/pod/perltodo.pod#216 edit

Differences ...

==== //depot/perl/pod/perltodo.pod#216 (text) ====
Index: perl/pod/perltodo.pod
--- perl/pod/perltodo.pod#215~33566~    2008-03-25 09:23:46.000000000 -0700
+++ perl/pod/perltodo.pod       2008-04-06 12:32:03.000000000 -0700
@@ -720,6 +720,28 @@
 These tasks would need C knowledge, and knowledge of how the interpreter works,
 or a willingness to learn.
 
+=head2 Abolish cop_label?
+
+C<struct cop> 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<Perl_newSTATEOP> after the code to set up
+C<cop->cop_hints_hash>.
+
 =head2 lexicals used only once
 
 This warns:
End of Patch.

Reply via email to