diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-05-12 14:25:44 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-05-29 09:36:25 -0700 |
commit | 89c5c07ef37776cd5a06bc62eaca97cb2091ad3f (patch) | |
tree | ebaafe25f710be6dd0a904abd828a50278b7375f /opcode.h | |
parent | 498a02d80cfca0073bd62ad27aac793a0d5e785c (diff) | |
download | perl-89c5c07ef37776cd5a06bc62eaca97cb2091ad3f.tar.gz |
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.)
Diffstat (limited to 'opcode.h')
-rw-r--r-- | opcode.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1360,7 +1360,7 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */ Perl_ck_spair, /* chomp */ Perl_ck_null, /* schomp */ Perl_ck_defined, /* defined */ - Perl_ck_lfun, /* undef */ + Perl_ck_fun, /* undef */ Perl_ck_fun, /* study */ Perl_ck_lfun, /* pos */ Perl_ck_lfun, /* preinc */ @@ -1746,7 +1746,7 @@ EXTCONST U32 PL_opargs[] = { 0x00002b1d, /* chomp */ 0x00009b9c, /* schomp */ 0x00009b84, /* defined */ - 0x00009b04, /* undef */ + 0x0000fb04, /* undef */ 0x00009b84, /* study */ 0x00009b8c, /* pos */ 0x00001164, /* preinc */ |