In perl.git, the branch sprout/overridesβ has been created
<http://perl5.git.perl.org/perl.git/commitdiff/756c7e6ab947a8f4720cebe92b6f38005ef188b5?hp=0000000000000000000000000000000000000000>
at 756c7e6ab947a8f4720cebe92b6f38005ef188b5 (commit)
- Log -----------------------------------------------------------------
commit 756c7e6ab947a8f4720cebe92b6f38005ef188b5
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 8d04dfd4c0a73b43c475a936d86ca20fffcc9de9
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 ac9794c6cf7cb6add1d80b30e206cd8e9f325932
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 29 21:15:25 2012 -0700
Add &CORE::pos
M gv.c
M op.c
M t/op/coreamp.t
M t/op/coresubs.t
commit c00f09190eae1706a4a296226be7fcd26b890335
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.
M gv.c
M pp.c
M t/op/coreamp.t
M t/op/coresubs.t
commit e4133bdb7bc91322713c99bd0b7f6f16446bd694
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 c341fb0c13c964d22a40e23802b7da048103e6e5
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 6940133d09e953c610f8846945f0fc92d65cce6e
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 196696dd717e991bd355664a7d3ca699f34f7703
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 b4dacdb63e4768e7a9e17554a3f2050bf308db05
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 f7d5e4d7dc5077e03ffa2954fb6e0f51f71b6344
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 69ce8db79f4996f549eac53d3d87dbf6d424784d
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 3dfd440f18c8cc83dd1eaab845e9c16810a473c4
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 5bd87d75c46037dfc9cebc3f0a34c8a50d2baecc
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 4b575690fdbde39061d1b55981a9d269190d021e
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 950b320083afe436334139853a3cebbec15360b2
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 34f79184a420093403d6d432f3b7d34f0b883579
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 30f5e3cc0b649f15931090b631c0a21ce374a928
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 86ad9b2b65991ea37045bd71dcc1a536f95b7754
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 24cdb93ee18fb760ac73ec105be529b3c5b9e898
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 c6e31d367a27f0b14e2b488809f23553c2cc139a
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 540892f1f2fe73eb0464199ce90f6c7058794af3
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 049f6500e57ce249a604eb142f92c3bafb828529
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 a6f13254dd810dc097a378663ec5f792e9f986d8
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 96756f6e081021ad1e667a979cd84442a210be9e
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 d00b41d411fc52b8f37477747ec5bf2b9d4ca2bd
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 4244a911babb2c35431b6311ac682670c617ad93
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 cfdbacd0be5d6e00cf63db21aa40cec5075f25a8
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 82b78eaf579bb0e628409bbf29c31b8bc2530fe4
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 213614bc660ee0e018d7cfb0024cd2947e1be73e
Author: Father Chrysostomos <[email protected]>
Date: Thu Apr 26 15:49:22 2012 -0700
dump.c: Dump CVf_IN_OVERRIDES
M dump.c
commit f4a17175b067bf5417430760002b2da49aa8d20c
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 1145576308904fbdc6523121ed2aa2db7290ec50
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 162560b1547487fe2a903d6d74d8c97546ed6fb3
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 639019e209621d86927f4b733e4220eac1336480
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 3acdf66414f34b2223903284b9e376a58778b54d
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 514a5d0ad91eb8b5dcf5a23f84aa6aad9a865ae1
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 c04cc30328024270d2d2740c076cb1e9534f2ad7
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 3ebfd2c59f3bb3f94767ce57770f8132315e0f4b
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 71d375da02513948b424791c216ca1baf2a44cf1
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 afb2afb748a6fd7accc1c2de6509a4e4475ed9f0
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.
Some of these canât (easily) be generated from the information in
regen/opcodes, without changing the flags. Changing the flags (e.g.,
using R instead of S for undef) causes other code paths to differ,
resulting in test failures that I havenât looked into yet. But that
is low priority. In those cases I simply hard-coded the prototypes
into op.c:core_prototype.
M op.c
M pp.c
M t/op/cproto.t
-----------------------------------------------------------------------
--
Perl5 Master Repository