summaryrefslogtreecommitdiff
path: root/opcode.h
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 /opcode.h
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 'opcode.h')
-rw-r--r--opcode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/opcode.h b/opcode.h
index a3af56c712..561ada1d03 100644
--- a/opcode.h
+++ b/opcode.h
@@ -1956,7 +1956,7 @@ EXTCONST U32 PL_opargs[] = {
0x00096404, /* binmode */
0x00217445, /* tie */
0x00007b04, /* untie */
- 0x00007b04, /* tied */
+ 0x00007b44, /* tied */
0x00114404, /* dbmopen */
0x00004b04, /* dbmclose */
0x01111408, /* sselect */