Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -6365,6 +6365,7 @@ t/op/dor.t See if defined-or (//) works
t/op/dump.t See if dump works.
t/op/each.t See if hash iterators work
t/op/each_array.t See if array iterators work
t/op/equ.t See if the equ operator works
t/op/eval.t See if eval operator works
t/op/evalbytes.t See if evalbytes operator works
t/op/exec.t See if exec, system and qx work
Expand Down
7 changes: 4 additions & 3 deletions ext/Opcode/Opcode.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Opcode 1.71;
package Opcode 1.72;

use strict;

Expand Down Expand Up @@ -319,8 +319,9 @@ invert_opset function.
nbit_xor nbit_or sbit_and sbit_xor sbit_or negate i_negate not
complement ncomplement scomplement

lt i_lt gt i_gt le i_le ge i_ge eq i_eq ne i_ne ncmp i_ncmp
slt sgt sle sge seq sne scmp
lt i_lt gt i_gt le i_le ge i_ge eq i_eq ne i_ne
equ i_equ neu i_neu ncmp i_ncmp
slt sgt sle sge seq sne sequ sneu scmp
isa

substr substr_left vec stringify study pos length index
Expand Down
24 changes: 15 additions & 9 deletions gv.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,15 +625,16 @@ S_maybe_add_coresub(pTHX_ HV * const stash, GV *gv,
case KEY_catch : case KEY_class :
case KEY_cmp : case KEY_default : case KEY_defer :
case KEY_do : case KEY_dump : case KEY_else : case KEY_elsif :
case KEY_eq : case KEY_eval : case KEY_field :
case KEY_eq : case KEY_equ : case KEY_eval : case KEY_field :
case KEY_finally:
case KEY_for : case KEY_foreach: case KEY_format: case KEY_ge :
case KEY_given : case KEY_goto : case KEY_grep : case KEY_gt :
case KEY_if : case KEY_isa :
case KEY_last :
case KEY_le : case KEY_local : case KEY_lt : case KEY_m :
case KEY_map : case KEY_method : case KEY_my :
case KEY_ne : case KEY_next : case KEY_no: case KEY_or: case KEY_our:
case KEY_ne : case KEY_neu : case KEY_next : case KEY_no:
case KEY_or : case KEY_our :
case KEY_package: case KEY_print: case KEY_printf:
case KEY_q : case KEY_qq : case KEY_qr : case KEY_qw :
case KEY_qx : case KEY_redo : case KEY_require: case KEY_return:
Expand Down Expand Up @@ -3368,7 +3369,8 @@ Perl_gv_handler(pTHX_ HV *stash, I32 id)
/* Implement tryAMAGICun_MG macro.
Do get magic, then see if the stack arg is overloaded and if so call it.
Flags:
AMGf_numeric apply sv_2num to the stack arg.
AMGf_numeric apply sv_2num to the stack arg.
AMGf_no_GETMAGIC do not call SvGETMAGIC on arguments
*/

bool
Expand All @@ -3380,7 +3382,8 @@ Perl_try_amagic_un(pTHX_ int method, int flags)
SV* const arg = PL_stack_sp[0];
bool is_rc = rpp_stack_is_rc();

SvGETMAGIC(arg);
if (LIKELY(!(flags & AMGf_no_GETMAGIC)))
SvGETMAGIC(arg);

if (SvAMAGIC(arg) && (tmpsv = amagic_call(arg, &PL_sv_undef, method,
AMGf_noright | AMGf_unary
Expand Down Expand Up @@ -3573,8 +3576,9 @@ Perl_amagic_applies(pTHX_ SV *sv, int method, int flags)
Do get magic, then see if the two stack args are overloaded and if so
call it.
Flags:
AMGf_assign op may be called as mutator (eg +=)
AMGf_numeric apply sv_2num to the stack arg.
AMGf_assign op may be called as mutator (eg +=)
AMGf_numeric apply sv_2num to the stack arg.
AMGf_no_GETMAGIC do not call SvGETMAGIC on arguments
*/

bool
Expand All @@ -3586,9 +3590,11 @@ Perl_try_amagic_bin(pTHX_ int method, int flags)
SV* right = PL_stack_sp[0];
bool is_rc = rpp_stack_is_rc();

SvGETMAGIC(left);
if (left != right)
SvGETMAGIC(right);
if (LIKELY(!(flags & AMGf_no_GETMAGIC))) {
SvGETMAGIC(left);
if (left != right)
SvGETMAGIC(right);
}

if (SvAMAGIC(left) || SvAMAGIC(right)) {
SV * tmpsv;
Expand Down
38 changes: 30 additions & 8 deletions keywords.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading