summaryrefslogtreecommitdiff
path: root/pod/perltodo.pod
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-04-06 19:32:03 +0000
committerNicholas Clark <nick@ccl4.org>2008-04-06 19:32:03 +0000
commit439cad7f0af0ff91bdf31605de1593fa2b4842c3 (patch)
tree06f25daeb59bc72fe6a3e3a22d284288d9657600 /pod/perltodo.pod
parentf126b98bb2f44e908254b68f6e0b22c259cd058e (diff)
downloadperl-439cad7f0af0ff91bdf31605de1593fa2b4842c3.tar.gz
Add attempting Exterminate! cop_label to perltodo.
p4raw-id: //depot/perl@33652
Diffstat (limited to 'pod/perltodo.pod')
-rw-r--r--pod/perltodo.pod22
1 files changed, 22 insertions, 0 deletions
diff --git a/pod/perltodo.pod b/pod/perltodo.pod
index 227fd6bcb1..35ee02a99c 100644
--- a/pod/perltodo.pod
+++ b/pod/perltodo.pod
@@ -720,6 +720,28 @@ also the warning messages (see L<perllexwarn>, C<warnings.pl>).
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: