From 4d1c8cce52e29ebffc302532e650b8877ede58d2 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Thu, 9 Feb 2023 15:04:11 +1100 Subject: [PATCH] proof of concept/performance test for use float Since I'm more familiar with features, I've implemented this as a feature. At this point there are no new tests. # Conflicts: # ext/Opcode/Opcode.pm # feature.h # lib/B/Op_private.pm # lib/feature.pm # opcode.h # opnames.h # pp_proto.h # regen/feature.pl # regen/opcode.pl --- ext/Opcode/Opcode.pm | 5 +- feature.h | 38 ++- lib/B/Deparse.pm | 22 +- lib/B/Op_private.pm | 8 +- lib/feature.pm | 5 +- op.c | 3 + op.h | 9 +- opcode.h | 790 ++++++++++++++++++++++--------------------- opnames.h | 728 +++++++++++++++++++-------------------- pp.c | 48 +++ pp_proto.h | 4 + regen/feature.pl | 3 +- regen/opcode.pl | 5 +- regen/opcodes | 13 +- 14 files changed, 899 insertions(+), 782 deletions(-) diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm index 5b0092d1bb11..aacfc7c11403 100644 --- a/ext/Opcode/Opcode.pm +++ b/ext/Opcode/Opcode.pm @@ -1,4 +1,4 @@ -package Opcode 1.63; +package Opcode 1.64; use strict; @@ -312,7 +312,8 @@ invert_opset function. preinc i_preinc predec i_predec postinc i_postinc postdec i_postdec int hex oct abs pow multiply i_multiply - divide i_divide modulo i_modulo add i_add subtract i_subtract + f_multiply divide i_divide f_divide modulo i_modulo add i_add + f_add subtract i_subtract f_subtract left_shift right_shift bit_and bit_xor bit_or nbit_and nbit_xor nbit_or sbit_and sbit_xor sbit_or negate i_negate not diff --git a/feature.h b/feature.h index 900a1b990ebc..1828126b79ef 100644 --- a/feature.h +++ b/feature.h @@ -20,19 +20,20 @@ #define FEATURE_EVALBYTES_BIT 0x0020 #define FEATURE_MORE_DELIMS_BIT 0x0040 #define FEATURE_FC_BIT 0x0080 -#define FEATURE_INDIRECT_BIT 0x0100 -#define FEATURE_ISA_BIT 0x0200 -#define FEATURE_MODULE_TRUE_BIT 0x0400 -#define FEATURE_MULTIDIMENSIONAL_BIT 0x0800 -#define FEATURE_POSTDEREF_QQ_BIT 0x1000 -#define FEATURE_REFALIASING_BIT 0x2000 -#define FEATURE_SAY_BIT 0x4000 -#define FEATURE_SIGNATURES_BIT 0x8000 -#define FEATURE_STATE_BIT 0x10000 -#define FEATURE_SWITCH_BIT 0x20000 -#define FEATURE_TRY_BIT 0x40000 -#define FEATURE_UNIEVAL_BIT 0x80000 -#define FEATURE_UNICODE_BIT 0x100000 +#define FEATURE_FLOAT_BIT 0x0100 +#define FEATURE_INDIRECT_BIT 0x0200 +#define FEATURE_ISA_BIT 0x0400 +#define FEATURE_MODULE_TRUE_BIT 0x0800 +#define FEATURE_MULTIDIMENSIONAL_BIT 0x1000 +#define FEATURE_POSTDEREF_QQ_BIT 0x2000 +#define FEATURE_REFALIASING_BIT 0x4000 +#define FEATURE_SAY_BIT 0x8000 +#define FEATURE_SIGNATURES_BIT 0x10000 +#define FEATURE_STATE_BIT 0x20000 +#define FEATURE_SWITCH_BIT 0x40000 +#define FEATURE_TRY_BIT 0x80000 +#define FEATURE_UNIEVAL_BIT 0x100000 +#define FEATURE_UNICODE_BIT 0x200000 #define FEATURE_BUNDLE_DEFAULT 0 #define FEATURE_BUNDLE_510 1 @@ -97,6 +98,12 @@ FEATURE_IS_ENABLED_MASK(FEATURE_DEFER_BIT) \ ) +#define FEATURE_FLOAT_IS_ENABLED \ + ( \ + CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ + FEATURE_IS_ENABLED_MASK(FEATURE_FLOAT_BIT) \ + ) + #define FEATURE_STATE_IS_ENABLED \ ( \ (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_510 && \ @@ -325,6 +332,11 @@ S_magic_sethint_feature(pTHX_ SV *keysv, const char *keypv, STRLEN keylen, mask = FEATURE_FC_BIT; break; } + else if (keylen == sizeof("feature_float")-1 + && memcmp(subf+1, "loat", keylen - sizeof("feature_")) == 0) { + mask = FEATURE_FLOAT_BIT; + break; + } return; case 'i': diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm index 1abd40ccbb8d..3b6abec69f7f 100644 --- a/lib/B/Deparse.pm +++ b/lib/B/Deparse.pm @@ -7,7 +7,7 @@ # This is based on the module of the same name by Malcolm Beattie, # but essentially none of his code remains. -package B::Deparse 1.72; +package B::Deparse 1.73; use strict; use Carp; use B qw(class main_root main_start main_cv svref_2object opnumber perlstring @@ -3000,12 +3000,12 @@ sub assoc_class { # $a + $b + $c is equivalent to ($a + $b) + $c BEGIN { - %left = ('multiply' => 19, 'i_multiply' => 19, - 'divide' => 19, 'i_divide' => 19, + %left = ('multiply' => 19, 'i_multiply' => 19, 'f_multiply' => 19, + 'divide' => 19, 'i_divide' => 19, 'f_divide' => 19, 'modulo' => 19, 'i_modulo' => 19, 'repeat' => 19, - 'add' => 18, 'i_add' => 18, - 'subtract' => 18, 'i_subtract' => 18, + 'add' => 18, 'i_add' => 18, 'f_add' => 18, + 'subtract' => 18, 'i_subtract' => 18, 'f_subtract' => 18, 'concat' => 18, 'left_shift' => 17, 'right_shift' => 17, 'bit_and' => 13, 'nbit_and' => 13, 'sbit_and' => 13, @@ -3035,12 +3035,12 @@ sub deparse_binop_left { BEGIN { %right = ('pow' => 22, 'sassign=' => 7, 'aassign=' => 7, - 'multiply=' => 7, 'i_multiply=' => 7, - 'divide=' => 7, 'i_divide=' => 7, + 'multiply=' => 7, 'i_multiply=' => 7, 'f_multiply=' => 7, + 'divide=' => 7, 'i_divide=' => 7, 'f_divide=' => 7, 'modulo=' => 7, 'i_modulo=' => 7, 'repeat=' => 7, 'refassign' => 7, 'refassign=' => 7, - 'add=' => 7, 'i_add=' => 7, - 'subtract=' => 7, 'i_subtract=' => 7, + 'add=' => 7, 'i_add=' => 7, 'f_add=' => 7, + 'subtract=' => 7, 'i_subtract=' => 7, 'f_subtract=' => 7, 'concat=' => 7, 'left_shift=' => 7, 'right_shift=' => 7, 'bit_and=' => 7, 'sbit_and=' => 7, 'nbit_and=' => 7, @@ -3101,6 +3101,10 @@ sub pp_i_multiply { maybe_targmy(@_, \&binop, "*", 19, ASSIGN) } sub pp_i_subtract { maybe_targmy(@_, \&binop, "-", 18, ASSIGN) } sub pp_i_divide { maybe_targmy(@_, \&binop, "/", 19, ASSIGN) } sub pp_i_modulo { maybe_targmy(@_, \&binop, "%", 19, ASSIGN) } +sub pp_f_add { maybe_targmy(@_, \&binop, "+", 18, ASSIGN) } +sub pp_f_multiply { maybe_targmy(@_, \&binop, "*", 19, ASSIGN) } +sub pp_f_subtract { maybe_targmy(@_, \&binop, "-", 18, ASSIGN) } +sub pp_f_divide { maybe_targmy(@_, \&binop, "/", 19, ASSIGN) } sub pp_pow { maybe_targmy(@_, \&binop, "**", 22, ASSIGN) } sub pp_left_shift { maybe_targmy(@_, \&binop, "<<", 17, ASSIGN) } diff --git a/lib/B/Op_private.pm b/lib/B/Op_private.pm index 173e07b6c6e1..ce96d74b58d7 100644 --- a/lib/B/Op_private.pm +++ b/lib/B/Op_private.pm @@ -149,7 +149,7 @@ $bits{$_}{6} = 'OPpPAD_STATE' for qw(emptyavhv lvavref lvref padav padhv padsv p $bits{$_}{7} = 'OPpPV_IS_UTF8' for qw(dump goto last next redo); $bits{$_}{6} = 'OPpREFCOUNTED' for qw(leave leaveeval leavesub leavesublv leavewrite); $bits{$_}{2} = 'OPpSLICEWARNING' for qw(aslice hslice padav padhv rv2av rv2hv); -$bits{$_}{4} = 'OPpTARGET_MY' for qw(abs add atan2 ceil chdir chmod chomp chown chr chroot concat cos crypt divide emptyavhv exec exp flock floor getpgrp getppid getpriority hex i_add i_divide i_modulo i_multiply i_subtract index int kill left_shift length link log mkdir modulo multiconcat multiply nbit_and nbit_or nbit_xor ncomplement oct ord pow push rand refaddr reftype rename right_shift rindex rmdir schomp scomplement setpgrp setpriority sin sleep sqrt srand stringify subtract symlink system time undef unlink unshift utime wait waitpid); +$bits{$_}{4} = 'OPpTARGET_MY' for qw(abs add atan2 ceil chdir chmod chomp chown chr chroot concat cos crypt divide emptyavhv exec exp f_add f_divide f_multiply f_subtract flock floor getpgrp getppid getpriority hex i_add i_divide i_modulo i_multiply i_subtract index int kill left_shift length link log mkdir modulo multiconcat multiply nbit_and nbit_or nbit_xor ncomplement oct ord pow push rand refaddr reftype rename right_shift rindex rmdir schomp scomplement setpgrp setpriority sin sleep sqrt srand stringify subtract symlink system time undef unlink unshift utime wait waitpid); $bits{$_}{0} = 'OPpTRANS_CAN_FORCE_UTF8' for qw(trans transr); $bits{$_}{5} = 'OPpTRANS_COMPLEMENT' for qw(trans transr); $bits{$_}{7} = 'OPpTRANS_DELETE' for qw(trans transr); @@ -321,6 +321,10 @@ $bits{enterwhen}{0} = $bf[0]; @{$bits{exists}}{6,0} = ('OPpEXISTS_SUB', $bf[0]); @{$bits{exit}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]); $bits{exp}{0} = $bf[0]; +@{$bits{f_add}}{1,0} = ($bf[1], $bf[1]); +@{$bits{f_divide}}{1,0} = ($bf[1], $bf[1]); +@{$bits{f_multiply}}{1,0} = ($bf[1], $bf[1]); +@{$bits{f_subtract}}{1,0} = ($bf[1], $bf[1]); $bits{fc}{0} = $bf[0]; @{$bits{fcntl}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]); @{$bits{fileno}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]); @@ -867,7 +871,7 @@ our %ops_using = ( OPpSORT_DESCEND => [qw(sort)], OPpSPLIT_ASSIGN => [qw(split)], OPpSUBSTR_REPL_FIRST => [qw(substr)], - OPpTARGET_MY => [qw(abs add atan2 ceil chdir chmod chomp chown chr chroot concat cos crypt divide emptyavhv exec exp flock floor getpgrp getppid getpriority hex i_add i_divide i_modulo i_multiply i_subtract index int kill left_shift length link log mkdir modulo multiconcat multiply nbit_and nbit_or nbit_xor ncomplement oct ord pow push rand refaddr reftype rename right_shift rindex rmdir schomp scomplement setpgrp setpriority sin sleep sqrt srand stringify subtract symlink system time undef unlink unshift utime wait waitpid)], + OPpTARGET_MY => [qw(abs add atan2 ceil chdir chmod chomp chown chr chroot concat cos crypt divide emptyavhv exec exp f_add f_divide f_multiply f_subtract flock floor getpgrp getppid getpriority hex i_add i_divide i_modulo i_multiply i_subtract index int kill left_shift length link log mkdir modulo multiconcat multiply nbit_and nbit_or nbit_xor ncomplement oct ord pow push rand refaddr reftype rename right_shift rindex rmdir schomp scomplement setpgrp setpriority sin sleep sqrt srand stringify subtract symlink system time undef unlink unshift utime wait waitpid)], OPpTRANS_CAN_FORCE_UTF8 => [qw(trans transr)], OPpTRUEBOOL => [qw(blessed grepwhile index length padav padhv pos ref rindex rv2av rv2hv subst)], OPpUNDEF_KEEP_PV => [qw(undef)], diff --git a/lib/feature.pm b/lib/feature.pm index 312c07772185..798d3fa8b8ab 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -4,7 +4,7 @@ # Any changes made here will be lost! package feature; -our $VERSION = '1.79'; +our $VERSION = '1.80'; our %feature = ( fc => 'feature_fc', @@ -12,6 +12,7 @@ our %feature = ( say => 'feature_say', try => 'feature_try', defer => 'feature_defer', + float => 'feature_float', state => 'feature_state', switch => 'feature_switch', bitwise => 'feature_bitwise', @@ -38,7 +39,7 @@ our %feature_bundle = ( "5.27" => [qw(bareword_filehandles bitwise current_sub evalbytes fc indirect multidimensional postderef_qq say state switch unicode_eval unicode_strings)], "5.35" => [qw(bareword_filehandles bitwise current_sub evalbytes fc isa postderef_qq say signatures state unicode_eval unicode_strings)], "5.37" => [qw(bitwise current_sub evalbytes fc isa module_true postderef_qq say signatures state unicode_eval unicode_strings)], - "all" => [qw(bareword_filehandles bitwise current_sub declared_refs defer evalbytes extra_paired_delimiters fc indirect isa module_true multidimensional postderef_qq refaliasing say signatures state switch try unicode_eval unicode_strings)], + "all" => [qw(bareword_filehandles bitwise current_sub declared_refs defer evalbytes extra_paired_delimiters fc float indirect isa module_true multidimensional postderef_qq refaliasing say signatures state switch try unicode_eval unicode_strings)], "default" => [qw(bareword_filehandles indirect multidimensional)], ); diff --git a/op.c b/op.c index d807c6f8b2f9..cf5569ea0a94 100644 --- a/op.c +++ b/op.c @@ -4791,6 +4791,9 @@ S_op_integerize(pTHX_ OP *o) { o->op_ppaddr = PL_ppaddr[++(o->op_type)]; } + else if ((PL_opargs[type] & OA_OTHERFLOAT) && FEATURE_FLOAT_IS_ENABLED) { + o->op_ppaddr = PL_ppaddr[o->op_type += 2]; + } if (type == OP_NEGATE) /* XXX might want a ck_negate() for this */ diff --git a/op.h b/op.h index eca5fa03a657..3224c3f5b694 100644 --- a/op.h +++ b/op.h @@ -578,9 +578,10 @@ typedef enum { #define OA_OTHERINT 32 #define OA_DANGEROUS 64 #define OA_DEFGV 128 +#define OA_OTHERFLOAT 256 -/* The next 4 bits (8..11) encode op class information */ -#define OCSHIFT 8 +/* The next 4 bits (9..12) encode op class information */ +#define OCSHIFT 9 #define OA_CLASS_MASK (15 << OCSHIFT) @@ -601,9 +602,9 @@ typedef enum { #define OA_METHOP (14 << OCSHIFT) #define OA_UNOP_AUX (15 << OCSHIFT) -/* Each remaining nybble of PL_opargs (i.e. bits 12..15, 16..19 etc) +/* Each remaining nybble of PL_opargs (i.e. bits 13..16, 17..20 etc) * encode the type for each arg */ -#define OASHIFT 12 +#define OASHIFT 13 #define OA_SCALAR 1 #define OA_LIST 2 diff --git a/opcode.h b/opcode.h index 200c2e54218b..466f24d6f22d 100644 --- a/opcode.h +++ b/opcode.h @@ -204,15 +204,19 @@ EXTCONST char* const PL_op_name[] INIT({ [OP_POW] = "pow", [OP_MULTIPLY] = "multiply", [OP_I_MULTIPLY] = "i_multiply", + [OP_F_MULTIPLY] = "f_multiply", [OP_DIVIDE] = "divide", [OP_I_DIVIDE] = "i_divide", + [OP_F_DIVIDE] = "f_divide", [OP_MODULO] = "modulo", [OP_I_MODULO] = "i_modulo", [OP_REPEAT] = "repeat", [OP_ADD] = "add", [OP_I_ADD] = "i_add", + [OP_F_ADD] = "f_add", [OP_SUBTRACT] = "subtract", [OP_I_SUBTRACT] = "i_subtract", + [OP_F_SUBTRACT] = "f_subtract", [OP_CONCAT] = "concat", [OP_MULTICONCAT] = "multiconcat", [OP_STRINGIFY] = "stringify", @@ -627,15 +631,19 @@ EXTCONST char* const PL_op_desc[] INIT({ [OP_POW] = "exponentiation (**)", [OP_MULTIPLY] = "multiplication (*)", [OP_I_MULTIPLY] = "integer multiplication (*)", + [OP_F_MULTIPLY] = "float multiplication (*)", [OP_DIVIDE] = "division (/)", [OP_I_DIVIDE] = "integer division (/)", + [OP_F_DIVIDE] = "float division (/)", [OP_MODULO] = "modulus (%)", [OP_I_MODULO] = "integer modulus (%)", [OP_REPEAT] = "repeat (x)", [OP_ADD] = "addition (+)", [OP_I_ADD] = "integer addition (+)", + [OP_F_ADD] = "float addition (+)", [OP_SUBTRACT] = "subtraction (-)", [OP_I_SUBTRACT] = "integer subtraction (-)", + [OP_F_SUBTRACT] = "float subtraction (-)", [OP_CONCAT] = "concatenation (.) or string", [OP_MULTICONCAT] = "concatenation (.) or string", [OP_STRINGIFY] = "string", @@ -1055,15 +1063,19 @@ INIT({ [OP_POW] = Perl_pp_pow, [OP_MULTIPLY] = Perl_pp_multiply, [OP_I_MULTIPLY] = Perl_pp_i_multiply, + [OP_F_MULTIPLY] = Perl_pp_f_multiply, [OP_DIVIDE] = Perl_pp_divide, [OP_I_DIVIDE] = Perl_pp_i_divide, + [OP_F_DIVIDE] = Perl_pp_f_divide, [OP_MODULO] = Perl_pp_modulo, [OP_I_MODULO] = Perl_pp_i_modulo, [OP_REPEAT] = Perl_pp_repeat, [OP_ADD] = Perl_pp_add, [OP_I_ADD] = Perl_pp_i_add, + [OP_F_ADD] = Perl_pp_f_add, [OP_SUBTRACT] = Perl_pp_subtract, [OP_I_SUBTRACT] = Perl_pp_i_subtract, + [OP_F_SUBTRACT] = Perl_pp_f_subtract, [OP_CONCAT] = Perl_pp_concat, [OP_MULTICONCAT] = Perl_pp_multiconcat, [OP_STRINGIFY] = Perl_pp_stringify, @@ -1478,15 +1490,19 @@ INIT({ [OP_POW] = Perl_ck_null, [OP_MULTIPLY] = Perl_ck_null, [OP_I_MULTIPLY] = Perl_ck_null, + [OP_F_MULTIPLY] = Perl_ck_null, [OP_DIVIDE] = Perl_ck_null, [OP_I_DIVIDE] = Perl_ck_null, + [OP_F_DIVIDE] = Perl_ck_null, [OP_MODULO] = Perl_ck_null, [OP_I_MODULO] = Perl_ck_null, [OP_REPEAT] = Perl_ck_repeat, [OP_ADD] = Perl_ck_null, [OP_I_ADD] = Perl_ck_null, + [OP_F_ADD] = Perl_ck_null, [OP_SUBTRACT] = Perl_ck_null, [OP_I_SUBTRACT] = Perl_ck_null, + [OP_F_SUBTRACT] = Perl_ck_null, [OP_CONCAT] = Perl_ck_concat, [OP_MULTICONCAT] = Perl_ck_null, [OP_STRINGIFY] = Perl_ck_stringify, @@ -1844,423 +1860,427 @@ INIT({ EXTCONST U32 PL_opargs[] INIT({ [OP_NULL] = 0x00000000, [OP_STUB] = 0x00000000, - [OP_SCALAR] = 0x00001b04, + [OP_SCALAR] = 0x00003604, [OP_PUSHMARK] = 0x00000004, [OP_WANTARRAY] = 0x00000004, - [OP_CONST] = 0x00000604, - [OP_GVSV] = 0x00000644, - [OP_GV] = 0x00000644, - [OP_GELEM] = 0x00011244, + [OP_CONST] = 0x00000c04, + [OP_GVSV] = 0x00000c44, + [OP_GV] = 0x00000c44, + [OP_GELEM] = 0x00022444, [OP_PADSV] = 0x00000044, - [OP_PADSV_STORE] = 0x00011104, + [OP_PADSV_STORE] = 0x00022204, [OP_PADAV] = 0x00000040, [OP_PADHV] = 0x00000040, [OP_PADANY] = 0x00000040, - [OP_RV2GV] = 0x00000144, - [OP_RV2SV] = 0x00000144, - [OP_AV2ARYLEN] = 0x00000104, - [OP_RV2CV] = 0x00000140, - [OP_ANONCODE] = 0x00000604, - [OP_PROTOTYPE] = 0x00009b84, - [OP_REFGEN] = 0x00002101, - [OP_SREFGEN] = 0x00001106, - [OP_REF] = 0x00009b8c, - [OP_BLESS] = 0x00091404, - [OP_BACKTICK] = 0x00009b88, - [OP_GLOB] = 0x00009408, - [OP_READLINE] = 0x0000eb08, - [OP_RCATLINE] = 0x00000608, - [OP_REGCMAYBE] = 0x00001104, - [OP_REGCRESET] = 0x00001104, - [OP_REGCOMP] = 0x00001304, - [OP_MATCH] = 0x00000500, - [OP_QR] = 0x00000504, - [OP_SUBST] = 0x00001504, - [OP_SUBSTCONT] = 0x00000304, - [OP_TRANS] = 0x00001804, - [OP_TRANSR] = 0x00001804, - [OP_SASSIGN] = 0x00011204, - [OP_AASSIGN] = 0x00022208, - [OP_CHOP] = 0x00002b0d, - [OP_SCHOP] = 0x00009b8c, - [OP_CHOMP] = 0x00002b1d, - [OP_SCHOMP] = 0x00009b9c, - [OP_DEFINED] = 0x00009b84, - [OP_UNDEF] = 0x0000fb04, - [OP_STUDY] = 0x00009b84, - [OP_POS] = 0x0000fb8c, - [OP_PREINC] = 0x00001164, - [OP_I_PREINC] = 0x00001144, - [OP_PREDEC] = 0x00001164, - [OP_I_PREDEC] = 0x00001144, - [OP_POSTINC] = 0x0000112c, - [OP_I_POSTINC] = 0x0000110c, - [OP_POSTDEC] = 0x0000112c, - [OP_I_POSTDEC] = 0x0000110c, - [OP_POW] = 0x0001121e, - [OP_MULTIPLY] = 0x0001123e, - [OP_I_MULTIPLY] = 0x0001121e, - [OP_DIVIDE] = 0x0001123e, - [OP_I_DIVIDE] = 0x0001121e, - [OP_MODULO] = 0x0001123e, - [OP_I_MODULO] = 0x0001121e, - [OP_REPEAT] = 0x0001220b, - [OP_ADD] = 0x0001123e, - [OP_I_ADD] = 0x0001121e, - [OP_SUBTRACT] = 0x0001123e, - [OP_I_SUBTRACT] = 0x0001121e, - [OP_CONCAT] = 0x0001121e, - [OP_MULTICONCAT] = 0x00000f1c, - [OP_STRINGIFY] = 0x0000141e, - [OP_LEFT_SHIFT] = 0x0001121e, - [OP_RIGHT_SHIFT] = 0x0001121e, - [OP_LT] = 0x00011226, - [OP_I_LT] = 0x00011206, - [OP_GT] = 0x00011226, - [OP_I_GT] = 0x00011206, - [OP_LE] = 0x00011226, - [OP_I_LE] = 0x00011206, - [OP_GE] = 0x00011226, - [OP_I_GE] = 0x00011206, - [OP_EQ] = 0x00011226, - [OP_I_EQ] = 0x00011206, - [OP_NE] = 0x00011226, - [OP_I_NE] = 0x00011206, - [OP_NCMP] = 0x0001122e, - [OP_I_NCMP] = 0x0001120e, - [OP_SLT] = 0x00011206, - [OP_SGT] = 0x00011206, - [OP_SLE] = 0x00011206, - [OP_SGE] = 0x00011206, - [OP_SEQ] = 0x00011206, - [OP_SNE] = 0x00011206, - [OP_SCMP] = 0x0001120e, - [OP_BIT_AND] = 0x0001120e, - [OP_BIT_XOR] = 0x0001120e, - [OP_BIT_OR] = 0x0001120e, - [OP_NBIT_AND] = 0x0001121e, - [OP_NBIT_XOR] = 0x0001121e, - [OP_NBIT_OR] = 0x0001121e, - [OP_SBIT_AND] = 0x0001120e, - [OP_SBIT_XOR] = 0x0001120e, - [OP_SBIT_OR] = 0x0001120e, - [OP_NEGATE] = 0x0000112e, - [OP_I_NEGATE] = 0x0000110e, - [OP_NOT] = 0x00001106, - [OP_COMPLEMENT] = 0x0000110e, - [OP_NCOMPLEMENT] = 0x0000111e, - [OP_SCOMPLEMENT] = 0x0000111e, - [OP_SMARTMATCH] = 0x00000204, - [OP_ATAN2] = 0x0001141e, - [OP_SIN] = 0x00009b9e, - [OP_COS] = 0x00009b9e, - [OP_RAND] = 0x00009b1c, - [OP_SRAND] = 0x00009b1c, - [OP_EXP] = 0x00009b9e, - [OP_LOG] = 0x00009b9e, - [OP_SQRT] = 0x00009b9e, - [OP_INT] = 0x00009b9e, - [OP_HEX] = 0x00009b9e, - [OP_OCT] = 0x00009b9e, - [OP_ABS] = 0x00009b9e, - [OP_LENGTH] = 0x00009b9e, - [OP_SUBSTR] = 0x0991140c, - [OP_VEC] = 0x0011140c, - [OP_INDEX] = 0x0091141c, - [OP_RINDEX] = 0x0091141c, - [OP_SPRINTF] = 0x0002140f, - [OP_FORMLINE] = 0x00021405, - [OP_ORD] = 0x00009b9e, - [OP_CHR] = 0x00009b9e, - [OP_CRYPT] = 0x0001141e, - [OP_UCFIRST] = 0x00009b8e, - [OP_LCFIRST] = 0x00009b8e, - [OP_UC] = 0x00009b8e, - [OP_LC] = 0x00009b8e, - [OP_QUOTEMETA] = 0x00009b8e, - [OP_RV2AV] = 0x00000148, - [OP_AELEMFAST] = 0x00013644, - [OP_AELEMFAST_LEX] = 0x00013040, - [OP_AELEMFASTLEX_STORE] = 0x00013140, - [OP_AELEM] = 0x00013204, - [OP_ASLICE] = 0x00023401, - [OP_KVASLICE] = 0x00023401, - [OP_AEACH] = 0x00003b40, - [OP_AVALUES] = 0x00003b48, - [OP_AKEYS] = 0x00003b08, - [OP_EACH] = 0x00004b40, - [OP_VALUES] = 0x00004b48, - [OP_KEYS] = 0x00004b08, - [OP_DELETE] = 0x00001b00, - [OP_EXISTS] = 0x00001b04, - [OP_RV2HV] = 0x00000148, - [OP_HELEM] = 0x00014204, - [OP_HSLICE] = 0x00024401, - [OP_KVHSLICE] = 0x00024401, - [OP_MULTIDEREF] = 0x00000f44, - [OP_UNPACK] = 0x00091480, - [OP_PACK] = 0x0002140f, - [OP_SPLIT] = 0x00111508, - [OP_JOIN] = 0x0002140f, - [OP_LIST] = 0x00002401, - [OP_LSLICE] = 0x00224200, - [OP_ANONLIST] = 0x00002405, - [OP_ANONHASH] = 0x00002405, - [OP_EMPTYAVHV] = 0x0000241c, - [OP_SPLICE] = 0x02993401, - [OP_PUSH] = 0x0002341d, - [OP_POP] = 0x0000bb04, - [OP_SHIFT] = 0x0000bb04, - [OP_UNSHIFT] = 0x0002341d, - [OP_SORT] = 0x0002d401, - [OP_REVERSE] = 0x00002409, - [OP_GREPSTART] = 0x00025401, - [OP_GREPWHILE] = 0x00000308, - [OP_MAPSTART] = 0x00025401, - [OP_MAPWHILE] = 0x00000308, - [OP_RANGE] = 0x00011300, - [OP_FLIP] = 0x00011100, - [OP_FLOP] = 0x00000100, - [OP_AND] = 0x00000300, - [OP_OR] = 0x00000300, - [OP_XOR] = 0x00011206, - [OP_DOR] = 0x00000300, - [OP_COND_EXPR] = 0x00000300, - [OP_ANDASSIGN] = 0x00000304, - [OP_ORASSIGN] = 0x00000304, - [OP_DORASSIGN] = 0x00000304, - [OP_ENTERSUB] = 0x00002141, - [OP_LEAVESUB] = 0x00000100, - [OP_LEAVESUBLV] = 0x00000100, - [OP_ARGCHECK] = 0x00000f00, - [OP_ARGELEM] = 0x00000f00, - [OP_ARGDEFELEM] = 0x00000300, - [OP_CALLER] = 0x00009b08, - [OP_WARN] = 0x0000240d, - [OP_DIE] = 0x0000240d, - [OP_RESET] = 0x00009b04, - [OP_LINESEQ] = 0x00000400, - [OP_NEXTSTATE] = 0x00000a04, - [OP_DBSTATE] = 0x00000a04, + [OP_RV2GV] = 0x00000244, + [OP_RV2SV] = 0x00000244, + [OP_AV2ARYLEN] = 0x00000204, + [OP_RV2CV] = 0x00000240, + [OP_ANONCODE] = 0x00000c04, + [OP_PROTOTYPE] = 0x00013684, + [OP_REFGEN] = 0x00004201, + [OP_SREFGEN] = 0x00002206, + [OP_REF] = 0x0001368c, + [OP_BLESS] = 0x00122804, + [OP_BACKTICK] = 0x00013688, + [OP_GLOB] = 0x00012808, + [OP_READLINE] = 0x0001d608, + [OP_RCATLINE] = 0x00000c08, + [OP_REGCMAYBE] = 0x00002204, + [OP_REGCRESET] = 0x00002204, + [OP_REGCOMP] = 0x00002604, + [OP_MATCH] = 0x00000a00, + [OP_QR] = 0x00000a04, + [OP_SUBST] = 0x00002a04, + [OP_SUBSTCONT] = 0x00000604, + [OP_TRANS] = 0x00003004, + [OP_TRANSR] = 0x00003004, + [OP_SASSIGN] = 0x00022404, + [OP_AASSIGN] = 0x00044408, + [OP_CHOP] = 0x0000560d, + [OP_SCHOP] = 0x0001368c, + [OP_CHOMP] = 0x0000561d, + [OP_SCHOMP] = 0x0001369c, + [OP_DEFINED] = 0x00013684, + [OP_UNDEF] = 0x0001f604, + [OP_STUDY] = 0x00013684, + [OP_POS] = 0x0001f68c, + [OP_PREINC] = 0x00002264, + [OP_I_PREINC] = 0x00002244, + [OP_PREDEC] = 0x00002264, + [OP_I_PREDEC] = 0x00002244, + [OP_POSTINC] = 0x0000222c, + [OP_I_POSTINC] = 0x0000220c, + [OP_POSTDEC] = 0x0000222c, + [OP_I_POSTDEC] = 0x0000220c, + [OP_POW] = 0x0002241e, + [OP_MULTIPLY] = 0x0002253e, + [OP_I_MULTIPLY] = 0x0002241e, + [OP_F_MULTIPLY] = 0x0002241e, + [OP_DIVIDE] = 0x0002253e, + [OP_I_DIVIDE] = 0x0002241e, + [OP_F_DIVIDE] = 0x0002241e, + [OP_MODULO] = 0x0002243e, + [OP_I_MODULO] = 0x0002241e, + [OP_REPEAT] = 0x0002440b, + [OP_ADD] = 0x0002253e, + [OP_I_ADD] = 0x0002241e, + [OP_F_ADD] = 0x0002241e, + [OP_SUBTRACT] = 0x0002253e, + [OP_I_SUBTRACT] = 0x0002241e, + [OP_F_SUBTRACT] = 0x0002241e, + [OP_CONCAT] = 0x0002241e, + [OP_MULTICONCAT] = 0x00001e1c, + [OP_STRINGIFY] = 0x0000281e, + [OP_LEFT_SHIFT] = 0x0002241e, + [OP_RIGHT_SHIFT] = 0x0002241e, + [OP_LT] = 0x00022426, + [OP_I_LT] = 0x00022406, + [OP_GT] = 0x00022426, + [OP_I_GT] = 0x00022406, + [OP_LE] = 0x00022426, + [OP_I_LE] = 0x00022406, + [OP_GE] = 0x00022426, + [OP_I_GE] = 0x00022406, + [OP_EQ] = 0x00022426, + [OP_I_EQ] = 0x00022406, + [OP_NE] = 0x00022426, + [OP_I_NE] = 0x00022406, + [OP_NCMP] = 0x0002242e, + [OP_I_NCMP] = 0x0002240e, + [OP_SLT] = 0x00022406, + [OP_SGT] = 0x00022406, + [OP_SLE] = 0x00022406, + [OP_SGE] = 0x00022406, + [OP_SEQ] = 0x00022406, + [OP_SNE] = 0x00022406, + [OP_SCMP] = 0x0002240e, + [OP_BIT_AND] = 0x0002240e, + [OP_BIT_XOR] = 0x0002240e, + [OP_BIT_OR] = 0x0002240e, + [OP_NBIT_AND] = 0x0002241e, + [OP_NBIT_XOR] = 0x0002241e, + [OP_NBIT_OR] = 0x0002241e, + [OP_SBIT_AND] = 0x0002240e, + [OP_SBIT_XOR] = 0x0002240e, + [OP_SBIT_OR] = 0x0002240e, + [OP_NEGATE] = 0x0000222e, + [OP_I_NEGATE] = 0x0000220e, + [OP_NOT] = 0x00002206, + [OP_COMPLEMENT] = 0x0000220e, + [OP_NCOMPLEMENT] = 0x0000221e, + [OP_SCOMPLEMENT] = 0x0000221e, + [OP_SMARTMATCH] = 0x00000404, + [OP_ATAN2] = 0x0002281e, + [OP_SIN] = 0x0001369e, + [OP_COS] = 0x0001369e, + [OP_RAND] = 0x0001361c, + [OP_SRAND] = 0x0001361c, + [OP_EXP] = 0x0001369e, + [OP_LOG] = 0x0001369e, + [OP_SQRT] = 0x0001369e, + [OP_INT] = 0x0001369e, + [OP_HEX] = 0x0001369e, + [OP_OCT] = 0x0001369e, + [OP_ABS] = 0x0001369e, + [OP_LENGTH] = 0x0001369e, + [OP_SUBSTR] = 0x1322280c, + [OP_VEC] = 0x0022280c, + [OP_INDEX] = 0x0122281c, + [OP_RINDEX] = 0x0122281c, + [OP_SPRINTF] = 0x0004280f, + [OP_FORMLINE] = 0x00042805, + [OP_ORD] = 0x0001369e, + [OP_CHR] = 0x0001369e, + [OP_CRYPT] = 0x0002281e, + [OP_UCFIRST] = 0x0001368e, + [OP_LCFIRST] = 0x0001368e, + [OP_UC] = 0x0001368e, + [OP_LC] = 0x0001368e, + [OP_QUOTEMETA] = 0x0001368e, + [OP_RV2AV] = 0x00000248, + [OP_AELEMFAST] = 0x00026c44, + [OP_AELEMFAST_LEX] = 0x00026040, + [OP_AELEMFASTLEX_STORE] = 0x00026240, + [OP_AELEM] = 0x00026404, + [OP_ASLICE] = 0x00046801, + [OP_KVASLICE] = 0x00046801, + [OP_AEACH] = 0x00007640, + [OP_AVALUES] = 0x00007648, + [OP_AKEYS] = 0x00007608, + [OP_EACH] = 0x00009640, + [OP_VALUES] = 0x00009648, + [OP_KEYS] = 0x00009608, + [OP_DELETE] = 0x00003600, + [OP_EXISTS] = 0x00003604, + [OP_RV2HV] = 0x00000248, + [OP_HELEM] = 0x00028404, + [OP_HSLICE] = 0x00048801, + [OP_KVHSLICE] = 0x00048801, + [OP_MULTIDEREF] = 0x00001e44, + [OP_UNPACK] = 0x00122880, + [OP_PACK] = 0x0004280f, + [OP_SPLIT] = 0x00222a08, + [OP_JOIN] = 0x0004280f, + [OP_LIST] = 0x00004801, + [OP_LSLICE] = 0x00448400, + [OP_ANONLIST] = 0x00004805, + [OP_ANONHASH] = 0x00004805, + [OP_EMPTYAVHV] = 0x0000481c, + [OP_SPLICE] = 0x05326801, + [OP_PUSH] = 0x0004681d, + [OP_POP] = 0x00017604, + [OP_SHIFT] = 0x00017604, + [OP_UNSHIFT] = 0x0004681d, + [OP_SORT] = 0x0005a801, + [OP_REVERSE] = 0x00004809, + [OP_GREPSTART] = 0x0004a801, + [OP_GREPWHILE] = 0x00000608, + [OP_MAPSTART] = 0x0004a801, + [OP_MAPWHILE] = 0x00000608, + [OP_RANGE] = 0x00022600, + [OP_FLIP] = 0x00022200, + [OP_FLOP] = 0x00000200, + [OP_AND] = 0x00000600, + [OP_OR] = 0x00000600, + [OP_XOR] = 0x00022406, + [OP_DOR] = 0x00000600, + [OP_COND_EXPR] = 0x00000600, + [OP_ANDASSIGN] = 0x00000604, + [OP_ORASSIGN] = 0x00000604, + [OP_DORASSIGN] = 0x00000604, + [OP_ENTERSUB] = 0x00004241, + [OP_LEAVESUB] = 0x00000200, + [OP_LEAVESUBLV] = 0x00000200, + [OP_ARGCHECK] = 0x00001e00, + [OP_ARGELEM] = 0x00001e00, + [OP_ARGDEFELEM] = 0x00000600, + [OP_CALLER] = 0x00013608, + [OP_WARN] = 0x0000480d, + [OP_DIE] = 0x0000480d, + [OP_RESET] = 0x00013604, + [OP_LINESEQ] = 0x00000800, + [OP_NEXTSTATE] = 0x00001404, + [OP_DBSTATE] = 0x00001404, [OP_UNSTACK] = 0x00000004, [OP_ENTER] = 0x00000000, - [OP_LEAVE] = 0x00000400, - [OP_SCOPE] = 0x00000400, - [OP_ENTERITER] = 0x00000940, + [OP_LEAVE] = 0x00000800, + [OP_SCOPE] = 0x00000800, + [OP_ENTERITER] = 0x00001240, [OP_ITER] = 0x00000000, - [OP_ENTERLOOP] = 0x00000940, - [OP_LEAVELOOP] = 0x00000200, - [OP_RETURN] = 0x00002401, - [OP_LAST] = 0x00000d04, - [OP_NEXT] = 0x00000d04, - [OP_REDO] = 0x00000d04, - [OP_DUMP] = 0x00000d44, - [OP_GOTO] = 0x00000d04, - [OP_EXIT] = 0x00009b04, - [OP_METHOD] = 0x00000e40, - [OP_METHOD_NAMED] = 0x00000e40, - [OP_METHOD_SUPER] = 0x00000e40, - [OP_METHOD_REDIR] = 0x00000e40, - [OP_METHOD_REDIR_SUPER] = 0x00000e40, - [OP_ENTERGIVEN] = 0x00000340, - [OP_LEAVEGIVEN] = 0x00000100, - [OP_ENTERWHEN] = 0x00000340, - [OP_LEAVEWHEN] = 0x00000100, + [OP_ENTERLOOP] = 0x00001240, + [OP_LEAVELOOP] = 0x00000400, + [OP_RETURN] = 0x00004801, + [OP_LAST] = 0x00001a04, + [OP_NEXT] = 0x00001a04, + [OP_REDO] = 0x00001a04, + [OP_DUMP] = 0x00001a44, + [OP_GOTO] = 0x00001a04, + [OP_EXIT] = 0x00013604, + [OP_METHOD] = 0x00001c40, + [OP_METHOD_NAMED] = 0x00001c40, + [OP_METHOD_SUPER] = 0x00001c40, + [OP_METHOD_REDIR] = 0x00001c40, + [OP_METHOD_REDIR_SUPER] = 0x00001c40, + [OP_ENTERGIVEN] = 0x00000640, + [OP_LEAVEGIVEN] = 0x00000200, + [OP_ENTERWHEN] = 0x00000640, + [OP_LEAVEWHEN] = 0x00000200, [OP_BREAK] = 0x00000000, [OP_CONTINUE] = 0x00000000, - [OP_OPEN] = 0x0029640d, - [OP_CLOSE] = 0x0000eb04, - [OP_PIPE_OP] = 0x00066404, - [OP_FILENO] = 0x00006b0c, - [OP_UMASK] = 0x00009b0c, - [OP_BINMODE] = 0x00096404, - [OP_TIE] = 0x00217445, - [OP_UNTIE] = 0x00007b04, - [OP_TIED] = 0x00007b44, - [OP_DBMOPEN] = 0x00114404, - [OP_DBMCLOSE] = 0x00004b04, - [OP_SSELECT] = 0x01111408, - [OP_SELECT] = 0x0000e40c, - [OP_GETC] = 0x0000eb0c, - [OP_READ] = 0x0917640d, - [OP_ENTERWRITE] = 0x0000eb04, - [OP_LEAVEWRITE] = 0x00000100, - [OP_PRTF] = 0x0002e405, - [OP_PRINT] = 0x0002e405, - [OP_SAY] = 0x0002e405, - [OP_SYSOPEN] = 0x09116404, - [OP_SYSSEEK] = 0x00116404, - [OP_SYSREAD] = 0x0917640d, - [OP_SYSWRITE] = 0x0991640d, - [OP_EOF] = 0x0000eb04, - [OP_TELL] = 0x0000eb0c, - [OP_SEEK] = 0x00116404, - [OP_TRUNCATE] = 0x00011404, - [OP_FCNTL] = 0x0011640c, - [OP_IOCTL] = 0x0011640c, - [OP_FLOCK] = 0x0001641c, - [OP_SEND] = 0x0911640d, - [OP_RECV] = 0x0117640d, - [OP_SOCKET] = 0x01116404, - [OP_SOCKPAIR] = 0x11166404, - [OP_BIND] = 0x00016404, - [OP_CONNECT] = 0x00016404, - [OP_LISTEN] = 0x00016404, - [OP_ACCEPT] = 0x0006640c, - [OP_SHUTDOWN] = 0x0001640c, - [OP_GSOCKOPT] = 0x00116404, - [OP_SSOCKOPT] = 0x01116404, - [OP_GETSOCKNAME] = 0x00006b04, - [OP_GETPEERNAME] = 0x00006b04, - [OP_LSTAT] = 0x0000ec80, - [OP_STAT] = 0x0000ec80, - [OP_FTRREAD] = 0x00006c84, - [OP_FTRWRITE] = 0x00006c84, - [OP_FTREXEC] = 0x00006c84, - [OP_FTEREAD] = 0x00006c84, - [OP_FTEWRITE] = 0x00006c84, - [OP_FTEEXEC] = 0x00006c84, - [OP_FTIS] = 0x00006c84, - [OP_FTSIZE] = 0x00006c8c, - [OP_FTMTIME] = 0x00006c8c, - [OP_FTATIME] = 0x00006c8c, - [OP_FTCTIME] = 0x00006c8c, - [OP_FTROWNED] = 0x00006c84, - [OP_FTEOWNED] = 0x00006c84, - [OP_FTZERO] = 0x00006c84, - [OP_FTSOCK] = 0x00006c84, - [OP_FTCHR] = 0x00006c84, - [OP_FTBLK] = 0x00006c84, - [OP_FTFILE] = 0x00006c84, - [OP_FTDIR] = 0x00006c84, - [OP_FTPIPE] = 0x00006c84, - [OP_FTSUID] = 0x00006c84, - [OP_FTSGID] = 0x00006c84, - [OP_FTSVTX] = 0x00006c84, - [OP_FTLINK] = 0x00006c84, - [OP_FTTTY] = 0x00006c04, - [OP_FTTEXT] = 0x00006c84, - [OP_FTBINARY] = 0x00006c84, - [OP_CHDIR] = 0x00009b1c, - [OP_CHOWN] = 0x0000241d, - [OP_CHROOT] = 0x00009b9c, - [OP_UNLINK] = 0x0000249d, - [OP_CHMOD] = 0x0000241d, - [OP_UTIME] = 0x0000241d, - [OP_RENAME] = 0x0001141c, - [OP_LINK] = 0x0001141c, - [OP_SYMLINK] = 0x0001141c, - [OP_READLINK] = 0x00009b8c, - [OP_MKDIR] = 0x0009949c, - [OP_RMDIR] = 0x00009b9c, - [OP_OPEN_DIR] = 0x00016404, - [OP_READDIR] = 0x00006b00, - [OP_TELLDIR] = 0x00006b0c, - [OP_SEEKDIR] = 0x00016404, - [OP_REWINDDIR] = 0x00006b04, - [OP_CLOSEDIR] = 0x00006b04, + [OP_OPEN] = 0x0052c80d, + [OP_CLOSE] = 0x0001d604, + [OP_PIPE_OP] = 0x000cc804, + [OP_FILENO] = 0x0000d60c, + [OP_UMASK] = 0x0001360c, + [OP_BINMODE] = 0x0012c804, + [OP_TIE] = 0x0042e845, + [OP_UNTIE] = 0x0000f604, + [OP_TIED] = 0x0000f644, + [OP_DBMOPEN] = 0x00228804, + [OP_DBMCLOSE] = 0x00009604, + [OP_SSELECT] = 0x02222808, + [OP_SELECT] = 0x0001c80c, + [OP_GETC] = 0x0001d60c, + [OP_READ] = 0x122ec80d, + [OP_ENTERWRITE] = 0x0001d604, + [OP_LEAVEWRITE] = 0x00000200, + [OP_PRTF] = 0x0005c805, + [OP_PRINT] = 0x0005c805, + [OP_SAY] = 0x0005c805, + [OP_SYSOPEN] = 0x1222c804, + [OP_SYSSEEK] = 0x0022c804, + [OP_SYSREAD] = 0x122ec80d, + [OP_SYSWRITE] = 0x1322c80d, + [OP_EOF] = 0x0001d604, + [OP_TELL] = 0x0001d60c, + [OP_SEEK] = 0x0022c804, + [OP_TRUNCATE] = 0x00022804, + [OP_FCNTL] = 0x0022c80c, + [OP_IOCTL] = 0x0022c80c, + [OP_FLOCK] = 0x0002c81c, + [OP_SEND] = 0x1222c80d, + [OP_RECV] = 0x022ec80d, + [OP_SOCKET] = 0x0222c804, + [OP_SOCKPAIR] = 0x222cc804, + [OP_BIND] = 0x0002c804, + [OP_CONNECT] = 0x0002c804, + [OP_LISTEN] = 0x0002c804, + [OP_ACCEPT] = 0x000cc80c, + [OP_SHUTDOWN] = 0x0002c80c, + [OP_GSOCKOPT] = 0x0022c804, + [OP_SSOCKOPT] = 0x0222c804, + [OP_GETSOCKNAME] = 0x0000d604, + [OP_GETPEERNAME] = 0x0000d604, + [OP_LSTAT] = 0x0001d880, + [OP_STAT] = 0x0001d880, + [OP_FTRREAD] = 0x0000d884, + [OP_FTRWRITE] = 0x0000d884, + [OP_FTREXEC] = 0x0000d884, + [OP_FTEREAD] = 0x0000d884, + [OP_FTEWRITE] = 0x0000d884, + [OP_FTEEXEC] = 0x0000d884, + [OP_FTIS] = 0x0000d884, + [OP_FTSIZE] = 0x0000d88c, + [OP_FTMTIME] = 0x0000d88c, + [OP_FTATIME] = 0x0000d88c, + [OP_FTCTIME] = 0x0000d88c, + [OP_FTROWNED] = 0x0000d884, + [OP_FTEOWNED] = 0x0000d884, + [OP_FTZERO] = 0x0000d884, + [OP_FTSOCK] = 0x0000d884, + [OP_FTCHR] = 0x0000d884, + [OP_FTBLK] = 0x0000d884, + [OP_FTFILE] = 0x0000d884, + [OP_FTDIR] = 0x0000d884, + [OP_FTPIPE] = 0x0000d884, + [OP_FTSUID] = 0x0000d884, + [OP_FTSGID] = 0x0000d884, + [OP_FTSVTX] = 0x0000d884, + [OP_FTLINK] = 0x0000d884, + [OP_FTTTY] = 0x0000d804, + [OP_FTTEXT] = 0x0000d884, + [OP_FTBINARY] = 0x0000d884, + [OP_CHDIR] = 0x0001361c, + [OP_CHOWN] = 0x0000481d, + [OP_CHROOT] = 0x0001369c, + [OP_UNLINK] = 0x0000489d, + [OP_CHMOD] = 0x0000481d, + [OP_UTIME] = 0x0000481d, + [OP_RENAME] = 0x0002281c, + [OP_LINK] = 0x0002281c, + [OP_SYMLINK] = 0x0002281c, + [OP_READLINK] = 0x0001368c, + [OP_MKDIR] = 0x0013289c, + [OP_RMDIR] = 0x0001369c, + [OP_OPEN_DIR] = 0x0002c804, + [OP_READDIR] = 0x0000d600, + [OP_TELLDIR] = 0x0000d60c, + [OP_SEEKDIR] = 0x0002c804, + [OP_REWINDDIR] = 0x0000d604, + [OP_CLOSEDIR] = 0x0000d604, [OP_FORK] = 0x0000000c, [OP_WAIT] = 0x0000001c, - [OP_WAITPID] = 0x0001141c, - [OP_SYSTEM] = 0x0002941d, - [OP_EXEC] = 0x0002941d, - [OP_KILL] = 0x0000241d, + [OP_WAITPID] = 0x0002281c, + [OP_SYSTEM] = 0x0005281d, + [OP_EXEC] = 0x0005281d, + [OP_KILL] = 0x0000481d, [OP_GETPPID] = 0x0000001c, - [OP_GETPGRP] = 0x00009b1c, - [OP_SETPGRP] = 0x0009941c, - [OP_GETPRIORITY] = 0x0001141c, - [OP_SETPRIORITY] = 0x0011141c, + [OP_GETPGRP] = 0x0001361c, + [OP_SETPGRP] = 0x0013281c, + [OP_GETPRIORITY] = 0x0002281c, + [OP_SETPRIORITY] = 0x0022281c, [OP_TIME] = 0x0000001c, [OP_TMS] = 0x00000000, - [OP_LOCALTIME] = 0x00009b08, - [OP_GMTIME] = 0x00009b08, - [OP_ALARM] = 0x00009b8c, - [OP_SLEEP] = 0x00009b1c, - [OP_SHMGET] = 0x0011140d, - [OP_SHMCTL] = 0x0011140d, - [OP_SHMREAD] = 0x0111140d, - [OP_SHMWRITE] = 0x0111140d, - [OP_MSGGET] = 0x0001140d, - [OP_MSGCTL] = 0x0011140d, - [OP_MSGSND] = 0x0011140d, - [OP_MSGRCV] = 0x1111140d, - [OP_SEMOP] = 0x0001140d, - [OP_SEMGET] = 0x0011140d, - [OP_SEMCTL] = 0x0111140d, - [OP_REQUIRE] = 0x00009bc4, - [OP_DOFILE] = 0x00001140, - [OP_HINTSEVAL] = 0x00000604, - [OP_ENTEREVAL] = 0x00009bc0, - [OP_LEAVEEVAL] = 0x00001100, - [OP_ENTERTRY] = 0x00000340, - [OP_LEAVETRY] = 0x00000400, - [OP_GHBYNAME] = 0x00001b00, - [OP_GHBYADDR] = 0x00011400, + [OP_LOCALTIME] = 0x00013608, + [OP_GMTIME] = 0x00013608, + [OP_ALARM] = 0x0001368c, + [OP_SLEEP] = 0x0001361c, + [OP_SHMGET] = 0x0022280d, + [OP_SHMCTL] = 0x0022280d, + [OP_SHMREAD] = 0x0222280d, + [OP_SHMWRITE] = 0x0222280d, + [OP_MSGGET] = 0x0002280d, + [OP_MSGCTL] = 0x0022280d, + [OP_MSGSND] = 0x0022280d, + [OP_MSGRCV] = 0x2222280d, + [OP_SEMOP] = 0x0002280d, + [OP_SEMGET] = 0x0022280d, + [OP_SEMCTL] = 0x0222280d, + [OP_REQUIRE] = 0x000136c4, + [OP_DOFILE] = 0x00002240, + [OP_HINTSEVAL] = 0x00000c04, + [OP_ENTEREVAL] = 0x000136c0, + [OP_LEAVEEVAL] = 0x00002200, + [OP_ENTERTRY] = 0x00000640, + [OP_LEAVETRY] = 0x00000800, + [OP_GHBYNAME] = 0x00003600, + [OP_GHBYADDR] = 0x00022800, [OP_GHOSTENT] = 0x00000000, - [OP_GNBYNAME] = 0x00001b00, - [OP_GNBYADDR] = 0x00011400, + [OP_GNBYNAME] = 0x00003600, + [OP_GNBYADDR] = 0x00022800, [OP_GNETENT] = 0x00000000, - [OP_GPBYNAME] = 0x00001b00, - [OP_GPBYNUMBER] = 0x00001400, + [OP_GPBYNAME] = 0x00003600, + [OP_GPBYNUMBER] = 0x00002800, [OP_GPROTOENT] = 0x00000000, - [OP_GSBYNAME] = 0x00011400, - [OP_GSBYPORT] = 0x00011400, + [OP_GSBYNAME] = 0x00022800, + [OP_GSBYPORT] = 0x00022800, [OP_GSERVENT] = 0x00000000, - [OP_SHOSTENT] = 0x00001b04, - [OP_SNETENT] = 0x00001b04, - [OP_SPROTOENT] = 0x00001b04, - [OP_SSERVENT] = 0x00001b04, + [OP_SHOSTENT] = 0x00003604, + [OP_SNETENT] = 0x00003604, + [OP_SPROTOENT] = 0x00003604, + [OP_SSERVENT] = 0x00003604, [OP_EHOSTENT] = 0x00000004, [OP_ENETENT] = 0x00000004, [OP_EPROTOENT] = 0x00000004, [OP_ESERVENT] = 0x00000004, - [OP_GPWNAM] = 0x00001b00, - [OP_GPWUID] = 0x00001b00, + [OP_GPWNAM] = 0x00003600, + [OP_GPWUID] = 0x00003600, [OP_GPWENT] = 0x00000000, [OP_SPWENT] = 0x00000004, [OP_EPWENT] = 0x00000004, - [OP_GGRNAM] = 0x00001b00, - [OP_GGRGID] = 0x00001b00, + [OP_GGRNAM] = 0x00003600, + [OP_GGRGID] = 0x00003600, [OP_GGRENT] = 0x00000000, [OP_SGRENT] = 0x00000004, [OP_EGRENT] = 0x00000004, [OP_GETLOGIN] = 0x0000000c, - [OP_SYSCALL] = 0x0002140d, - [OP_LOCK] = 0x00007b04, - [OP_ONCE] = 0x00000300, + [OP_SYSCALL] = 0x0004280d, + [OP_LOCK] = 0x0000f604, + [OP_ONCE] = 0x00000600, [OP_CUSTOM] = 0x00000000, - [OP_COREARGS] = 0x00000600, - [OP_AVHVSWITCH] = 0x00000108, + [OP_COREARGS] = 0x00000c00, + [OP_AVHVSWITCH] = 0x00000208, [OP_RUNCV] = 0x00000004, - [OP_FC] = 0x00009b8e, + [OP_FC] = 0x0001368e, [OP_PADCV] = 0x00000040, [OP_INTROCV] = 0x00000040, [OP_CLONECV] = 0x00000040, [OP_PADRANGE] = 0x00000040, - [OP_REFASSIGN] = 0x00000244, - [OP_LVREF] = 0x00000b40, - [OP_LVREFSLICE] = 0x00000440, - [OP_LVAVREF] = 0x00000b40, - [OP_ANONCONST] = 0x00000144, - [OP_ISA] = 0x00000204, - [OP_CMPCHAIN_AND] = 0x00000300, - [OP_CMPCHAIN_DUP] = 0x00000100, - [OP_ENTERTRYCATCH] = 0x00000300, - [OP_LEAVETRYCATCH] = 0x00000400, - [OP_POPTRY] = 0x00000400, - [OP_CATCH] = 0x00000300, - [OP_PUSHDEFER] = 0x00000300, - [OP_IS_BOOL] = 0x00000106, - [OP_IS_WEAK] = 0x00000106, - [OP_WEAKEN] = 0x00000100, - [OP_UNWEAKEN] = 0x00000100, - [OP_BLESSED] = 0x00000106, - [OP_REFADDR] = 0x0000011e, - [OP_REFTYPE] = 0x0000011e, - [OP_CEIL] = 0x0000011e, - [OP_FLOOR] = 0x0000011e, - [OP_IS_TAINTED] = 0x00000106, - [OP_HELEMEXISTSOR] = 0x00011300, + [OP_REFASSIGN] = 0x00000444, + [OP_LVREF] = 0x00001640, + [OP_LVREFSLICE] = 0x00000840, + [OP_LVAVREF] = 0x00001640, + [OP_ANONCONST] = 0x00000244, + [OP_ISA] = 0x00000404, + [OP_CMPCHAIN_AND] = 0x00000600, + [OP_CMPCHAIN_DUP] = 0x00000200, + [OP_ENTERTRYCATCH] = 0x00000600, + [OP_LEAVETRYCATCH] = 0x00000800, + [OP_POPTRY] = 0x00000800, + [OP_CATCH] = 0x00000600, + [OP_PUSHDEFER] = 0x00000600, + [OP_IS_BOOL] = 0x00000206, + [OP_IS_WEAK] = 0x00000206, + [OP_WEAKEN] = 0x00000200, + [OP_UNWEAKEN] = 0x00000200, + [OP_BLESSED] = 0x00000206, + [OP_REFADDR] = 0x0000021e, + [OP_REFTYPE] = 0x0000021e, + [OP_CEIL] = 0x0000021e, + [OP_FLOOR] = 0x0000021e, + [OP_IS_TAINTED] = 0x00000206, + [OP_HELEMEXISTSOR] = 0x00022600, }); END_EXTERN_C @@ -2594,15 +2614,19 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { [OP_POW] = 88, [OP_MULTIPLY] = 88, [OP_I_MULTIPLY] = 88, + [OP_F_MULTIPLY] = 88, [OP_DIVIDE] = 88, [OP_I_DIVIDE] = 88, + [OP_F_DIVIDE] = 88, [OP_MODULO] = 88, [OP_I_MODULO] = 88, [OP_REPEAT] = 90, [OP_ADD] = 88, [OP_I_ADD] = 88, + [OP_F_ADD] = 88, [OP_SUBTRACT] = 88, [OP_I_SUBTRACT] = 88, + [OP_F_SUBTRACT] = 88, [OP_CONCAT] = 92, [OP_MULTICONCAT] = 95, [OP_STRINGIFY] = 101, @@ -2998,7 +3022,7 @@ EXTCONST U16 PL_op_private_bitdefs[] = { 0x4a90, 0x0003, /* chomp, schomp, scomplement, sin, cos, exp, log, sqrt, int, hex, oct, abs, ord, chr, chroot, rmdir, refaddr, reftype, ceil, floor */ 0x353c, 0x4638, 0x2fb4, 0x4a90, 0x0003, /* undef */ 0x06d4, 0x362c, 0x0003, /* pos */ - 0x4a90, 0x0067, /* pow, multiply, i_multiply, divide, i_divide, modulo, i_modulo, add, i_add, subtract, i_subtract */ + 0x4a90, 0x0067, /* pow, multiply, i_multiply, f_multiply, divide, i_divide, f_divide, modulo, i_modulo, add, i_add, f_add, subtract, i_subtract, f_subtract */ 0x1658, 0x0067, /* repeat */ 0x3818, 0x4a90, 0x0067, /* concat */ 0x353c, 0x0338, 0x1d54, 0x4a90, 0x47cc, 0x0003, /* multiconcat */ @@ -3116,15 +3140,19 @@ EXTCONST U8 PL_op_private_valid[] = { [OP_POW] = (OPpARG2_MASK|OPpTARGET_MY), [OP_MULTIPLY] = (OPpARG2_MASK|OPpTARGET_MY), [OP_I_MULTIPLY] = (OPpARG2_MASK|OPpTARGET_MY), + [OP_F_MULTIPLY] = (OPpARG2_MASK|OPpTARGET_MY), [OP_DIVIDE] = (OPpARG2_MASK|OPpTARGET_MY), [OP_I_DIVIDE] = (OPpARG2_MASK|OPpTARGET_MY), + [OP_F_DIVIDE] = (OPpARG2_MASK|OPpTARGET_MY), [OP_MODULO] = (OPpARG2_MASK|OPpTARGET_MY), [OP_I_MODULO] = (OPpARG2_MASK|OPpTARGET_MY), [OP_REPEAT] = (OPpARG2_MASK|OPpREPEAT_DOLIST), [OP_ADD] = (OPpARG2_MASK|OPpTARGET_MY), [OP_I_ADD] = (OPpARG2_MASK|OPpTARGET_MY), + [OP_F_ADD] = (OPpARG2_MASK|OPpTARGET_MY), [OP_SUBTRACT] = (OPpARG2_MASK|OPpTARGET_MY), [OP_I_SUBTRACT] = (OPpARG2_MASK|OPpTARGET_MY), + [OP_F_SUBTRACT] = (OPpARG2_MASK|OPpTARGET_MY), [OP_CONCAT] = (OPpARG2_MASK|OPpTARGET_MY|OPpCONCAT_NESTED), [OP_MULTICONCAT] = (OPpARG1_MASK|OPpMULTICONCAT_STRINGIFY|OPpTARGET_MY|OPpMULTICONCAT_FAKE|OPpMULTICONCAT_APPEND|OPpLVAL_INTRO), [OP_STRINGIFY] = (OPpARG4_MASK|OPpTARGET_MY), diff --git a/opnames.h b/opnames.h index 80b6d46eff6d..c68b8a450437 100644 --- a/opnames.h +++ b/opnames.h @@ -72,371 +72,375 @@ typedef enum opcode { OP_POW = 55, OP_MULTIPLY = 56, OP_I_MULTIPLY = 57, - OP_DIVIDE = 58, - OP_I_DIVIDE = 59, - OP_MODULO = 60, - OP_I_MODULO = 61, - OP_REPEAT = 62, - OP_ADD = 63, - OP_I_ADD = 64, - OP_SUBTRACT = 65, - OP_I_SUBTRACT = 66, - OP_CONCAT = 67, - OP_MULTICONCAT = 68, - OP_STRINGIFY = 69, - OP_LEFT_SHIFT = 70, - OP_RIGHT_SHIFT = 71, - OP_LT = 72, - OP_I_LT = 73, - OP_GT = 74, - OP_I_GT = 75, - OP_LE = 76, - OP_I_LE = 77, - OP_GE = 78, - OP_I_GE = 79, - OP_EQ = 80, - OP_I_EQ = 81, - OP_NE = 82, - OP_I_NE = 83, - OP_NCMP = 84, - OP_I_NCMP = 85, - OP_SLT = 86, - OP_SGT = 87, - OP_SLE = 88, - OP_SGE = 89, - OP_SEQ = 90, - OP_SNE = 91, - OP_SCMP = 92, - OP_BIT_AND = 93, - OP_BIT_XOR = 94, - OP_BIT_OR = 95, - OP_NBIT_AND = 96, - OP_NBIT_XOR = 97, - OP_NBIT_OR = 98, - OP_SBIT_AND = 99, - OP_SBIT_XOR = 100, - OP_SBIT_OR = 101, - OP_NEGATE = 102, - OP_I_NEGATE = 103, - OP_NOT = 104, - OP_COMPLEMENT = 105, - OP_NCOMPLEMENT = 106, - OP_SCOMPLEMENT = 107, - OP_SMARTMATCH = 108, - OP_ATAN2 = 109, - OP_SIN = 110, - OP_COS = 111, - OP_RAND = 112, - OP_SRAND = 113, - OP_EXP = 114, - OP_LOG = 115, - OP_SQRT = 116, - OP_INT = 117, - OP_HEX = 118, - OP_OCT = 119, - OP_ABS = 120, - OP_LENGTH = 121, - OP_SUBSTR = 122, - OP_VEC = 123, - OP_INDEX = 124, - OP_RINDEX = 125, - OP_SPRINTF = 126, - OP_FORMLINE = 127, - OP_ORD = 128, - OP_CHR = 129, - OP_CRYPT = 130, - OP_UCFIRST = 131, - OP_LCFIRST = 132, - OP_UC = 133, - OP_LC = 134, - OP_QUOTEMETA = 135, - OP_RV2AV = 136, - OP_AELEMFAST = 137, - OP_AELEMFAST_LEX = 138, - OP_AELEMFASTLEX_STORE = 139, - OP_AELEM = 140, - OP_ASLICE = 141, - OP_KVASLICE = 142, - OP_AEACH = 143, - OP_AVALUES = 144, - OP_AKEYS = 145, - OP_EACH = 146, - OP_VALUES = 147, - OP_KEYS = 148, - OP_DELETE = 149, - OP_EXISTS = 150, - OP_RV2HV = 151, - OP_HELEM = 152, - OP_HSLICE = 153, - OP_KVHSLICE = 154, - OP_MULTIDEREF = 155, - OP_UNPACK = 156, - OP_PACK = 157, - OP_SPLIT = 158, - OP_JOIN = 159, - OP_LIST = 160, - OP_LSLICE = 161, - OP_ANONLIST = 162, - OP_ANONHASH = 163, - OP_EMPTYAVHV = 164, - OP_SPLICE = 165, - OP_PUSH = 166, - OP_POP = 167, - OP_SHIFT = 168, - OP_UNSHIFT = 169, - OP_SORT = 170, - OP_REVERSE = 171, - OP_GREPSTART = 172, - OP_GREPWHILE = 173, - OP_MAPSTART = 174, - OP_MAPWHILE = 175, - OP_RANGE = 176, - OP_FLIP = 177, - OP_FLOP = 178, - OP_AND = 179, - OP_OR = 180, - OP_XOR = 181, - OP_DOR = 182, - OP_COND_EXPR = 183, - OP_ANDASSIGN = 184, - OP_ORASSIGN = 185, - OP_DORASSIGN = 186, - OP_ENTERSUB = 187, - OP_LEAVESUB = 188, - OP_LEAVESUBLV = 189, - OP_ARGCHECK = 190, - OP_ARGELEM = 191, - OP_ARGDEFELEM = 192, - OP_CALLER = 193, - OP_WARN = 194, - OP_DIE = 195, - OP_RESET = 196, - OP_LINESEQ = 197, - OP_NEXTSTATE = 198, - OP_DBSTATE = 199, - OP_UNSTACK = 200, - OP_ENTER = 201, - OP_LEAVE = 202, - OP_SCOPE = 203, - OP_ENTERITER = 204, - OP_ITER = 205, - OP_ENTERLOOP = 206, - OP_LEAVELOOP = 207, - OP_RETURN = 208, - OP_LAST = 209, - OP_NEXT = 210, - OP_REDO = 211, - OP_DUMP = 212, - OP_GOTO = 213, - OP_EXIT = 214, - OP_METHOD = 215, - OP_METHOD_NAMED = 216, - OP_METHOD_SUPER = 217, - OP_METHOD_REDIR = 218, - OP_METHOD_REDIR_SUPER = 219, - OP_ENTERGIVEN = 220, - OP_LEAVEGIVEN = 221, - OP_ENTERWHEN = 222, - OP_LEAVEWHEN = 223, - OP_BREAK = 224, - OP_CONTINUE = 225, - OP_OPEN = 226, - OP_CLOSE = 227, - OP_PIPE_OP = 228, - OP_FILENO = 229, - OP_UMASK = 230, - OP_BINMODE = 231, - OP_TIE = 232, - OP_UNTIE = 233, - OP_TIED = 234, - OP_DBMOPEN = 235, - OP_DBMCLOSE = 236, - OP_SSELECT = 237, - OP_SELECT = 238, - OP_GETC = 239, - OP_READ = 240, - OP_ENTERWRITE = 241, - OP_LEAVEWRITE = 242, - OP_PRTF = 243, - OP_PRINT = 244, - OP_SAY = 245, - OP_SYSOPEN = 246, - OP_SYSSEEK = 247, - OP_SYSREAD = 248, - OP_SYSWRITE = 249, - OP_EOF = 250, - OP_TELL = 251, - OP_SEEK = 252, - OP_TRUNCATE = 253, - OP_FCNTL = 254, - OP_IOCTL = 255, - OP_FLOCK = 256, - OP_SEND = 257, - OP_RECV = 258, - OP_SOCKET = 259, - OP_SOCKPAIR = 260, - OP_BIND = 261, - OP_CONNECT = 262, - OP_LISTEN = 263, - OP_ACCEPT = 264, - OP_SHUTDOWN = 265, - OP_GSOCKOPT = 266, - OP_SSOCKOPT = 267, - OP_GETSOCKNAME = 268, - OP_GETPEERNAME = 269, - OP_LSTAT = 270, - OP_STAT = 271, - OP_FTRREAD = 272, - OP_FTRWRITE = 273, - OP_FTREXEC = 274, - OP_FTEREAD = 275, - OP_FTEWRITE = 276, - OP_FTEEXEC = 277, - OP_FTIS = 278, - OP_FTSIZE = 279, - OP_FTMTIME = 280, - OP_FTATIME = 281, - OP_FTCTIME = 282, - OP_FTROWNED = 283, - OP_FTEOWNED = 284, - OP_FTZERO = 285, - OP_FTSOCK = 286, - OP_FTCHR = 287, - OP_FTBLK = 288, - OP_FTFILE = 289, - OP_FTDIR = 290, - OP_FTPIPE = 291, - OP_FTSUID = 292, - OP_FTSGID = 293, - OP_FTSVTX = 294, - OP_FTLINK = 295, - OP_FTTTY = 296, - OP_FTTEXT = 297, - OP_FTBINARY = 298, - OP_CHDIR = 299, - OP_CHOWN = 300, - OP_CHROOT = 301, - OP_UNLINK = 302, - OP_CHMOD = 303, - OP_UTIME = 304, - OP_RENAME = 305, - OP_LINK = 306, - OP_SYMLINK = 307, - OP_READLINK = 308, - OP_MKDIR = 309, - OP_RMDIR = 310, - OP_OPEN_DIR = 311, - OP_READDIR = 312, - OP_TELLDIR = 313, - OP_SEEKDIR = 314, - OP_REWINDDIR = 315, - OP_CLOSEDIR = 316, - OP_FORK = 317, - OP_WAIT = 318, - OP_WAITPID = 319, - OP_SYSTEM = 320, - OP_EXEC = 321, - OP_KILL = 322, - OP_GETPPID = 323, - OP_GETPGRP = 324, - OP_SETPGRP = 325, - OP_GETPRIORITY = 326, - OP_SETPRIORITY = 327, - OP_TIME = 328, - OP_TMS = 329, - OP_LOCALTIME = 330, - OP_GMTIME = 331, - OP_ALARM = 332, - OP_SLEEP = 333, - OP_SHMGET = 334, - OP_SHMCTL = 335, - OP_SHMREAD = 336, - OP_SHMWRITE = 337, - OP_MSGGET = 338, - OP_MSGCTL = 339, - OP_MSGSND = 340, - OP_MSGRCV = 341, - OP_SEMOP = 342, - OP_SEMGET = 343, - OP_SEMCTL = 344, - OP_REQUIRE = 345, - OP_DOFILE = 346, - OP_HINTSEVAL = 347, - OP_ENTEREVAL = 348, - OP_LEAVEEVAL = 349, - OP_ENTERTRY = 350, - OP_LEAVETRY = 351, - OP_GHBYNAME = 352, - OP_GHBYADDR = 353, - OP_GHOSTENT = 354, - OP_GNBYNAME = 355, - OP_GNBYADDR = 356, - OP_GNETENT = 357, - OP_GPBYNAME = 358, - OP_GPBYNUMBER = 359, - OP_GPROTOENT = 360, - OP_GSBYNAME = 361, - OP_GSBYPORT = 362, - OP_GSERVENT = 363, - OP_SHOSTENT = 364, - OP_SNETENT = 365, - OP_SPROTOENT = 366, - OP_SSERVENT = 367, - OP_EHOSTENT = 368, - OP_ENETENT = 369, - OP_EPROTOENT = 370, - OP_ESERVENT = 371, - OP_GPWNAM = 372, - OP_GPWUID = 373, - OP_GPWENT = 374, - OP_SPWENT = 375, - OP_EPWENT = 376, - OP_GGRNAM = 377, - OP_GGRGID = 378, - OP_GGRENT = 379, - OP_SGRENT = 380, - OP_EGRENT = 381, - OP_GETLOGIN = 382, - OP_SYSCALL = 383, - OP_LOCK = 384, - OP_ONCE = 385, - OP_CUSTOM = 386, - OP_COREARGS = 387, - OP_AVHVSWITCH = 388, - OP_RUNCV = 389, - OP_FC = 390, - OP_PADCV = 391, - OP_INTROCV = 392, - OP_CLONECV = 393, - OP_PADRANGE = 394, - OP_REFASSIGN = 395, - OP_LVREF = 396, - OP_LVREFSLICE = 397, - OP_LVAVREF = 398, - OP_ANONCONST = 399, - OP_ISA = 400, - OP_CMPCHAIN_AND = 401, - OP_CMPCHAIN_DUP = 402, - OP_ENTERTRYCATCH = 403, - OP_LEAVETRYCATCH = 404, - OP_POPTRY = 405, - OP_CATCH = 406, - OP_PUSHDEFER = 407, - OP_IS_BOOL = 408, - OP_IS_WEAK = 409, - OP_WEAKEN = 410, - OP_UNWEAKEN = 411, - OP_BLESSED = 412, - OP_REFADDR = 413, - OP_REFTYPE = 414, - OP_CEIL = 415, - OP_FLOOR = 416, - OP_IS_TAINTED = 417, - OP_HELEMEXISTSOR = 418, + OP_F_MULTIPLY = 58, + OP_DIVIDE = 59, + OP_I_DIVIDE = 60, + OP_F_DIVIDE = 61, + OP_MODULO = 62, + OP_I_MODULO = 63, + OP_REPEAT = 64, + OP_ADD = 65, + OP_I_ADD = 66, + OP_F_ADD = 67, + OP_SUBTRACT = 68, + OP_I_SUBTRACT = 69, + OP_F_SUBTRACT = 70, + OP_CONCAT = 71, + OP_MULTICONCAT = 72, + OP_STRINGIFY = 73, + OP_LEFT_SHIFT = 74, + OP_RIGHT_SHIFT = 75, + OP_LT = 76, + OP_I_LT = 77, + OP_GT = 78, + OP_I_GT = 79, + OP_LE = 80, + OP_I_LE = 81, + OP_GE = 82, + OP_I_GE = 83, + OP_EQ = 84, + OP_I_EQ = 85, + OP_NE = 86, + OP_I_NE = 87, + OP_NCMP = 88, + OP_I_NCMP = 89, + OP_SLT = 90, + OP_SGT = 91, + OP_SLE = 92, + OP_SGE = 93, + OP_SEQ = 94, + OP_SNE = 95, + OP_SCMP = 96, + OP_BIT_AND = 97, + OP_BIT_XOR = 98, + OP_BIT_OR = 99, + OP_NBIT_AND = 100, + OP_NBIT_XOR = 101, + OP_NBIT_OR = 102, + OP_SBIT_AND = 103, + OP_SBIT_XOR = 104, + OP_SBIT_OR = 105, + OP_NEGATE = 106, + OP_I_NEGATE = 107, + OP_NOT = 108, + OP_COMPLEMENT = 109, + OP_NCOMPLEMENT = 110, + OP_SCOMPLEMENT = 111, + OP_SMARTMATCH = 112, + OP_ATAN2 = 113, + OP_SIN = 114, + OP_COS = 115, + OP_RAND = 116, + OP_SRAND = 117, + OP_EXP = 118, + OP_LOG = 119, + OP_SQRT = 120, + OP_INT = 121, + OP_HEX = 122, + OP_OCT = 123, + OP_ABS = 124, + OP_LENGTH = 125, + OP_SUBSTR = 126, + OP_VEC = 127, + OP_INDEX = 128, + OP_RINDEX = 129, + OP_SPRINTF = 130, + OP_FORMLINE = 131, + OP_ORD = 132, + OP_CHR = 133, + OP_CRYPT = 134, + OP_UCFIRST = 135, + OP_LCFIRST = 136, + OP_UC = 137, + OP_LC = 138, + OP_QUOTEMETA = 139, + OP_RV2AV = 140, + OP_AELEMFAST = 141, + OP_AELEMFAST_LEX = 142, + OP_AELEMFASTLEX_STORE = 143, + OP_AELEM = 144, + OP_ASLICE = 145, + OP_KVASLICE = 146, + OP_AEACH = 147, + OP_AVALUES = 148, + OP_AKEYS = 149, + OP_EACH = 150, + OP_VALUES = 151, + OP_KEYS = 152, + OP_DELETE = 153, + OP_EXISTS = 154, + OP_RV2HV = 155, + OP_HELEM = 156, + OP_HSLICE = 157, + OP_KVHSLICE = 158, + OP_MULTIDEREF = 159, + OP_UNPACK = 160, + OP_PACK = 161, + OP_SPLIT = 162, + OP_JOIN = 163, + OP_LIST = 164, + OP_LSLICE = 165, + OP_ANONLIST = 166, + OP_ANONHASH = 167, + OP_EMPTYAVHV = 168, + OP_SPLICE = 169, + OP_PUSH = 170, + OP_POP = 171, + OP_SHIFT = 172, + OP_UNSHIFT = 173, + OP_SORT = 174, + OP_REVERSE = 175, + OP_GREPSTART = 176, + OP_GREPWHILE = 177, + OP_MAPSTART = 178, + OP_MAPWHILE = 179, + OP_RANGE = 180, + OP_FLIP = 181, + OP_FLOP = 182, + OP_AND = 183, + OP_OR = 184, + OP_XOR = 185, + OP_DOR = 186, + OP_COND_EXPR = 187, + OP_ANDASSIGN = 188, + OP_ORASSIGN = 189, + OP_DORASSIGN = 190, + OP_ENTERSUB = 191, + OP_LEAVESUB = 192, + OP_LEAVESUBLV = 193, + OP_ARGCHECK = 194, + OP_ARGELEM = 195, + OP_ARGDEFELEM = 196, + OP_CALLER = 197, + OP_WARN = 198, + OP_DIE = 199, + OP_RESET = 200, + OP_LINESEQ = 201, + OP_NEXTSTATE = 202, + OP_DBSTATE = 203, + OP_UNSTACK = 204, + OP_ENTER = 205, + OP_LEAVE = 206, + OP_SCOPE = 207, + OP_ENTERITER = 208, + OP_ITER = 209, + OP_ENTERLOOP = 210, + OP_LEAVELOOP = 211, + OP_RETURN = 212, + OP_LAST = 213, + OP_NEXT = 214, + OP_REDO = 215, + OP_DUMP = 216, + OP_GOTO = 217, + OP_EXIT = 218, + OP_METHOD = 219, + OP_METHOD_NAMED = 220, + OP_METHOD_SUPER = 221, + OP_METHOD_REDIR = 222, + OP_METHOD_REDIR_SUPER = 223, + OP_ENTERGIVEN = 224, + OP_LEAVEGIVEN = 225, + OP_ENTERWHEN = 226, + OP_LEAVEWHEN = 227, + OP_BREAK = 228, + OP_CONTINUE = 229, + OP_OPEN = 230, + OP_CLOSE = 231, + OP_PIPE_OP = 232, + OP_FILENO = 233, + OP_UMASK = 234, + OP_BINMODE = 235, + OP_TIE = 236, + OP_UNTIE = 237, + OP_TIED = 238, + OP_DBMOPEN = 239, + OP_DBMCLOSE = 240, + OP_SSELECT = 241, + OP_SELECT = 242, + OP_GETC = 243, + OP_READ = 244, + OP_ENTERWRITE = 245, + OP_LEAVEWRITE = 246, + OP_PRTF = 247, + OP_PRINT = 248, + OP_SAY = 249, + OP_SYSOPEN = 250, + OP_SYSSEEK = 251, + OP_SYSREAD = 252, + OP_SYSWRITE = 253, + OP_EOF = 254, + OP_TELL = 255, + OP_SEEK = 256, + OP_TRUNCATE = 257, + OP_FCNTL = 258, + OP_IOCTL = 259, + OP_FLOCK = 260, + OP_SEND = 261, + OP_RECV = 262, + OP_SOCKET = 263, + OP_SOCKPAIR = 264, + OP_BIND = 265, + OP_CONNECT = 266, + OP_LISTEN = 267, + OP_ACCEPT = 268, + OP_SHUTDOWN = 269, + OP_GSOCKOPT = 270, + OP_SSOCKOPT = 271, + OP_GETSOCKNAME = 272, + OP_GETPEERNAME = 273, + OP_LSTAT = 274, + OP_STAT = 275, + OP_FTRREAD = 276, + OP_FTRWRITE = 277, + OP_FTREXEC = 278, + OP_FTEREAD = 279, + OP_FTEWRITE = 280, + OP_FTEEXEC = 281, + OP_FTIS = 282, + OP_FTSIZE = 283, + OP_FTMTIME = 284, + OP_FTATIME = 285, + OP_FTCTIME = 286, + OP_FTROWNED = 287, + OP_FTEOWNED = 288, + OP_FTZERO = 289, + OP_FTSOCK = 290, + OP_FTCHR = 291, + OP_FTBLK = 292, + OP_FTFILE = 293, + OP_FTDIR = 294, + OP_FTPIPE = 295, + OP_FTSUID = 296, + OP_FTSGID = 297, + OP_FTSVTX = 298, + OP_FTLINK = 299, + OP_FTTTY = 300, + OP_FTTEXT = 301, + OP_FTBINARY = 302, + OP_CHDIR = 303, + OP_CHOWN = 304, + OP_CHROOT = 305, + OP_UNLINK = 306, + OP_CHMOD = 307, + OP_UTIME = 308, + OP_RENAME = 309, + OP_LINK = 310, + OP_SYMLINK = 311, + OP_READLINK = 312, + OP_MKDIR = 313, + OP_RMDIR = 314, + OP_OPEN_DIR = 315, + OP_READDIR = 316, + OP_TELLDIR = 317, + OP_SEEKDIR = 318, + OP_REWINDDIR = 319, + OP_CLOSEDIR = 320, + OP_FORK = 321, + OP_WAIT = 322, + OP_WAITPID = 323, + OP_SYSTEM = 324, + OP_EXEC = 325, + OP_KILL = 326, + OP_GETPPID = 327, + OP_GETPGRP = 328, + OP_SETPGRP = 329, + OP_GETPRIORITY = 330, + OP_SETPRIORITY = 331, + OP_TIME = 332, + OP_TMS = 333, + OP_LOCALTIME = 334, + OP_GMTIME = 335, + OP_ALARM = 336, + OP_SLEEP = 337, + OP_SHMGET = 338, + OP_SHMCTL = 339, + OP_SHMREAD = 340, + OP_SHMWRITE = 341, + OP_MSGGET = 342, + OP_MSGCTL = 343, + OP_MSGSND = 344, + OP_MSGRCV = 345, + OP_SEMOP = 346, + OP_SEMGET = 347, + OP_SEMCTL = 348, + OP_REQUIRE = 349, + OP_DOFILE = 350, + OP_HINTSEVAL = 351, + OP_ENTEREVAL = 352, + OP_LEAVEEVAL = 353, + OP_ENTERTRY = 354, + OP_LEAVETRY = 355, + OP_GHBYNAME = 356, + OP_GHBYADDR = 357, + OP_GHOSTENT = 358, + OP_GNBYNAME = 359, + OP_GNBYADDR = 360, + OP_GNETENT = 361, + OP_GPBYNAME = 362, + OP_GPBYNUMBER = 363, + OP_GPROTOENT = 364, + OP_GSBYNAME = 365, + OP_GSBYPORT = 366, + OP_GSERVENT = 367, + OP_SHOSTENT = 368, + OP_SNETENT = 369, + OP_SPROTOENT = 370, + OP_SSERVENT = 371, + OP_EHOSTENT = 372, + OP_ENETENT = 373, + OP_EPROTOENT = 374, + OP_ESERVENT = 375, + OP_GPWNAM = 376, + OP_GPWUID = 377, + OP_GPWENT = 378, + OP_SPWENT = 379, + OP_EPWENT = 380, + OP_GGRNAM = 381, + OP_GGRGID = 382, + OP_GGRENT = 383, + OP_SGRENT = 384, + OP_EGRENT = 385, + OP_GETLOGIN = 386, + OP_SYSCALL = 387, + OP_LOCK = 388, + OP_ONCE = 389, + OP_CUSTOM = 390, + OP_COREARGS = 391, + OP_AVHVSWITCH = 392, + OP_RUNCV = 393, + OP_FC = 394, + OP_PADCV = 395, + OP_INTROCV = 396, + OP_CLONECV = 397, + OP_PADRANGE = 398, + OP_REFASSIGN = 399, + OP_LVREF = 400, + OP_LVREFSLICE = 401, + OP_LVAVREF = 402, + OP_ANONCONST = 403, + OP_ISA = 404, + OP_CMPCHAIN_AND = 405, + OP_CMPCHAIN_DUP = 406, + OP_ENTERTRYCATCH = 407, + OP_LEAVETRYCATCH = 408, + OP_POPTRY = 409, + OP_CATCH = 410, + OP_PUSHDEFER = 411, + OP_IS_BOOL = 412, + OP_IS_WEAK = 413, + OP_WEAKEN = 414, + OP_UNWEAKEN = 415, + OP_BLESSED = 416, + OP_REFADDR = 417, + OP_REFTYPE = 418, + OP_CEIL = 419, + OP_FLOOR = 420, + OP_IS_TAINTED = 421, + OP_HELEMEXISTSOR = 422, OP_max } opcode; -#define MAXO 419 +#define MAXO 423 #define OP_FREED MAXO /* the OP_IS_* macros are optimized to a simple range check because diff --git a/pp.c b/pp.c index 98edc8f37b92..84a799b30d65 100644 --- a/pp.c +++ b/pp.c @@ -2864,6 +2864,54 @@ PP(pp_i_negate) } } +/* pure floating point versions of some of the above */ +PP(pp_f_multiply) +{ + dSP; dATARGET; + tryAMAGICbin_MG(mult_amg, AMGf_assign); + { + dPOPTOPnnrl_nomg; + SETn( left * right ); + RETURN; + } +} + +PP(pp_f_divide) +{ + dSP; dATARGET; + tryAMAGICbin_MG(div_amg, AMGf_assign); + { + dPOPTOPnnrl_nomg; + if (left == 0) + DIE(aTHX_ "Illegal division by zero"); + + SETn( left / right ); + RETURN; + } +} + +PP(pp_f_add) +{ + dSP; dATARGET; + tryAMAGICbin_MG(add_amg, AMGf_assign); + { + dPOPTOPnnrl_nomg; + SETn( left + right ); + RETURN; + } +} + +PP(pp_f_subtract) +{ + dSP; dATARGET; + tryAMAGICbin_MG(subtr_amg, AMGf_assign); + { + dPOPTOPnnrl_nomg; + SETn( left - right ); + RETURN; + } +} + /* High falutin' math. */ PP(pp_atan2) diff --git a/pp_proto.h b/pp_proto.h index 66f4a420c903..af95dc228d9f 100644 --- a/pp_proto.h +++ b/pp_proto.h @@ -79,6 +79,10 @@ PERL_CALLCONV OP *Perl_pp_eq(pTHX) __attribute__visibility__("hidden"); PERL_CALLCONV OP *Perl_pp_exec(pTHX) __attribute__visibility__("hidden"); PERL_CALLCONV OP *Perl_pp_exists(pTHX) __attribute__visibility__("hidden"); PERL_CALLCONV OP *Perl_pp_exit(pTHX) __attribute__visibility__("hidden"); +PERL_CALLCONV OP *Perl_pp_f_add(pTHX) __attribute__visibility__("hidden"); +PERL_CALLCONV OP *Perl_pp_f_divide(pTHX) __attribute__visibility__("hidden"); +PERL_CALLCONV OP *Perl_pp_f_multiply(pTHX) __attribute__visibility__("hidden"); +PERL_CALLCONV OP *Perl_pp_f_subtract(pTHX) __attribute__visibility__("hidden"); PERL_CALLCONV OP *Perl_pp_fc(pTHX) __attribute__visibility__("hidden"); PERL_CALLCONV OP *Perl_pp_fileno(pTHX) __attribute__visibility__("hidden"); PERL_CALLCONV OP *Perl_pp_flip(pTHX) __attribute__visibility__("hidden"); diff --git a/regen/feature.pl b/regen/feature.pl index e06fe281d90b..3a36c9e3f318 100755 --- a/regen/feature.pl +++ b/regen/feature.pl @@ -45,6 +45,7 @@ BEGIN defer => 'defer', extra_paired_delimiters => 'more_delims', module_true => 'module_true', + float => 'float', ); # NOTE: If a feature is ever enabled in a non-contiguous range of Perl @@ -500,7 +501,7 @@ sub longest { __END__ package feature; -our $VERSION = '1.79'; +our $VERSION = '1.80'; FEATURES diff --git a/regen/opcode.pl b/regen/opcode.pl index b62aac60b9cb..0e7f23e579b9 100755 --- a/regen/opcode.pl +++ b/regen/opcode.pl @@ -966,6 +966,7 @@ package main; 'I' => 32, # has corresponding int op 'd' => 64, # danger, make temp copy in list assignment 'u' => 128, # defaults to $_ + 'F' => 256, # has corresponding float op ); generate_opcode_h; @@ -1154,8 +1155,8 @@ sub generate_opcode_h_pl_check { } sub generate_opcode_h_pl_opargs { - my $OCSHIFT = 8; - my $OASHIFT = 12; + my $OCSHIFT = 9; + my $OASHIFT = 13; print <<~'END'; diff --git a/regen/opcodes b/regen/opcodes index 98669955f2e9..b7ea1a123cc3 100644 --- a/regen/opcodes +++ b/regen/opcodes @@ -24,6 +24,7 @@ # needs a target - t (OA_TARGET) # target can be in a pad - T (OA_TARGET|OA_TARGLEX) # has a corresponding integer version - I (OA_OTHERINT) +# has a corresponding float version - F (OA_OTHERFLOAT) # make temp copy in list assignment - d (OA_DANGEROUS) # uses $_ if no argument given - u (OA_DEFGV) @@ -119,18 +120,22 @@ i_postdec integer postdecrement (--) ck_lfun ist1 S pow exponentiation (**) ck_null fsT2 S S -multiply multiplication (*) ck_null IfsT2 S S +multiply multiplication (*) ck_null IFfsT2 S S i_multiply integer multiplication (*) ck_null ifsT2 S S -divide division (/) ck_null IfsT2 S S +f_multiply float multiplication (*) ck_null fsT2 S S +divide division (/) ck_null IFfsT2 S S i_divide integer division (/) ck_null ifsT2 S S +f_divide float division (/) ck_null fsT2 S S modulo modulus (%) ck_null IifsT2 S S i_modulo integer modulus (%) ck_null ifsT2 S S repeat repeat (x) ck_repeat fmt2 L S -add addition (+) ck_null IfsT2 S S +add addition (+) ck_null IFfsT2 S S i_add integer addition (+) ck_null ifsT2 S S -subtract subtraction (-) ck_null IfsT2 S S +f_add float addition (+) ck_null fsT2 S S +subtract subtraction (-) ck_null IFfsT2 S S i_subtract integer subtraction (-) ck_null ifsT2 S S +f_subtract float subtraction (-) ck_null fsT2 S S concat concatenation (.) or string ck_concat fsT2 S S multiconcat concatenation (.) or string ck_null sT+ stringify string ck_stringify fsT@ S