From: Nicholas Clark Date: Wed, 26 Nov 2008 19:36:06 +0000 (+0000) Subject: force_list(), fold_constants() and gen_constant_list() can be static. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b7783a124ffeaab87679eba041dd9997f4d5372a;p=p5sagit%2Fp5-mst-13.2.git force_list(), fold_constants() and gen_constant_list() can be static. p4raw-id: //depot/perl@34924 --- diff --git a/embed.fnc b/embed.fnc index 37b7756..6ebd2a2 100644 --- a/embed.fnc +++ b/embed.fnc @@ -273,12 +273,14 @@ ApdR |char* |fbm_instr |NN unsigned char* big|NN unsigned char* bigend \ |NN SV* littlestr|U32 flags p |char* |find_script |NN const char *scriptname|bool dosearch \ |NULLOK const char *const *const search_ext|I32 flags -p |OP* |force_list |NULLOK OP* arg -p |OP* |fold_constants |NN OP *o +#if defined(PERL_IN_OP_C) +s |OP* |force_list |NULLOK OP* arg +s |OP* |fold_constants |NN OP *o +#endif Afpd |char* |form |NN const char* pat|... Ap |char* |vform |NN const char* pat|NULLOK va_list* args Ap |void |free_tmps -p |OP* |gen_constant_list|NULLOK OP* o +s |OP* |gen_constant_list|NULLOK OP* o #if !defined(HAS_GETENV_LEN) p |char* |getenv_len |NN const char *env_elem|NN unsigned long *len #endif diff --git a/embed.h b/embed.h index 47ca12c..57eaeb8 100644 --- a/embed.h +++ b/embed.h @@ -247,14 +247,18 @@ #define fbm_instr Perl_fbm_instr #ifdef PERL_CORE #define find_script Perl_find_script -#define force_list Perl_force_list -#define fold_constants Perl_fold_constants +#endif +#if defined(PERL_IN_OP_C) +#ifdef PERL_CORE +#define force_list S_force_list +#define fold_constants S_fold_constants +#endif #endif #define form Perl_form #define vform Perl_vform #define free_tmps Perl_free_tmps #ifdef PERL_CORE -#define gen_constant_list Perl_gen_constant_list +#define gen_constant_list S_gen_constant_list #endif #if !defined(HAS_GETENV_LEN) #ifdef PERL_CORE @@ -2560,13 +2564,17 @@ #define fbm_instr(a,b,c,d) Perl_fbm_instr(aTHX_ a,b,c,d) #ifdef PERL_CORE #define find_script(a,b,c,d) Perl_find_script(aTHX_ a,b,c,d) -#define force_list(a) Perl_force_list(aTHX_ a) -#define fold_constants(a) Perl_fold_constants(aTHX_ a) +#endif +#if defined(PERL_IN_OP_C) +#ifdef PERL_CORE +#define force_list(a) S_force_list(aTHX_ a) +#define fold_constants(a) S_fold_constants(aTHX_ a) +#endif #endif #define vform(a,b) Perl_vform(aTHX_ a,b) #define free_tmps() Perl_free_tmps(aTHX) #ifdef PERL_CORE -#define gen_constant_list(a) Perl_gen_constant_list(aTHX_ a) +#define gen_constant_list(a) S_gen_constant_list(aTHX_ a) #endif #if !defined(HAS_GETENV_LEN) #ifdef PERL_CORE diff --git a/op.c b/op.c index 990cf4b..024996d 100644 --- a/op.c +++ b/op.c @@ -2431,7 +2431,7 @@ Perl_jmaybe(pTHX_ OP *o) } OP * -Perl_fold_constants(pTHX_ register OP *o) +S_fold_constants(pTHX_ register OP *o) { dVAR; register OP * VOL curop; @@ -2572,7 +2572,7 @@ Perl_fold_constants(pTHX_ register OP *o) } OP * -Perl_gen_constant_list(pTHX_ register OP *o) +S_gen_constant_list(pTHX_ register OP *o) { dVAR; register OP *curop; @@ -2986,7 +2986,7 @@ Perl_newNULLLIST(pTHX) } OP * -Perl_force_list(pTHX_ OP *o) +S_force_list(pTHX_ OP *o) { if (!o || o->op_type != OP_LIST) o = newLISTOP(OP_LIST, 0, o, NULL); diff --git a/proto.h b/proto.h index 8d25afb..6187a98 100644 --- a/proto.h +++ b/proto.h @@ -798,12 +798,14 @@ PERL_CALLCONV char* Perl_find_script(pTHX_ const char *scriptname, bool dosearch #define PERL_ARGS_ASSERT_FIND_SCRIPT \ assert(scriptname) -PERL_CALLCONV OP* Perl_force_list(pTHX_ OP* arg); -PERL_CALLCONV OP* Perl_fold_constants(pTHX_ OP *o) +#if defined(PERL_IN_OP_C) +STATIC OP* S_force_list(pTHX_ OP* arg); +STATIC OP* S_fold_constants(pTHX_ OP *o) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_FOLD_CONSTANTS \ assert(o) +#endif PERL_CALLCONV char* Perl_form(pTHX_ const char* pat, ...) __attribute__format__(__printf__,pTHX_1,pTHX_2) __attribute__nonnull__(pTHX_1); @@ -816,7 +818,7 @@ PERL_CALLCONV char* Perl_vform(pTHX_ const char* pat, va_list* args) assert(pat) PERL_CALLCONV void Perl_free_tmps(pTHX); -PERL_CALLCONV OP* Perl_gen_constant_list(pTHX_ OP* o); +STATIC OP* S_gen_constant_list(pTHX_ OP* o); #if !defined(HAS_GETENV_LEN) PERL_CALLCONV char* Perl_getenv_len(pTHX_ const char *env_elem, unsigned long *len) __attribute__nonnull__(pTHX_1)