X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/649da0762311e9a19091946020dc56feadc1378c..901017d64784f408c305bb1efe061b7ae9d47fc0:/opcode.h diff --git a/opcode.h b/opcode.h index 51c2d11..1a4c507 100644 --- a/opcode.h +++ b/opcode.h @@ -1,20 +1,36 @@ -/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! - This file is built by opcode.pl from its data. Any changes made here - will be lost! -*/ +/* -*- buffer-read-only: t -*- + * + * opcode.h + * + * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, + * 2000, 2001, 2002, 2003, 2004, 2005 by Larry Wall and others + * + * You may distribute under the terms of either the GNU General Public + * License or the Artistic License, as specified in the README file. + * + * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! + * This file is built by opcode.pl from its data. Any changes made here + * will be lost! + */ + +#ifndef PERL_GLOBAL_STRUCT_INIT #define Perl_pp_i_preinc Perl_pp_preinc #define Perl_pp_i_predec Perl_pp_predec #define Perl_pp_i_postinc Perl_pp_postinc #define Perl_pp_i_postdec Perl_pp_postdec - START_EXTERN_C +#define OP_NAME(o) ((o)->op_type == OP_CUSTOM ? custom_op_name(o) : \ + PL_op_name[(o)->op_type]) +#define OP_DESC(o) ((o)->op_type == OP_CUSTOM ? custom_op_desc(o) : \ + PL_op_desc[(o)->op_type]) + #ifndef DOINIT -EXT char *PL_op_name[]; +EXTCONST char* const PL_op_name[]; #else -EXT char *PL_op_name[] = { +EXTCONST char* const PL_op_name[] = { "null", "stub", "scalar", @@ -366,13 +382,16 @@ EXT char *PL_op_name[] = { "threadsv", "setstate", "method_named", + "dor", + "dorassign", + "custom", }; #endif #ifndef DOINIT -EXT char *PL_op_desc[]; +EXTCONST char* const PL_op_desc[]; #else -EXT char *PL_op_desc[] = { +EXTCONST char* const PL_op_desc[] = { "null operation", "stub", "scalar", @@ -439,7 +458,7 @@ EXT char *PL_op_desc[] = { "integer addition (+)", "subtraction (-)", "integer subtraction (-)", - "concatenation (.)", + "concatenation (.) or string", "string", "left bitshift (<<)", "right bitshift (>>)", @@ -513,7 +532,7 @@ EXT char *PL_op_desc[] = { "unpack", "pack", "split", - "join", + "join or string", "list", "list slice", "anonymous list ([])", @@ -541,7 +560,7 @@ EXT char *PL_op_desc[] = { "method lookup", "subroutine entry", "subroutine exit", - "lvalue subroutine exit", + "lvalue subroutine return", "caller", "warn", "die", @@ -724,18 +743,27 @@ EXT char *PL_op_desc[] = { "per-thread value", "set statement info", "method with known name", + "defined or (//)", + "defined or assignment (//=)", + "unknown custom operator", }; #endif END_EXTERN_C +#endif /* !PERL_GLOBAL_STRUCT_INIT */ START_EXTERN_C -#ifndef DOINIT -EXT OP * (CPERLscope(*PL_ppaddr)[])(pTHX); +#ifdef PERL_GLOBAL_STRUCT_INIT +static const Perl_ppaddr_t Gppaddr[] #else -EXT OP * (CPERLscope(*PL_ppaddr)[])(pTHX) = { +# ifndef PERL_GLOBAL_STRUCT +EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */ +# endif +#endif /* PERL_GLOBAL_STRUCT */ +#if (defined(DOINIT) && !defined(PERL_GLOBAL_STRUCT)) || defined(PERL_GLOBAL_STRUCT_INIT) += { MEMBER_TO_FPTR(Perl_pp_null), MEMBER_TO_FPTR(Perl_pp_stub), MEMBER_TO_FPTR(Perl_pp_scalar), @@ -1087,13 +1115,21 @@ EXT OP * (CPERLscope(*PL_ppaddr)[])(pTHX) = { MEMBER_TO_FPTR(Perl_pp_threadsv), MEMBER_TO_FPTR(Perl_pp_setstate), MEMBER_TO_FPTR(Perl_pp_method_named), -}; + MEMBER_TO_FPTR(Perl_pp_dor), + MEMBER_TO_FPTR(Perl_pp_dorassign), +} #endif +; -#ifndef DOINIT -EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op); +#ifdef PERL_GLOBAL_STRUCT_INIT +static const Perl_check_t Gcheck[] #else -EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = { +# ifndef PERL_GLOBAL_STRUCT +EXT Perl_check_t PL_check[] /* or perlvars.h */ +# endif +#endif +#if (defined(DOINIT) && !defined(PERL_GLOBAL_STRUCT)) || defined(PERL_GLOBAL_STRUCT_INIT) += { MEMBER_TO_FPTR(Perl_ck_null), /* null */ MEMBER_TO_FPTR(Perl_ck_null), /* stub */ MEMBER_TO_FPTR(Perl_ck_fun), /* scalar */ @@ -1118,7 +1154,7 @@ EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = { MEMBER_TO_FPTR(Perl_ck_null), /* srefgen */ MEMBER_TO_FPTR(Perl_ck_fun), /* ref */ MEMBER_TO_FPTR(Perl_ck_fun), /* bless */ - MEMBER_TO_FPTR(Perl_ck_null), /* backtick */ + MEMBER_TO_FPTR(Perl_ck_open), /* backtick */ MEMBER_TO_FPTR(Perl_ck_glob), /* glob */ MEMBER_TO_FPTR(Perl_ck_null), /* readline */ MEMBER_TO_FPTR(Perl_ck_null), /* rcatline */ @@ -1127,9 +1163,9 @@ EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = { MEMBER_TO_FPTR(Perl_ck_null), /* regcomp */ MEMBER_TO_FPTR(Perl_ck_match), /* match */ MEMBER_TO_FPTR(Perl_ck_match), /* qr */ - MEMBER_TO_FPTR(Perl_ck_null), /* subst */ + MEMBER_TO_FPTR(Perl_ck_match), /* subst */ MEMBER_TO_FPTR(Perl_ck_null), /* substcont */ - MEMBER_TO_FPTR(Perl_ck_null), /* trans */ + MEMBER_TO_FPTR(Perl_ck_match), /* trans */ MEMBER_TO_FPTR(Perl_ck_sassign), /* sassign */ MEMBER_TO_FPTR(Perl_ck_null), /* aassign */ MEMBER_TO_FPTR(Perl_ck_spair), /* chop */ @@ -1178,13 +1214,13 @@ EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = { MEMBER_TO_FPTR(Perl_ck_null), /* i_ne */ MEMBER_TO_FPTR(Perl_ck_null), /* ncmp */ MEMBER_TO_FPTR(Perl_ck_null), /* i_ncmp */ - MEMBER_TO_FPTR(Perl_ck_scmp), /* slt */ - MEMBER_TO_FPTR(Perl_ck_scmp), /* sgt */ - MEMBER_TO_FPTR(Perl_ck_scmp), /* sle */ - MEMBER_TO_FPTR(Perl_ck_scmp), /* sge */ + MEMBER_TO_FPTR(Perl_ck_null), /* slt */ + MEMBER_TO_FPTR(Perl_ck_null), /* sgt */ + MEMBER_TO_FPTR(Perl_ck_null), /* sle */ + MEMBER_TO_FPTR(Perl_ck_null), /* sge */ MEMBER_TO_FPTR(Perl_ck_null), /* seq */ MEMBER_TO_FPTR(Perl_ck_null), /* sne */ - MEMBER_TO_FPTR(Perl_ck_scmp), /* scmp */ + MEMBER_TO_FPTR(Perl_ck_null), /* scmp */ MEMBER_TO_FPTR(Perl_ck_bitop), /* bit_and */ MEMBER_TO_FPTR(Perl_ck_bitop), /* bit_xor */ MEMBER_TO_FPTR(Perl_ck_bitop), /* bit_or */ @@ -1205,19 +1241,19 @@ EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = { MEMBER_TO_FPTR(Perl_ck_fun), /* oct */ MEMBER_TO_FPTR(Perl_ck_fun), /* abs */ MEMBER_TO_FPTR(Perl_ck_lengthconst), /* length */ - MEMBER_TO_FPTR(Perl_ck_fun), /* substr */ + MEMBER_TO_FPTR(Perl_ck_substr), /* substr */ MEMBER_TO_FPTR(Perl_ck_fun), /* vec */ MEMBER_TO_FPTR(Perl_ck_index), /* index */ MEMBER_TO_FPTR(Perl_ck_index), /* rindex */ - MEMBER_TO_FPTR(Perl_ck_fun_locale), /* sprintf */ + MEMBER_TO_FPTR(Perl_ck_fun), /* sprintf */ MEMBER_TO_FPTR(Perl_ck_fun), /* formline */ MEMBER_TO_FPTR(Perl_ck_fun), /* ord */ MEMBER_TO_FPTR(Perl_ck_fun), /* chr */ MEMBER_TO_FPTR(Perl_ck_fun), /* crypt */ - MEMBER_TO_FPTR(Perl_ck_fun_locale), /* ucfirst */ - MEMBER_TO_FPTR(Perl_ck_fun_locale), /* lcfirst */ - MEMBER_TO_FPTR(Perl_ck_fun_locale), /* uc */ - MEMBER_TO_FPTR(Perl_ck_fun_locale), /* lc */ + MEMBER_TO_FPTR(Perl_ck_fun), /* ucfirst */ + MEMBER_TO_FPTR(Perl_ck_fun), /* lcfirst */ + MEMBER_TO_FPTR(Perl_ck_fun), /* uc */ + MEMBER_TO_FPTR(Perl_ck_fun), /* lc */ MEMBER_TO_FPTR(Perl_ck_fun), /* quotemeta */ MEMBER_TO_FPTR(Perl_ck_rvconst), /* rv2av */ MEMBER_TO_FPTR(Perl_ck_null), /* aelemfast */ @@ -1231,7 +1267,7 @@ EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = { MEMBER_TO_FPTR(Perl_ck_rvconst), /* rv2hv */ MEMBER_TO_FPTR(Perl_ck_null), /* helem */ MEMBER_TO_FPTR(Perl_ck_null), /* hslice */ - MEMBER_TO_FPTR(Perl_ck_fun), /* unpack */ + MEMBER_TO_FPTR(Perl_ck_unpack), /* unpack */ MEMBER_TO_FPTR(Perl_ck_fun), /* pack */ MEMBER_TO_FPTR(Perl_ck_split), /* split */ MEMBER_TO_FPTR(Perl_ck_join), /* join */ @@ -1265,7 +1301,7 @@ EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = { MEMBER_TO_FPTR(Perl_ck_null), /* leavesublv */ MEMBER_TO_FPTR(Perl_ck_fun), /* caller */ MEMBER_TO_FPTR(Perl_ck_fun), /* warn */ - MEMBER_TO_FPTR(Perl_ck_fun), /* die */ + MEMBER_TO_FPTR(Perl_ck_die), /* die */ MEMBER_TO_FPTR(Perl_ck_fun), /* reset */ MEMBER_TO_FPTR(Perl_ck_null), /* lineseq */ MEMBER_TO_FPTR(Perl_ck_null), /* nextstate */ @@ -1278,14 +1314,14 @@ EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = { MEMBER_TO_FPTR(Perl_ck_null), /* iter */ MEMBER_TO_FPTR(Perl_ck_null), /* enterloop */ MEMBER_TO_FPTR(Perl_ck_null), /* leaveloop */ - MEMBER_TO_FPTR(Perl_ck_null), /* return */ + MEMBER_TO_FPTR(Perl_ck_return), /* return */ MEMBER_TO_FPTR(Perl_ck_null), /* last */ MEMBER_TO_FPTR(Perl_ck_null), /* next */ MEMBER_TO_FPTR(Perl_ck_null), /* redo */ MEMBER_TO_FPTR(Perl_ck_null), /* dump */ MEMBER_TO_FPTR(Perl_ck_null), /* goto */ - MEMBER_TO_FPTR(Perl_ck_fun), /* exit */ - MEMBER_TO_FPTR(Perl_ck_fun), /* open */ + MEMBER_TO_FPTR(Perl_ck_exit), /* exit */ + MEMBER_TO_FPTR(Perl_ck_open), /* open */ MEMBER_TO_FPTR(Perl_ck_fun), /* close */ MEMBER_TO_FPTR(Perl_ck_fun), /* pipe_op */ MEMBER_TO_FPTR(Perl_ck_fun), /* fileno */ @@ -1445,13 +1481,19 @@ EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = { MEMBER_TO_FPTR(Perl_ck_null), /* threadsv */ MEMBER_TO_FPTR(Perl_ck_null), /* setstate */ MEMBER_TO_FPTR(Perl_ck_null), /* method_named */ -}; + MEMBER_TO_FPTR(Perl_ck_null), /* dor */ + MEMBER_TO_FPTR(Perl_ck_null), /* dorassign */ + MEMBER_TO_FPTR(Perl_ck_null), /* custom */ +} #endif +; + +#ifndef PERL_GLOBAL_STRUCT_INIT #ifndef DOINIT -EXT U32 PL_opargs[]; +EXT const U32 PL_opargs[]; #else -EXT U32 PL_opargs[] = { +EXT const U32 PL_opargs[] = { 0x00000000, /* null */ 0x00000000, /* stub */ 0x00003604, /* scalar */ @@ -1478,8 +1520,8 @@ EXT U32 PL_opargs[] = { 0x00122804, /* bless */ 0x00001608, /* backtick */ 0x00012808, /* glob */ - 0x00001608, /* readline */ - 0x00001608, /* rcatline */ + 0x0001d608, /* readline */ + 0x00000c08, /* rcatline */ 0x00002204, /* regcmaybe */ 0x00002204, /* regcreset */ 0x00002604, /* regcomp */ @@ -1589,7 +1631,7 @@ EXT U32 PL_opargs[] = { 0x00000248, /* rv2hv */ 0x00028404, /* helem */ 0x00048801, /* hslice */ - 0x00022800, /* unpack */ + 0x00122800, /* unpack */ 0x0004280d, /* pack */ 0x00222808, /* split */ 0x0004280d, /* join */ @@ -1599,8 +1641,8 @@ EXT U32 PL_opargs[] = { 0x00004805, /* anonhash */ 0x05326801, /* splice */ 0x0004691d, /* push */ - 0x00007604, /* pop */ - 0x00007604, /* shift */ + 0x00017604, /* pop */ + 0x00017604, /* shift */ 0x0004691d, /* unshift */ 0x0005a801, /* sort */ 0x00004809, /* reverse */ @@ -1643,12 +1685,12 @@ EXT U32 PL_opargs[] = { 0x00001a44, /* dump */ 0x00001a44, /* goto */ 0x00013644, /* exit */ - 0x0132c81c, /* open */ + 0x0052c81d, /* open */ 0x0001d614, /* close */ 0x000cc814, /* pipe_op */ 0x0000d61c, /* fileno */ 0x0001361c, /* umask */ - 0x0000d604, /* binmode */ + 0x0012c804, /* binmode */ 0x0042e855, /* tie */ 0x0000f614, /* untie */ 0x0000f604, /* tied */ @@ -1725,7 +1767,7 @@ EXT U32 PL_opargs[] = { 0x0002291c, /* link */ 0x0002291c, /* symlink */ 0x0001368c, /* readlink */ - 0x0002291c, /* mkdir */ + 0x0013299c, /* mkdir */ 0x0001379c, /* rmdir */ 0x0002c814, /* open_dir */ 0x0000d600, /* readdir */ @@ -1799,11 +1841,17 @@ EXT U32 PL_opargs[] = { 0x00000014, /* egrent */ 0x0000000c, /* getlogin */ 0x0004281d, /* syscall */ - 0x00003604, /* lock */ + 0x0000f604, /* lock */ 0x00000044, /* threadsv */ 0x00001404, /* setstate */ 0x00000c40, /* method_named */ + 0x00000600, /* dor */ + 0x00000604, /* dorassign */ + 0x00000000, /* custom */ }; #endif END_EXTERN_C + +#endif /* !PERL_GLOBAL_STRUCT_INIT */ +/* ex: set ro: */