<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/perl.git/pp.h, branch smoke-me/cpan</title>
<subtitle>github.com: perl/perl5.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/perl.git/'/>
<entry>
<title>Revert parts of c31c291..96b6b87</title>
<updated>2011-04-08T20:03:56+00:00</updated>
<author>
<name>Father Chrysostomos</name>
<email>sprout@cpan.org</email>
</author>
<published>2011-04-08T20:03:56+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/perl.git/commit/?id=096c060c3521cdedd801e684e4308ce9cee97019'/>
<id>096c060c3521cdedd801e684e4308ce9cee97019</id>
<content type='text'>
This restores the old definition of dPOPTOPiirl_nomg from
before 96b6b87 and the old definition of dPOPXiirl_ul_nomg from
before e62ca0f (except for a bug fix: POPi cannot be used since
it’s magical). It also reverts most of c31c291.

This does mean that uninitialized warnings for various operators are
back in reverse order. So I am reinstating a bug with this commit. But
that bug was never a 5.14 blocker and so should never have been fixed
during code freeze (and there is the slight possibility that the fix
would break sensitive test suites). It was only fixed ‘for free’ as a
side effect of fixing [perl #87708], but that bug turned out to have a
better fix (commit 75ea7a1) that allows these changes to be reverted.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This restores the old definition of dPOPTOPiirl_nomg from
before 96b6b87 and the old definition of dPOPXiirl_ul_nomg from
before e62ca0f (except for a bug fix: POPi cannot be used since
it’s magical). It also reverts most of c31c291.

This does mean that uninitialized warnings for various operators are
back in reverse order. So I am reinstating a bug with this commit. But
that bug was never a 5.14 blocker and so should never have been fixed
during code freeze (and there is the slight possibility that the fix
would break sensitive test suites). It was only fixed ‘for free’ as a
side effect of fixing [perl #87708], but that bug turned out to have a
better fix (commit 75ea7a1) that allows these changes to be reverted.
</pre>
</div>
</content>
</entry>
<entry>
<title>[perl #87708] Fix ‘$tied binop $tied’</title>
<updated>2011-04-08T06:02:35+00:00</updated>
<author>
<name>Father Chrysostomos</name>
<email>sprout@cpan.org</email>
</author>
<published>2011-04-08T06:02:35+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/perl.git/commit/?id=75ea7a126f0cb23a33771013529ef0e381ffe55d'/>
<id>75ea7a126f0cb23a33771013529ef0e381ffe55d</id>
<content type='text'>
The short story: In 5.13.1 or .2 these ops started calling get-magic
just once if the same gmagical scalar was used for both operands. Then
the same value would be used on both sides. In 5.12 FETCH would be
called twice with both return values used, but they would be swapped
in most cases (so $t/$t would return 1.5 if $t returned 2 and then
3). Now FETCH is called twice and the two operands are used in the
right order.

Up till now there have been patches to fix specific ops, but I real-
ised that the same ten or so lines of code would have to be added to
the rest of the 20+ pp_ functions, all of which use tryAMAGICbin_MG
(which calls Perl_try_amagic_bin in gv.c), so it made sense to add the
code to Perl_try_amagic_bin instead. This fixes all the ops in one
fell swoop.

The code in question checks whether the left and right operands are
the same gmagical scalar. If so, it copies the scalar into a new mor-
tal one, and then calls get-magic on the original operand to get its
new value (for the rhs). The new scalar is placed just below the top
of the stack, so it becomes the left operand.

This does slow down the bitwise integer ops slightly, but only in this
rare edge case. And the simplification of the code seems worth it.

Forthcoming are commits that revert some of the changes already made,
as this commit renders them unnecessary.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The short story: In 5.13.1 or .2 these ops started calling get-magic
just once if the same gmagical scalar was used for both operands. Then
the same value would be used on both sides. In 5.12 FETCH would be
called twice with both return values used, but they would be swapped
in most cases (so $t/$t would return 1.5 if $t returned 2 and then
3). Now FETCH is called twice and the two operands are used in the
right order.

Up till now there have been patches to fix specific ops, but I real-
ised that the same ten or so lines of code would have to be added to
the rest of the 20+ pp_ functions, all of which use tryAMAGICbin_MG
(which calls Perl_try_amagic_bin in gv.c), so it made sense to add the
code to Perl_try_amagic_bin instead. This fixes all the ops in one
fell swoop.

The code in question checks whether the left and right operands are
the same gmagical scalar. If so, it copies the scalar into a new mor-
tal one, and then calls get-magic on the original operand to get its
new value (for the rhs). The new scalar is placed just below the top
of the stack, so it becomes the left operand.

This does slow down the bitwise integer ops slightly, but only in this
rare edge case. And the simplification of the code seems worth it.

Forthcoming are commits that revert some of the changes already made,
as this commit renders them unnecessary.
</pre>
</div>
</content>
</entry>
<entry>
<title>[perl #87708] $tied % $tied and $tied * $tied under use integer</title>
<updated>2011-04-06T20:04:26+00:00</updated>
<author>
<name>Father Chrysostomos</name>
<email>sprout@cpan.org</email>
</author>
<published>2011-04-06T20:04:26+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/perl.git/commit/?id=96b6b87fc202a490b35ba140684083e484959f72'/>
<id>96b6b87fc202a490b35ba140684083e484959f72</id>
<content type='text'>
This is just part of #87708.

This fixes the % and * operators under ‘use integer’ when the same
tied scalar is used for both operands and returns two different val-
ues. Before this commit, get-magic would be called only once and
the same value used. In 5.12.x * just worked but the operands were
swapped for %.

It turns out that every operator using the dPOPTOPiirl_nomg macro
needs exactly the same treatment, so this commit eliminates the
dPOPTOPiirl_halfmg macro added a few commits ago and modifies
dPOPTOPiirl_nomg to do was it was doing. This should be perfectly
safe, as dPOPTOPiirl_nomg has not been in a stable release (and is
only for internal use anyway).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is just part of #87708.

This fixes the % and * operators under ‘use integer’ when the same
tied scalar is used for both operands and returns two different val-
ues. Before this commit, get-magic would be called only once and
the same value used. In 5.12.x * just worked but the operands were
swapped for %.

It turns out that every operator using the dPOPTOPiirl_nomg macro
needs exactly the same treatment, so this commit eliminates the
dPOPTOPiirl_halfmg macro added a few commits ago and modifies
dPOPTOPiirl_nomg to do was it was doing. This should be perfectly
safe, as dPOPTOPiirl_nomg has not been in a stable release (and is
only for internal use anyway).
</pre>
</div>
</content>
</entry>
<entry>
<title>[perl #87708] $tied + $tied and $tied - $tied under ‘use integer’</title>
<updated>2011-04-06T19:40:44+00:00</updated>
<author>
<name>Father Chrysostomos</name>
<email>sprout@cpan.org</email>
</author>
<published>2011-04-06T19:40:44+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/perl.git/commit/?id=e62ca0f9ce708db51e000573ffdc696e61eabdf7'/>
<id>e62ca0f9ce708db51e000573ffdc696e61eabdf7</id>
<content type='text'>
This is just part of #87708.

This fixes + and - under ‘use integer’ when the same tied scalar is
used for both operands and returns two different values. Before this
commit, get-magic would be called only once and the same value used.
In 5.12.x + just worked but the operands were swapped for -.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is just part of #87708.

This fixes + and - under ‘use integer’ when the same tied scalar is
used for both operands and returns two different values. Before this
commit, get-magic would be called only once and the same value used.
In 5.12.x + just worked but the operands were swapped for -.
</pre>
</div>
</content>
</entry>
<entry>
<title>[perl #87708] use integer; $tied &lt;=&gt; $tied</title>
<updated>2011-04-06T13:09:27+00:00</updated>
<author>
<name>Father Chrysostomos</name>
<email>sprout@cpan.org</email>
</author>
<published>2011-04-06T05:30:16+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/perl.git/commit/?id=4cdd48d8aacaf1f4775166dabd4fab9452b1e91a'/>
<id>4cdd48d8aacaf1f4775166dabd4fab9452b1e91a</id>
<content type='text'>
This is just part of #87708.

This fixes &lt;=&gt; under ‘use integer’ when the same tied scalar is used
for both operands and returns two different values. Before this com-
mit, get-magic would be called only once and the same value used. In
5.12.x, the operands would be reversed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is just part of #87708.

This fixes &lt;=&gt; under ‘use integer’ when the same tied scalar is used
for both operands and returns two different values. Before this com-
mit, get-magic would be called only once and the same value used. In
5.12.x, the operands would be reversed.
</pre>
</div>
</content>
</entry>
<entry>
<title>[perl #87708] atan2 $tied, $tied</title>
<updated>2011-04-06T05:21:01+00:00</updated>
<author>
<name>Father Chrysostomos</name>
<email>sprout@cpan.org</email>
</author>
<published>2011-04-06T04:39:01+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/perl.git/commit/?id=c31c2913381bad74c5f1f5c67c4d9c6e037550ad'/>
<id>c31c2913381bad74c5f1f5c67c4d9c6e037550ad</id>
<content type='text'>
This fixes atan2 when the same tied scalar is used for both operands
and returns two different values. Before this commit, get-magic would
be called only once and the same value used. In 5.12.x, the operands
would be reversed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes atan2 when the same tied scalar is used for both operands
and returns two different values. Before this commit, get-magic would
be called only once and the same value used. In 5.12.x, the operands
would be reversed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert tied PRINT to using Perl_tied_method()</title>
<updated>2011-01-05T13:19:50+00:00</updated>
<author>
<name>Nicholas Clark</name>
<email>nick@ccl4.org</email>
</author>
<published>2011-01-05T13:19:50+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/perl.git/commit/?id=94bc412f1f7b3d506c2ea51a781e3dd55c1c8492'/>
<id>94bc412f1f7b3d506c2ea51a781e3dd55c1c8492</id>
<content type='text'>
Add a flag TIED_METHOD_SAY to Perl_tied_method(), to allow tied PRINT to
effect C&lt;local $\ = "\n";&gt; within the ENTER/LEAVE pair of Perl_tied_method().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a flag TIED_METHOD_SAY to Perl_tied_method(), to allow tied PRINT to
effect C&lt;local $\ = "\n";&gt; within the ENTER/LEAVE pair of Perl_tied_method().
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename tied_handle_method() to tied_method(), and make it non-static.</title>
<updated>2011-01-05T12:40:28+00:00</updated>
<author>
<name>Nicholas Clark</name>
<email>nick@ccl4.org</email>
</author>
<published>2011-01-05T11:43:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/perl.git/commit/?id=d682515ddb57d53757782d63f41bfeee5275187b'/>
<id>d682515ddb57d53757782d63f41bfeee5275187b</id>
<content type='text'>
It can be used for (at least) the call to "SPLICE" from pp_splice.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It can be used for (at least) the call to "SPLICE" from pp_splice.
</pre>
</div>
</content>
</entry>
<entry>
<title>reindent tryAMAGICunTARGET after previous change</title>
<updated>2011-01-03T12:56:51+00:00</updated>
<author>
<name>David Mitchell</name>
<email>davem@iabyn.com</email>
</author>
<published>2011-01-03T12:56:51+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/perl.git/commit/?id=b5c08826d5b438cc010d2e862af0fc8591a8141f'/>
<id>b5c08826d5b438cc010d2e862af0fc8591a8141f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>simplify tryAMAGICunTARGET</title>
<updated>2011-01-03T12:54:21+00:00</updated>
<author>
<name>David Mitchell</name>
<email>davem@iabyn.com</email>
</author>
<published>2011-01-03T12:54:21+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/perl.git/commit/?id=4f5f5b0586ae4cf3d1af0d5506454c39c77e049f'/>
<id>4f5f5b0586ae4cf3d1af0d5506454c39c77e049f</id>
<content type='text'>
Expecting the targ in sp[-1] rather than sp[0] is accomplished
cleanly using dATARGET.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Expecting the targ in sp[-1] rather than sp[0] is accomplished
cleanly using dATARGET.
</pre>
</div>
</content>
</entry>
</feed>
