summaryrefslogtreecommitdiff
path: root/regen/opcodes
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-11-08 12:54:37 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-11-08 16:06:43 -0800
commit6575cde09f3b8f22b60ff3c736fc7fba3ee0ef00 (patch)
tree0f5351120eec8a31f034e9527db948e48b9a35e8 /regen/opcodes
parent26812b4a900f5f8ec634ef9bb566822cb2b43975 (diff)
downloadperl-6575cde09f3b8f22b60ff3c736fc7fba3ee0ef00.tar.gz
tied is OA_DANGEROUS
OA_DANGEROUS indicates that temporary copies may need to be made in list assignment, to handle things like: ($a, $b) = ($b, $a); In other words, an op type is flagged with OA_DANGEROUS if its return values could occur elsewhere on the stack. tied returns the same scalar that the tied variables uses to hold a reference to the object (so weaken(tied(...)) works). tie uses the very scalar that TIESCALAR (or TIEWHATEVER) returns and attaches it to the tied variable by magic. That returned scalar could be referenced elsewhere. That means ($a, $b) = ($c, tied $d) could have common vars on either side, if the tie constructor for $d happened to return $a or $b. (Normally it would have to be an XSUB or an lvalue sub for its return value not to have been copied.)
Diffstat (limited to 'regen/opcodes')
-rw-r--r--regen/opcodes2
1 files changed, 1 insertions, 1 deletions
diff --git a/regen/opcodes b/regen/opcodes
index 7105c7f6eb..24a4aa8af7 100644
--- a/regen/opcodes
+++ b/regen/opcodes
@@ -328,7 +328,7 @@ binmode binmode ck_fun s@ F S?
tie tie ck_fun idms@ R S L
untie untie ck_fun is% R
-tied tied ck_fun s% R
+tied tied ck_fun ds% R
dbmopen dbmopen ck_fun is@ H S S
dbmclose dbmclose ck_fun is% H