This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate change #9108 from maintperl to mainline.
[perl5.git] / embed.pl
index 9732773..4cd8aca 100755 (executable)
--- a/embed.pl
+++ b/embed.pl
@@ -1,5 +1,9 @@
 #!/usr/bin/perl -w
 
 #!/usr/bin/perl -w
 
+BEGIN {
+    unshift @INC, "./lib";
+}
+
 require 5.003; # keep this compatible, an old perl is all we may have before
                 # we build the new one
 
 require 5.003; # keep this compatible, an old perl is all we may have before
                 # we build the new one
 
@@ -25,6 +29,7 @@ sub walk_table (&@) {
        $F = $filename;
     }
     else {
        $F = $filename;
     }
     else {
+       unlink $filename;
        open F, ">$filename" or die "Can't open $filename: $!";
        $F = \*F;
     }
        open F, ">$filename" or die "Can't open $filename: $!";
        $F = \*F;
     }
@@ -198,6 +203,7 @@ my @extvars = qw(sv_undef sv_yes sv_no na dowarn
                 diehook
                 dirty
                 perl_destruct_level
                 diehook
                 dirty
                 perl_destruct_level
+                ppaddr
                 );
 
 sub readsyms (\%$) {
                 );
 
 sub readsyms (\%$) {
@@ -2040,6 +2046,7 @@ Apd       |void   |sv_setpviv     |SV* sv|IV num
 Apd    |void   |sv_setuv       |SV* sv|UV num
 Apd    |void   |sv_setnv       |SV* sv|NV num
 Apd    |SV*    |sv_setref_iv   |SV* rv|const char* classname|IV iv
 Apd    |void   |sv_setuv       |SV* sv|UV num
 Apd    |void   |sv_setnv       |SV* sv|NV num
 Apd    |SV*    |sv_setref_iv   |SV* rv|const char* classname|IV iv
+Apd    |SV*    |sv_setref_uv   |SV* rv|const char* classname|UV uv
 Apd    |SV*    |sv_setref_nv   |SV* rv|const char* classname|NV nv
 Apd    |SV*    |sv_setref_pv   |SV* rv|const char* classname|void* pv
 Apd    |SV*    |sv_setref_pvn  |SV* rv|const char* classname|char* pv \
 Apd    |SV*    |sv_setref_nv   |SV* rv|const char* classname|NV nv
 Apd    |SV*    |sv_setref_pv   |SV* rv|const char* classname|void* pv
 Apd    |SV*    |sv_setref_pvn  |SV* rv|const char* classname|char* pv \
@@ -2087,9 +2094,12 @@ Apd      |U8*    |utf8_hop       |U8 *s|I32 off
 ApMd   |U8*    |utf8_to_bytes  |U8 *s|STRLEN *len
 ApMd   |U8*    |bytes_from_utf8|U8 *s|STRLEN *len|bool *is_utf8
 ApMd   |U8*    |bytes_to_utf8  |U8 *s|STRLEN *len
 ApMd   |U8*    |utf8_to_bytes  |U8 *s|STRLEN *len
 ApMd   |U8*    |bytes_from_utf8|U8 *s|STRLEN *len|bool *is_utf8
 ApMd   |U8*    |bytes_to_utf8  |U8 *s|STRLEN *len
-Apd    |UV     |utf8_to_uv_simple|U8 *s|STRLEN* retlen
-Adp    |UV     |utf8_to_uv     |U8 *s|STRLEN curlen|STRLEN* retlen|U32 flags
-Apd    |U8*    |uv_to_utf8     |U8 *d|UV uv
+Apd    |UV     |utf8_to_uvchr  |U8 *s|STRLEN* retlen
+Apd    |UV     |utf8_to_uvuni  |U8 *s|STRLEN* retlen
+Adp    |UV     |utf8n_to_uvchr |U8 *s|STRLEN curlen|STRLEN* retlen|U32 flags
+Adp    |UV     |utf8n_to_uvuni |U8 *s|STRLEN curlen|STRLEN* retlen|U32 flags
+Apd    |U8*    |uvchr_to_utf8  |U8 *d|UV uv
+Apd    |U8*    |uvuni_to_utf8  |U8 *d|UV uv
 p      |void   |vivify_defelem |SV* sv
 p      |void   |vivify_ref     |SV* sv|U32 to_what
 p      |I32    |wait4pid       |Pid_t pid|int* statusp|int flags
 p      |void   |vivify_defelem |SV* sv
 p      |void   |vivify_ref     |SV* sv|U32 to_what
 p      |I32    |wait4pid       |Pid_t pid|int* statusp|int flags
@@ -2174,10 +2184,10 @@ Ap      |char*  |sv_2pvbyte_nolen|SV* sv
 Ap     |char*  |sv_pv          |SV *sv
 Ap     |char*  |sv_pvutf8      |SV *sv
 Ap     |char*  |sv_pvbyte      |SV *sv
 Ap     |char*  |sv_pv          |SV *sv
 Ap     |char*  |sv_pvutf8      |SV *sv
 Ap     |char*  |sv_pvbyte      |SV *sv
-Apd      |void   |sv_utf8_upgrade|SV *sv
-ApdM      |bool   |sv_utf8_downgrade|SV *sv|bool fail_ok
-ApdM      |void   |sv_utf8_encode |SV *sv
-Ap      |bool   |sv_utf8_decode |SV *sv
+Apd    |STRLEN |sv_utf8_upgrade|SV *sv
+ApdM   |bool   |sv_utf8_downgrade|SV *sv|bool fail_ok
+Apd    |void   |sv_utf8_encode |SV *sv
+ApdM   |bool   |sv_utf8_decode |SV *sv
 Ap     |void   |sv_force_normal|SV *sv
 Ap     |void   |sv_force_normal_flags|SV *sv|U32 flags
 Ap     |void   |tmps_grow      |I32 n
 Ap     |void   |sv_force_normal|SV *sv
 Ap     |void   |sv_force_normal_flags|SV *sv|U32 flags
 Ap     |void   |tmps_grow      |I32 n
@@ -2208,6 +2218,8 @@ Ap        |PTR_TBL_t*|ptr_table_new
 Ap     |void*  |ptr_table_fetch|PTR_TBL_t *tbl|void *sv
 Ap     |void   |ptr_table_store|PTR_TBL_t *tbl|void *oldsv|void *newsv
 Ap     |void   |ptr_table_split|PTR_TBL_t *tbl
 Ap     |void*  |ptr_table_fetch|PTR_TBL_t *tbl|void *sv
 Ap     |void   |ptr_table_store|PTR_TBL_t *tbl|void *oldsv|void *newsv
 Ap     |void   |ptr_table_split|PTR_TBL_t *tbl
+Ap     |void   |ptr_table_clear|PTR_TBL_t *tbl
+Ap     |void   |ptr_table_free|PTR_TBL_t *tbl
 #endif
 #if defined(HAVE_INTERP_INTERN)
 Ap     |void   |sys_intern_clear
 #endif
 #if defined(HAVE_INTERP_INTERN)
 Ap     |void   |sys_intern_clear
@@ -2276,7 +2288,9 @@ s |OP*    |new_logop      |I32 type|I32 flags|OP **firstp|OP **otherp
 s      |void   |simplify_sort  |OP *o
 s      |bool   |is_handle_constructor  |OP *o|I32 argnum
 s      |char*  |gv_ename       |GV *gv
 s      |void   |simplify_sort  |OP *o
 s      |bool   |is_handle_constructor  |OP *o|I32 argnum
 s      |char*  |gv_ename       |GV *gv
+#  if defined(DEBUG_CLOSURES)
 s      |void   |cv_dump        |CV *cv
 s      |void   |cv_dump        |CV *cv
+#  endif
 s      |CV*    |cv_clone2      |CV *proto|CV *outside
 s      |bool   |scalar_mod_type|OP *o|I32 type
 s      |OP *   |my_kid         |OP *o|OP *attrs
 s      |CV*    |cv_clone2      |CV *proto|CV *outside
 s      |bool   |scalar_mod_type|OP *o|I32 type
 s      |OP *   |my_kid         |OP *o|OP *attrs
@@ -2343,7 +2357,6 @@ s |I32    |dopoptolabel   |char *label
 s      |I32    |dopoptoloop    |I32 startingblock
 s      |I32    |dopoptosub     |I32 startingblock
 s      |I32    |dopoptosub_at  |PERL_CONTEXT* cxstk|I32 startingblock
 s      |I32    |dopoptoloop    |I32 startingblock
 s      |I32    |dopoptosub     |I32 startingblock
 s      |I32    |dopoptosub_at  |PERL_CONTEXT* cxstk|I32 startingblock
-s      |void   |free_closures
 s      |void   |save_lines     |AV *array|SV *sv
 s      |OP*    |doeval         |int gimme|OP** startop
 s      |PerlIO *|doopen_pmc    |const char *name|const char *mode
 s      |void   |save_lines     |AV *array|SV *sv
 s      |OP*    |doeval         |int gimme|OP** startop
 s      |PerlIO *|doopen_pmc    |const char *name|const char *mode
@@ -2480,6 +2493,10 @@ s      |int    |sv_2inuv_non_preserve  |SV *sv|I32 numtype
 s      |int    |sv_2iuv_non_preserve   |SV *sv|I32 numtype
 #  endif
 s      |I32    |expect_number  |char** pattern
 s      |int    |sv_2iuv_non_preserve   |SV *sv|I32 numtype
 #  endif
 s      |I32    |expect_number  |char** pattern
+#
+#  if defined(USE_ITHREADS)
+s      |SV*    |gv_share       |SV *sv
+#  endif
 #endif
 
 #if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)
 #endif
 
 #if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)