X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/bfed75c6338f0ba740aa210f4b0267e39ca4662b..cc8382cb63e73f1c3483d327d0b7d0f58659fd51:/opcode.h diff --git a/opcode.h b/opcode.h index 85b78b6..1a4c507 100644 --- a/opcode.h +++ b/opcode.h @@ -1,8 +1,9 @@ -/* +/* -*- buffer-read-only: t -*- + * * opcode.h * * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, - * 2000, 2001, 2002, 2003, 2004, by Larry Wall and others + * 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. @@ -12,24 +13,24 @@ * 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 const char *PL_op_name[]; +EXTCONST char* const PL_op_name[]; #else -EXT const char *PL_op_name[] = { +EXTCONST char* const PL_op_name[] = { "null", "stub", "scalar", @@ -388,9 +389,9 @@ EXT const char *PL_op_name[] = { #endif #ifndef DOINIT -EXT const char *PL_op_desc[]; +EXTCONST char* const PL_op_desc[]; #else -EXT const char *PL_op_desc[] = { +EXTCONST char* const PL_op_desc[] = { "null operation", "stub", "scalar", @@ -750,13 +751,19 @@ EXT const char *PL_op_desc[] = { 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), @@ -1110,13 +1117,19 @@ EXT OP * (CPERLscope(*PL_ppaddr)[])(pTHX) = { 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 */ @@ -1471,13 +1484,16 @@ EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = { 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 */ @@ -1751,7 +1767,7 @@ EXT U32 PL_opargs[] = { 0x0002291c, /* link */ 0x0002291c, /* symlink */ 0x0001368c, /* readlink */ - 0x0012291c, /* mkdir */ + 0x0013299c, /* mkdir */ 0x0001379c, /* rmdir */ 0x0002c814, /* open_dir */ 0x0000d600, /* readdir */ @@ -1836,3 +1852,6 @@ EXT U32 PL_opargs[] = { #endif END_EXTERN_C + +#endif /* !PERL_GLOBAL_STRUCT_INIT */ +/* ex: set ro: */