In perl.git, the branch smoke-me/coresubsix has been created <http://perl5.git.perl.org/perl.git/commitdiff/0936f836e1156d51433b922aa18eb13d83bf22ac?hp=0000000000000000000000000000000000000000>
at 0936f836e1156d51433b922aa18eb13d83bf22ac (commit) - Log ----------------------------------------------------------------- commit 0936f836e1156d51433b922aa18eb13d83bf22ac Author: Father Chrysostomos <spr...@cpan.org> Date: Sat May 26 05:47:08 2012 -0700 bproto.t: Test pos(1,$b) I nearly broke this. M t/comp/bproto.t commit 55a170fbbde1d231e18640c1b9bd45372e0372cc Author: Father Chrysostomos <spr...@cpan.org> Date: Tue May 15 14:42:50 2012 -0700 Update CORE.pod to reflect the new coresubs M lib/CORE.pod commit 1ebe645e702304f791d0984e21c8c07478090eff Author: Father Chrysostomos <spr...@cpan.org> Date: Mon May 14 22:26:15 2012 -0700 Make &CORE::undef(\*_) undefine it properly Unless called as &CORE::undef (without parentheses) after @_ has been set to \*_, it leaves @_ in the ARRAY slot. This is an implementation detail leaking through. pp_entersub temporarily aliases @_ to a new array, which is restored to its previous value on sub exit. Since &CORE::undef is a perl sub with an op tree containing an undef op, $ ./perl -Ilib -MO=Concise,CORE::undef -e '\&CORE::undef' CORE::undef: 3 <1> leavesublv[1 ref] K/REFC,1 ->(end) 2 <1> undef sKP/1 ->3 1 <$> coreargs(IV 44) s ->2 -e syntax OK the undef op runs while @_ is localised. So we should un-localise @_ if we detect that case. Doing this in pp_coreargs might be a bit of a hack, but itâs less code than rewriting &CORE::undef as an XSUB, which would be the other option. Either way, we need a special case, since undef is the only named op that touches the ARRAY slot of the glob passed to it. M pp.c M t/op/coreamp.t commit 2b045c9a2d2752a3e5b3b8acf2691a8bd6a5b02b Author: Father Chrysostomos <spr...@cpan.org> 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 816e7e9e7aa1ba5331ae9600f9dc3e0428420e01 Author: Father Chrysostomos <spr...@cpan.org> 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 037def3c43af9c086185095aa2dd09af30ae1b76 Author: Father Chrysostomos <spr...@cpan.org> 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 648b82c09e8d47bb6024a7f9529792f6cc6107e2 Author: Father Chrysostomos <spr...@cpan.org> 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 a3e0158ea5eedbb22232d5bee82a6834c36127b3 Author: Father Chrysostomos <spr...@cpan.org> 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 c32b4b5a4fc438a59437eb310018d1cbbd417bf6 Author: Father Chrysostomos <spr...@cpan.org> 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 caf3090c3232a4f222310285da74b341c3269e75 Author: Father Chrysostomos <spr...@cpan.org> 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 9719dc8a945b0cf05b2fe87402b3e8f3daa8c863 Author: Father Chrysostomos <spr...@cpan.org> 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 cf822a39c81546cb99de86cf3a37e248768b0433 Author: Father Chrysostomos <spr...@cpan.org> 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 1f9e9f9747f0c86bda9bfff4319cb9ecc081f243 Author: Father Chrysostomos <spr...@cpan.org> 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 236009f5942634c7f688ed4144419e0565c6b275 Author: Father Chrysostomos <spr...@cpan.org> 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 96a2b6a84991ac7725ab44ba5fcdd61a714b6107 Author: Father Chrysostomos <spr...@cpan.org> 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 997f407d7e88100fa13463cfd0638db3a7507b22 Author: Father Chrysostomos <spr...@cpan.org> 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 fbef4bba82db3fa9c60556e6b916d7a180f343c6 Author: Father Chrysostomos <spr...@cpan.org> 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 b5369e84f9c5e22b03079ecbd011dda83c4e9be4 Author: Father Chrysostomos <spr...@cpan.org> 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 65ff06a75ee1ddfa234b91490cc63d9916454b0a Author: Father Chrysostomos <spr...@cpan.org> 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 172e2e1797dfdcd17ec896055341c0f05ec46275 Author: Father Chrysostomos <spr...@cpan.org> 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 3943ad23e3f63b56eaa561f184b55c06b72ca035 Author: Father Chrysostomos <spr...@cpan.org> 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 00a57079fa4c1176c3f225376ec8a8015f3ed478 Author: Father Chrysostomos <spr...@cpan.org> 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 added as subs to the CORE:: name- space, with prototypes wherever they can apply, 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 ----------------------------------------------------------------------- -- Perl5 Master Repository