In perl.git, the branch sprout/overridesδ has been created
<http://perl5.git.perl.org/perl.git/commitdiff/0fdb13dd3e7694dcee82f4645cd3a66e4364d257?hp=0000000000000000000000000000000000000000>
at 0fdb13dd3e7694dcee82f4645cd3a66e4364d257 (commit)
- Log -----------------------------------------------------------------
commit 0fdb13dd3e7694dcee82f4645cd3a66e4364d257
Author: Father Chrysostomos <[email protected]>
Date: Mon May 14 13:19:38 2012 -0700
TODO tests for âifâ hiding âelseâ from keyword_plugin
As discussed in ticket #108286, âelseâ and âelsifâ should be consid-
ered part of the âifâ construct, rather than separate keywords, when
parsed. The same applies to âcontinue {â after a loop.
Currently PL_keyword_plugin is called for âelseâ after âifâ.
M MANIFEST
M ext/XS-APItest/APItest.pm
M ext/XS-APItest/APItest.xs
A ext/XS-APItest/t/keyword_else.t
commit 22892818c4d77a0099d858091950b6a844fd756c
Author: Father Chrysostomos <[email protected]>
Date: Mon May 14 09:54:08 2012 -0700
Increase $XS::APItest::VERSION to 0.39
M ext/XS-APItest/APItest.pm
commit d92bbd13af6636360075728616b1d66a33adffd8
Author: Father Chrysostomos <[email protected]>
Date: Sat May 12 23:18:50 2012 -0700
&CORE::undef should be an lvalue sub
M gv.c
M t/op/coreamp.t
commit cca880a072f5dc4becf7e5eebbacbf4265569894
Author: Father Chrysostomos <[email protected]>
Date: Sat May 12 23:10:58 2012 -0700
op.c: Remove redundant assignment
This was added unnecessarily in commit ddeae0f14c. It is a local
variable assigned to just before the function returns, so the value
is never used in the OP_UNDEF case.
M op.c
commit 8fefd3babea6af951dd36b90232c85eb86f0d002
Author: Father Chrysostomos <[email protected]>
Date: Sat May 12 19:05:24 2012 -0700
Add &CORE::undef
In the error message, we canât say â&CORE::undef operatorâ, so we
should be using the op name, rather than the op description.
Instead of using OP_NAME(PL_op->op_next), which would expand to
PL_op->op_next->op_type == OP_CUSTOM
? XopENTRY(Perl_custom_op_xop(aTHX_ PL_op->op_next), xop_name)
: PL_op_name[PL_op->op_next->op_type]
we can simply use PL_op_name[opnum], which should be quicker.
pp_undef can already handle nulls on the stack.
There is one remaining problem. If &CORE::undef(\*_) is called, *_
will be undefined while @_ is localised during the sub call, so it
wonât have the same effect as undef *_. I donât know whether this
should be considered a bug or not, but I could solve it by making
pp_undef an XSUB.
M gv.c
M pp.c
M t/op/coreamp.t
M t/op/coresubs.t
commit 4c0979aacb7261f06c2fc0ccd50ee86052a7b2e7
Author: Father Chrysostomos <[email protected]>
Date: Sat May 12 18:43:13 2012 -0700
Donât crash with &CORE::foo after undefining *_
When a sub is called with & and no parentheses, no @_ is set up. This
means the sub call sees the existing @_. It also means that, if *_
has been undefined, there is no @_.
pp_coreargs was not accounting for this, and was doing
AvARRAY(GvAV(PL_defgv)) without checking that GvAV(PL_defgv) was non-
null. It crashed as a result.
M pp.c
M t/op/coreamp.t
commit 74b13f4ca7325be86579624809454c7f27631fd3
Author: Father Chrysostomos <[email protected]>
Date: Fri May 11 22:06:29 2012 -0700
Add &CORE::study
M gv.c
M t/op/coreamp.t
M t/op/coresubs.t
commit a59a51b84a39a3343ab17f876c2289f894fba1dd
Author: Father Chrysostomos <[email protected]>
Date: Fri May 11 22:03:55 2012 -0700
Add &CORE::split
M gv.c
M t/op/coreamp.t
M t/op/coresubs.t
commit d57591b8424c28f87d0637d6897017072347a829
Author: Father Chrysostomos <[email protected]>
Date: Fri May 11 21:54:03 2012 -0700
Add &CORE::scalar
M gv.c
M t/op/coreamp.t
M t/op/coresubs.t
commit 23f061431ad83ab8ab7f0aa46ed74a144274e031
Author: Father Chrysostomos <[email protected]>
Date: Fri May 11 21:48:58 2012 -0700
pp.c:pp_coreargs: use PL_op_desc instead of OP_DESC
Instead of using OP_DESC on op_next, since we already know the op
number, we can just go straight to PL_op_desc, which is what OP_DESC
itself uses after looking inside op_next to find out what the op
number is.
BTW, &CORE::scalar will need this, since a scalar op is never actu-
ally executed, making coreargsâ op_next pointer point to another op
than expected:
2 <1> leavesublv[1 ref] K/REFC,1 ->(end)
- <1> scalar sKP/1 ->2
1 <$> coreargs(IV 2) s ->2
-e syntax OK
Otherwise we get âNot enough arguments for lvalue subroutine returnâ.
M pp.c
commit f96c005371faa5de21211c8e604daba462a61649
Author: Father Chrysostomos <[email protected]>
Date: Fri May 11 20:48:02 2012 -0700
[perl #105926] Make ârequire 6â a syntactic special case
This commit moves the special-casing for ârequire 6â from pp_require
(run time) to op.c (optree-building time). If the argument to require
is a constant (not counting folded constants) that is a number or a
vstring, the require op is flagged as being a version check, with the
newly-added OPpREQUIRE_VER flag.
This means that ârequire $verâ no longer works, which could be consid-
ered an incompatible change (some tests had to change), but the bug
fix below makes it worth it.
Since CORE::require($_[0]) will no longer work from an override (actu-
ally a callback; see perl #108286), overrides are no longer called for
version checks like ârequire 5â. The tests for this are marked to-do
for now, as they will be re-enabled (with âuse feature "overrides"â)
when the âoverridesâ feature comes into effect.
I left the lexing part of require as it was, since, although it is
clearly buggy, it is not clear exactly how things are supposed to
work. See perl #107004.
This is the bug fix we get as a result:
These two lines:
$x = "6"; require $x;
$x = "6"; 0+$x; require $x;
should behave exactly the same way, but the latter was a version
check. Now they are both file names. And this no longer happens:
$ perl5.12.4 -le '$x = "34 cabbages"; 0+$x; require $x'
Invalid version format (non-numeric data) at -e line 1.
In this case, "34 cabbages" should obviously be a file name, but its
numeric representation was causing it to be treated as a version num-
ber; yet the version-parsing code used the string representation.
M ext/B/B/Concise.pm
M op.c
M op.h
M pp_ctl.c
M t/comp/require.t
M t/op/override.t
commit add3f97ca0688f80a9e3b8a2c6db6a03ffdce94e
Author: Father Chrysostomos <[email protected]>
Date: Fri May 11 20:27:46 2012 -0700
Test that ârequire v5â ignores sub named v5
This is something I broke in my first (unapplied) attempt to clean up
requireâs parsing madness.
M t/comp/require.t
commit d9535cc8f63caa2d1ce7c66e2cb86d517dd10991
Author: Father Chrysostomos <[email protected]>
Date: Fri May 11 20:13:01 2012 -0700
Make while(each ...) imply defined($_ = ...)
This came up in ticket #108286.
Quoting Nicholas Clark:
>
> while (<STDIN>)
> while (<*>)
>
> These both always implicitly assigned to $_, always implicitly
> added defined.
>
> while ($_ = <STDIN>)
> while ($a = <STDIN>)
> while ($_ = <*>)
> while ($a = <*>)
> while ($_ = readdir D)
> while ($a = readdir D)
> while ($_ = each %h)
> while ($a = each %h)
>
> The implicit defined added was by commit 4b161ae29769b4a3,
> //depot/maint-5.004/perl@949
>
>
> BUT:
>
> while (readdir D)
>
> The implicit assignment to $_ and defined test were both added in
> *2009* (by commit 114c60ecb1f7)
>
>
> leaving:
>
> while (each %h)
>
>
> So it is the odd one out. And in 2009 we felt comfortable to add
> both the implicit assignment and the defined test in blead for
> readdir, as a bug fix, and have had no reports of it caus-
> ing problems.
[He asked:]
> > > So that's a bug?
[And I responded:]
> > That's what I was trying to ask. :-)
>
> OK, after a quite a bit of deliberation and digging, I'm of the opinion
that
>
> 1: yes, it's a bug
...
> So, there's only one use of while(each %...) on CPAN outside of
> debugging or test code, and that's only go the potential to break
> due to assignment now happening to to $_. Compared with 29 matches
> for while\s*\(\s*readdir of which 4 are .pm files. So
>
> 2: I think it's safe to fix it, just like readdir was fixed.
Just *as* readdir was fixed! :-)
M op.c
M t/op/defins.t
commit cb6ec6e9e494e4795be27706b60ed0833819e003
Author: Father Chrysostomos <[email protected]>
Date: Thu May 3 09:12:03 2012 -0700
override.t: Remove obsolete comment
M t/op/override.t
commit 03e163cbedeb4de79c89fbd06c9f19b4b68a0998
Author: Father Chrysostomos <[email protected]>
Date: Wed May 2 20:37:12 2012 -0700
require_errors.t: Test <> error
M t/op/require_errors.t
commit 4c0c257dc1879d1bbe67e4986e46c6b0574152a7
Author: Father Chrysostomos <[email protected]>
Date: Wed May 2 20:36:20 2012 -0700
Allow require_errors.t to be run from the top level
M t/op/require_errors.t
commit 845dc20e5d08a8ee044776248e4891430975550b
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 30 18:18:03 2012 -0700
Record folded constants in the op tree
M dump.c
M ext/B/B/Concise.pm
M ext/B/t/optree_constants.t
M ext/B/t/optree_samples.t
M op.c
M op.h
M toke.c
commit 003fcce5e2934a75ea7848a1d4aecf669afddf41
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 30 18:04:23 2012 -0700
Remove OPpCONST_WARNING from B::Concise
M ext/B/B/Concise.pm
commit 84b5ae261e8545b9c8c7243255705d1d743ae26e
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 30 18:03:27 2012 -0700
Increase $B::Concise::VERSION to 0.90
M ext/B/B/Concise.pm
commit 0d46fd1aeef1f458be39775cdffb72964852f0a7
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 30 17:46:48 2012 -0700
Remove OPpCONST_WARNING
This was added to op.h in commit 599cee73:
commit 599cee73f2261c5e09cde7ceba3f9a896989e117
Author: Paul Marquess <[email protected]>
Date: Wed Jul 29 10:28:45 1998 +0100
lexical warnings; tweaks to places that didn't apply correctly
Message-Id: <[email protected]>
Subject: lexical warnings patch for 5.005_50
p4raw-id: //depot/perl@1773
dump.c was modified to dump in, in this commit:
commit bf91b999b25fa75a3ef7a327742929592a2e7e9c
Author: Simon Cozens <[email protected]>
Date: Sun May 13 21:20:36 2001 +0100
Op private flags
Message-ID: <[email protected]>
p4raw-id: //depot/perl@10117
But is apparently completely unused anywhere. And I want that bit.
M dump.c
M op.h
commit 97dccbb696aa4118c7247d968892cdb83ea6a0f9
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 30 08:49:32 2012 -0700
Add &CORE::prototype
M gv.c
M t/op/coreamp.t
M t/op/coresubs.t
commit 33e7d23cc7ad90afb9c1973a500b0e5d264fa3b1
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 29 21:16:51 2012 -0700
coreamp.t: rename badly-named tests
M t/op/coreamp.t
commit 49b300bd18068070e350d4335a50ab1f9f6edb74
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 29 21:15:25 2012 -0700
Add &CORE::pos
M gv.c
M op.c
M pp.c
M t/op/coreamp.t
M t/op/coresubs.t
commit e3a3c8d151854c0248c6cfb3b03e6368ffd7a9a9
Author: Father Chrysostomos <[email protected]>
Date: Sat May 12 22:30:06 2012 -0700
Make pos use ck_fun and OA_SCALARREF
See the previous commit. The same applies here.
In short, this allows core_prototype and pp_coreargs to be simpler.
M opcode.h
M regen/opcodes
commit fe9c8c2623e950f4010dae06b01325266e655640
Author: Father Chrysostomos <[email protected]>
Date: Sat May 12 14:25:44 2012 -0700
Make undef use ck_fun and OA_SCALARREF
In regen/opcodes, we have some operators that use ck_fun and have R
for the argument. And there are some that use ck_lfun and have S for
the argument.
These both amount to more or less the same thing.
ck_fun/R goes through the OA_SCALARREF case in ck_fun, which calls
op_lvalue(scalar()) on the child op.
ck_lfun/S goes through the OA_SCALAR case in ck_fun, which calls
scalar(), and then ck_lfun sees to it that op_lvalue is called.
The only real difference is that the OA_SCALAR case makes sure there
are not too many arguments.
Since both core_prototype and pp_coreargs need special cases to deal
with OA_SCALAR that is really âsupposedâ to be OA_SCALARREF, it
becomes simpler to add &CORE::undef if undef uses R. In that case,
we also have to put the argument-checking in the OA_SCALARREF, but we
make it conditional on the op being an undef op, for the sake of doing
one thing at a time. (This is a bit of a mess; see ticket #96006.)
M op.c
M opcode.h
M regen/opcodes
commit 04398683ef2530d4c116ef41c0bc74a74f341187
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 29 17:58:44 2012 -0700
Add &CORE::glob
I added a special case for OP_GLOB to pp_coreargs, since glob does not
have the u flag in regen/opcodes; hence PL_opargs[opnum] & OA_DEFGV is
false, even though glob does imply $_.
Adding the flag to regen/opcodes is not so simple, as the code in
ck_fun that adds the DEFSV op does not account for list ops, but
leaves op_last unchanged.
Changing ck_fun to account requires adding more code than this special
case in pp_coreargs.
OPf_SPECIAL indicates that glob was called with the CORE:: prefix.
M gv.c
M op.c
M pp.c
M t/op/coreamp.t
M t/op/coresubs.t
commit 940eb4721ac9429d2e5f2715f9dda7dacbfe99cd
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 29 11:11:15 2012 -0700
op.c:ck_glob: Donât do gv_fetchpv("CORE::GLOBAL::glob")
We have PL_globalstash precisely to avoid the nested stash lookup in
cases like these.
M op.c
commit 29b5e19976437d19e50a136d864e424a858fa806
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 29 00:11:10 2012 -0700
op.c:ck_require: Ignore sub prototype
The require operator doesnât allow its syntax to be overridden. But
it was still calling an overrideâs call checker anyway, resulting in
strange effects like this:
$ perl -e 'use subs "require"; sub require($$){}; require(1,2)'
Not enough arguments for main::require at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
$ perl -e 'use subs "require"; sub require(){}; require()'
Too many arguments for main::require at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
The subâs own prototype should either apply or not apply; we should
not have some hybrid behaviour half way in between.
In this case, since require has its own parsing, that should take
precedence.
M op.c
M t/comp/bproto.t
commit 7619c72abe8dc35c4cbf2019edbb7a6de6a3c469
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 29 00:06:51 2012 -0700
op.c:ck_glob: Ignore sub prototype
The glob operator doesnât allow its syntax to be overridden. But it
was still calling an overrideâs call checker anyway, resulting in
strange effects like this:
$ perl5.15.9 -e 'use subs "glob"; sub glob($$){} glob 1,2'
Too many arguments for glob at -e line 1, at EOF
Not enough arguments for main::glob at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
The subâs own prototype should either apply or not apply; we should
not have some hybrid behaviour half way in between (two many and not
enough at the same timeâ½).
In this case, since glob has its own parsing, that should take
precedence.
M op.c
M t/comp/bproto.t
commit 410222f692eb46b5e9200824f67587f89da1fa5d
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 28 23:59:46 2012 -0700
op.c:dofile: Ignore sub prototype
The do-FILE operator doesnât allow its syntax to be overridden. But
it was still calling an overrideâs call checker anyway, resulting in
strange effects like this:
$ perl -e 'use subs "do"; sub do($$){}; do(1,2)'
Not enough arguments for main::do at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
$ perl -e 'use subs "do"; sub do(){}; do()'
Too many arguments for main::do at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
The subâs own prototype should either apply or not apply; we should
not have some hybrid behaviour half way in between.
In this case, since âdoâ has its own parsing, that should take
precedence.
M op.c
M t/comp/bproto.t
commit ad9da4d327cf9c23b94378ff1ce5ccb3309a98fc
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 28 23:46:03 2012 -0700
op.c: Remove a redundant ck_subr call from ck_require
newUNOP(OP_ENTERSUB, ...) already calls ck_subr, so wrapping it in
ck_subr(...) is unnecessary and wasteful of precious CPU time.
M op.c
commit 5e18f0353bfd17b120ebd360711bfbfe8baf6a26
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 28 23:45:37 2012 -0700
op.c: Remove a redundant ck_subr call from ck_glob
newUNOP(OP_ENTERSUB, ...) already calls ck_subr, so calling ck_subr on
its return value is unnecessary and wasteful of precious CPU time.
M op.c
commit 3b00de79df4acfe5f2385bda2e1a843798de9347
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 28 23:43:42 2012 -0700
op.c: Remove a redundant ck_subr call from dofile
newUNOP(OP_ENTERSUB, ...) already calls ck_subr, so wrapping it in
ck_subr(...) is unnecessary and wasteful of precious CPU time.
M op.c
commit 12dc1de7c1946255f33f2f43990e6284706ac051
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 28 21:27:40 2012 -0700
op.c:ck_glob: Check PL_globhook before loading File::Glob
By loading File::Glob when there is no CORE::GLOBAL::glob, we just end
up calling Perl_load_module for every glob op, since File::Glob no
longer uses CORE::GLOBAL::glob by default.
We could just as well check whether PL_globhook is set, which would
be faster.
(File::Glob sets PL_globhook when it loads. In 5.14, it didnât
set anything, but ck_glob itself would set CORE::GLOBAL::glob to
File::Glob::csh_glob.)
M op.c
commit 78120dc5d97f35b13bd626267771f5d315f63bd2
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 28 00:26:39 2012 -0700
Remove the second param to tryAMAGICunTARGET
This macro is unused on CPAN and completely undocumented, so this
change should be safe.
M pp.h
M pp_hot.c
M pp_sys.c
commit 4bc32cbd1179be05dc8f1a4a9392ee52aec2eaf0
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 28 00:24:01 2012 -0700
Zap PL_glob_index
As of the previous commit, nothing is using it.
M embedvar.h
M intrpvar.h
M sv.c
commit 82ab5985c9d30bf4a663358883c7dfb67addfd7d
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 28 00:18:30 2012 -0700
Stop using PL_glob_index for PL_globhook
If Glob.xs just uses the address of PL_op as its iterator key all the
time (when called via PL_globhook too, not just via a glob override),
the code is simpler.
M ext/File-Glob/Glob.xs
M op.c
M pp_sys.c
commit e33efe36e667ee8ac69af7ec76bfd8f8af224766
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 28 00:16:25 2012 -0700
Test <> ovrld with glob override
In the previous commit, I almost screwed up the stack for those cases
where glob is overridden and there is iterator overloading.
M lib/overload.t
commit ade67d039338ef8f6be08ab1f69c185ab3399039
Author: Father Chrysostomos <[email protected]>
Date: Fri Apr 27 19:50:44 2012 -0700
Donât pass PL_glob_index to glob overrides
This magic second argument is undocumented, unused on CPAN and in the
core (as of the last few commits), and getting in the way of allowing
glob() to be overridden properly.
It gets in the way because, under the âoverridesâ feature (still a
no-op), the glob keyword will be truly overridable, with no magic
involved, but it will still be called by the built-in <...> operator,
which consequently must not pass any magic second argument.
See <https://rt.perl.org/rt3/Ticket/Display.html?id=108286>.
M op.c
M pp_sys.c
commit c3d6f8f81542d594803c92a611146b371f31ada0
Author: Father Chrysostomos <[email protected]>
Date: Fri Apr 27 17:08:15 2012 -0700
File::Glob: Donât use the magic 2nd arg to glob
This argument is going away, because it is undocumented, unused on
CPAN outside of the core, and getting in the way of allowing glob() to
be overridden properly.
It gets in the way because, under the âoverridesâ feature (still a
no-op), the glob keyword will be truly overridable, with no magic
involved, but it will still be called by the built-in <...> operator,
which consequently must not pass any magic second argument.
See <https://rt.perl.org/rt3/Ticket/Display.html?id=108286>.
M ext/File-Glob/Glob.pm
M ext/File-Glob/Glob.xs
commit e6a737c2993b3752951ecc4e8f67093866e0d451
Author: Father Chrysostomos <[email protected]>
Date: Fri Apr 27 17:06:19 2012 -0700
Increase $File::Glob::VERSION to 1.18
M ext/File-Glob/Glob.pm
commit ed448b5d91d0d1577e0859c27da196d2c94b1641
Author: Father Chrysostomos <[email protected]>
Date: Fri Apr 27 16:48:36 2012 -0700
DosGlob: Donât use the magic 2nd arg to glob
This argument is going away, because it is undocumented, unused on
CPAN outside of the core, and getting in the way of allowing glob() to
be overridden properly.
It gets in the way because, under the âoverridesâ feature (still a
no-op), the glob keyword will be truly overridable, with no magic
involved, but it will still be called by the built-in <...> operator,
which consequently must not pass any magic second argument.
See <https://rt.perl.org/rt3/Ticket/Display.html?id=108286>.
M MANIFEST
A ext/File-DosGlob/DosGlob.xs
M ext/File-DosGlob/lib/File/DosGlob.pm
M ext/File-DosGlob/t/DosGlob.t
commit 3d532362930529438e205957baa4f0640cb6a958
Author: Father Chrysostomos <[email protected]>
Date: Fri Apr 27 16:39:02 2012 -0700
Increase $File::DosGlob::VERSION to 1.07
M ext/File-DosGlob/lib/File/DosGlob.pm
commit 567ca466239159fa2a71a90743c0addba46d9373
Author: Father Chrysostomos <[email protected]>
Date: Fri Apr 27 14:05:39 2012 -0700
Move File::DosGlob from lib to ext
M MANIFEST
M Porting/Maintainers.pl
A ext/File-DosGlob/lib/File/DosGlob.pm
A ext/File-DosGlob/t/DosGlob.t
D lib/File/DosGlob.pm
D lib/File/DosGlob.t
commit 69a0e03b0490aa7682566a9e71dfa9a17a793872
Author: Father Chrysostomos <[email protected]>
Date: Fri Apr 27 09:53:16 2012 -0700
Add &CORE::exists
M gv.c
M t/op/coreamp.t
M t/op/coresubs.t
commit 4b08cfe8fa48fbc0159ead8bdb9f466b64f40542
Author: Father Chrysostomos <[email protected]>
Date: Thu Apr 26 20:40:48 2012 -0700
Add &CORE::delete
M gv.c
M t/op/coreamp.t
M t/op/coresubs.t
commit 913362af648595503989031fff3802426b6a1a30
Author: Father Chrysostomos <[email protected]>
Date: Thu Apr 26 20:38:37 2012 -0700
Add &CORE::defined
M gv.c
M t/op/coreamp.t
M t/op/coresubs.t
commit f0dc29581087438c0dab49755b0ff4257cddfa34
Author: Father Chrysostomos <[email protected]>
Date: Thu Apr 26 20:36:03 2012 -0700
coresubs.t: Explicitly skip all unsupported keywords
Instead of skipping positive keywords (those that cannot be over-
ridden) because of their positivity, list them explicitly in the
skip list.
This will allow them to be removed one by one.
M t/op/coresubs.t
commit 35bd71d3f34bf216b2afe61e2eb7279d2f9b17e4
Author: Father Chrysostomos <[email protected]>
Date: Thu Apr 26 20:31:22 2012 -0700
coreamp.t: Explicitly skip all unsupported keywords
Instead of skipping positive keywords (those that cannot be over-
ridden) because of their positivity, list them explicitly in the
skip list.
This will allow them to be removed one by one.
M t/op/coreamp.t
commit 0283a76ee42ee89d49ef8cfbe4a700ab9061d987
Author: Father Chrysostomos <[email protected]>
Date: Thu Apr 26 17:56:46 2012 -0700
gv.c: List all keywords with no coresubs
S_maybe_add_coresub returns NULL for any keywords that are not
overridable.
Instead of identifying them by the positivity of their codes, list
them all explicitly.
This will allow coresubs to be added for them one by one.
M gv.c
commit 8867951bd4f8a1da512f2fc961b928cfca7228b0
Author: Father Chrysostomos <[email protected]>
Date: Thu Apr 26 15:49:22 2012 -0700
dump.c: Dump CVf_IN_OVERRIDES
M dump.c
commit c246dd21c20054a29e3925095ed1d63c195a821f
Author: Father Chrysostomos <[email protected]>
Date: Thu Apr 26 15:47:49 2012 -0700
op.c: Record whether subs are compiled under overrides feature
M op.c
commit 61d86702978434a5dd49ea5aeb48e6fb50545b67
Author: Father Chrysostomos <[email protected]>
Date: Wed Apr 25 22:30:34 2012 -0700
cv.h: Add CVf_IN_OVERRIDES flag
This will be used to indicate that a sub was compiled under the
âoverridesâ feature.
M cv.h
commit a7857fbe6beca96fb22d726d6b4e7db177b5187d
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 06:24:50 2012 -0700
Increase $feature::VERSION to 1.28
M lib/feature.pm
M regen/feature.pl
commit ffef2704ae0826f1e0a3dc9c095ecba9c4188862
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 23 23:19:32 2012 -0700
Add overrides feature
It doesnât do anything yet.
M feature.h
M lib/feature.pm
M regen/feature.pl
commit 4dbf2a802a52496123a7bdf0b8a8baec773ba664
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 23 23:17:42 2012 -0700
Add 5.17-18 feature bundles
M lib/feature.pm
M regen/feature.pl
commit 312ebea62a1101df0de133c25c88672bfec028df
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 23 22:55:48 2012 -0700
Update perlfunc/prototype
to account for the new inconsequentiality of non-overridability.
M pod/perlfunc.pod
commit 4f15fe66eb343183778f2cdc9a354d0b473ee36c
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 21 19:12:21 2012 -0700
[perl #97478] Make âCanât find opnumberâ UTF-8- and null-clean
M pp.c
M t/comp/proto.t
commit 1b54d69fb03d99b2ddf868d5be4b1bcb4ad3b108
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 21 18:55:38 2012 -0700
cproto.t: Add tests for BEGIN, etc.
M t/op/cproto.t
commit 59430e52086de74d2ab768fd9b1514b4a83cef77
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 21 18:30:35 2012 -0700
Make cproto.t more stringent
It was allowing prototype() to return undef where an empty string
was expected.
M t/op/cproto.t
commit 9f16580f0ad437a59b7041f2b9b38b50c9fcf09f
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 21 12:50:25 2012 -0700
Add protos for positive keywords
âPositiveâ means having a + before it in regen/keywords.pl; i.e., key-
words that cannot be overridden.
Since all keywords are going to be overridable, it makes sense to
return prototypes for all that can have them, which turns out to be
only a handful.
M op.c
M pp.c
M t/op/cproto.t
commit efa76f018254711b85712b5cb8227ec2bc19a2a3
Author: Father Chrysostomos <[email protected]>
Date: Sat May 12 13:03:54 2012 -0700
Make pos(@array) and pos(%hash) into errors
Currently pos has an effective prototype of (;\[$@%*]), and what it
does is rather interesting.
First, it produces a strange uninitialized warning:
$ ./perl -Ilib -we 'pos my @a = 3'
Use of uninitialized value within @a in scalar assignment at -e line 1.
There is no uninitialized value here. The value âwithin @aâ is actu-
ally @a itself. The code that produces the error message was written
under the (perfectly logical) assumption that an array would never be
passed to report_uninit().
Secondly, it adds pos magic to the array itself:
$ ./perl -Ilib -e 'pos @a = 3; use Devel::Peek; Dump \@a'
SV = IV(0x8039fc) at 0x803a00
REFCNT = 1
FLAGS = (TEMP,ROK)
RV = 0x825b90
SV = PVAV(0x804a04) at 0x825b90
REFCNT = 2
FLAGS = (SMG)
MAGIC = 0x30cb20
MG_VIRTUAL = &PL_vtbl_mglob
MG_TYPE = PERL_MAGIC_regex_global(g)
ARRAY = 0x0
FILL = -1
MAX = -1
ARYLEN = 0x0
FLAGS = (REAL)
This magic can never be used, as @a =~ /foo/g is equivalent to
scalar(@a) =~ /foo/g, and scalar(@a) returns a scalar containing the
length of the array, not the array itself.
This seems clearly a mistake.
pos forces lvalue context on its argument, making pos(3) a compile-
time error.
Internally, the main distinction between \$ (scalar lvalue) and
\[$@%*] (scalar lvalue, or some other type) prototypes is that the
function S_scalar_mod_type returns true for functions with the former,
but false for functions with the latter. (Tangentially, \[$@%*] and
\[$@%&*] are distinguished by the special-casing in op_lvalue_flags
under case OP_ENTERSUB.)
S_scalar_mod_type returns false for pos. I think it should return
true. That is what this commit does, resulting in consistency
with read():
$ ./perl -Ilib -we 'read($1, @2, $3)'
Can't modify array dereference in read at -e line 1, near "$3)
"
Execution of -e aborted due to compilation errors.
$ ./perl -Ilib -we 'pos(@2)'
Can't modify array dereference in match position at -e line 1, near "@2)
"
Execution of -e aborted due to compilation errors.
Except when it comes to globs, since read refuses *foo for its second
argument, but pos(*foo) has always Just Worked, so there is no reason
to forbid it.
So, now, pos has an effective prototype of (;\[$*]).
M op.c
M t/op/pos.t
-----------------------------------------------------------------------
--
Perl5 Master Repository