X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=opcode.h;h=356145f5404faf4cd9d53e570aeefeeaf6f0af88;hb=55082927c3a5e85aa9f9d6c8e76cacf11d232232;hp=01b89da89e62a48b75729df90f9fee82a0fa70b2;hpb=80a5d8e74b5512d4ab704d0e83466ae41247ce55;p=p5sagit%2Fp5-mst-13.2.git diff --git a/opcode.h b/opcode.h index 01b89da..356145f 100644 --- a/opcode.h +++ b/opcode.h @@ -1,7 +1,8 @@ /* * opcode.h * - * Copyright (c) 1997-2002, Larry Wall + * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, + * 2000, 2001, 2002, 2003, 2004, 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. @@ -20,10 +21,10 @@ 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]) +#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[]; @@ -380,6 +381,8 @@ EXT char *PL_op_name[] = { "threadsv", "setstate", "method_named", + "dor", + "dorassign", "custom", }; #endif @@ -739,6 +742,8 @@ EXT char *PL_op_desc[] = { "per-thread value", "set statement info", "method with known name", + "defined or (//)", + "defined or assignment (//=)", "unknown custom operator", }; #endif @@ -1103,6 +1108,8 @@ 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 @@ -1143,9 +1150,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 */ @@ -1247,7 +1254,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 */ @@ -1461,6 +1468,8 @@ 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 @@ -1606,7 +1615,7 @@ EXT U32 PL_opargs[] = { 0x00000248, /* rv2hv */ 0x00028404, /* helem */ 0x00048801, /* hslice */ - 0x00022800, /* unpack */ + 0x00122800, /* unpack */ 0x0004280d, /* pack */ 0x00222808, /* split */ 0x0004280d, /* join */ @@ -1616,8 +1625,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 */ @@ -1744,7 +1753,7 @@ EXT U32 PL_opargs[] = { 0x0001368c, /* readlink */ 0x0012291c, /* mkdir */ 0x0001379c, /* rmdir */ - 0x0122c814, /* open_dir */ + 0x0002c814, /* open_dir */ 0x0000d600, /* readdir */ 0x0000d60c, /* telldir */ 0x0002c804, /* seekdir */ @@ -1816,10 +1825,12 @@ 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