PERL_BINCOMPAT_5005 symbol translation.
[p5sagit/p5-mst-13.2.git] / makedef.pl
CommitLineData
549a6b10 1#
2# Create the export list for perl.
3#
2c2d71f5 4# Needed by WIN32 and OS/2 for creating perl.dll
5# and by AIX for creating libperl.a when -Dusershrplib is in effect.
549a6b10 6#
22c35a8c 7# reads global.sym, pp.sym, perlvars.h, intrpvar.h, thrdvar.h, config.h
2c2d71f5 8# On OS/2 reads miniperl.map as well
0a753a76 9
549a6b10 10my $PLATFORM;
11my $CCTYPE;
910dfcc8 12
28dc62dc 13my %bincompat5005 =
14 (Perl_call_argv => "perl_call_argv",
15 Perl_call_method => "perl_call_method",
16 Perl_call_pv => "perl_call_pv",
17 Perl_call_sv => "perl_call_sv",
18 Perl_get_av => "perl_get_av",
19 Perl_get_cv => "perl_get_cv",
20 Perl_get_hv => "perl_get_hv",
21 Perl_get_sv => "perl_get_sv",
22 Perl_init_i18nl10n => "perl_init_i18nl10n",
23 Perl_init_i18nl14n => "perl_init_i18nl14n",
24 Perl_new_collate => "perl_new_collate",
25 Perl_new_ctype => "perl_new_ctype",
26 Perl_new_numeric => "perl_new_numeric",
27 Perl_require_pv => "perl_require_pv",
28 Perl_safesyscalloc => "Perl_safecalloc",
29 Perl_safesysfree => "Perl_safefree",
30 Perl_safesysmalloc => "Perl_safemalloc",
31 Perl_safesysrealloc => "Perl_saferealloc",
32 Perl_set_numeric_local => "perl_set_numeric_local",
33 Perl_set_numeric_standard => "perl_set_numeric_standard");
34
35my $bincompat5005 = join("|", keys %bincompat5005);
36
910dfcc8 37while (@ARGV)
d55594ae 38 {
39 my $flag = shift;
40 $define{$1} = 1 if ($flag =~ /^-D(\w+)$/);
2c2d71f5 41 $define{$1} = $2 if ($flag =~ /^-D(\w+)=(.+)$/);
549a6b10 42 $CCTYPE = $1 if ($flag =~ /^CCTYPE=(\w+)$/);
43 $PLATFORM = $1 if ($flag =~ /^PLATFORM=(\w+)$/);
d55594ae 44 }
45
2c2d71f5 46my @PLATFORM = qw(aix win32 os2);
549a6b10 47my %PLATFORM;
48@PLATFORM{@PLATFORM} = ();
49
50defined $PLATFORM || die "PLATFORM undefined, must be one of: @PLATFORM\n";
51exists $PLATFORM{$PLATFORM} || die "PLATFORM must be one of: @PLATFORM\n";
52
53my $config_sh = "config.sh";
54my $config_h = "config.h";
55my $thrdvar_h = "thrdvar.h";
56my $intrpvar_h = "intrpvar.h";
57my $perlvars_h = "perlvars.h";
58my $global_sym = "global.sym";
59my $pp_sym = "pp.sym";
60my $globvar_sym = "globvar.sym";
61my $perlio_sym = "perlio.sym";
62
63if ($PLATFORM eq 'aix') {
64 # Nothing for now.
65} elsif ($PLATFORM eq 'win32') {
66 $CCTYPE = "MSVC" unless defined $CCTYPE;
67 foreach ($thrdvar_h, $intrpvar_h, $perlvars_h, $global_sym, $pp_sym, $globvar_sym) {
68 s!^!..\\!;
69 }
70}
71
72unless ($PLATFORM eq 'win32') {
73 open(CFG,$config_sh) || die "Cannot open $config_sh: $!\n";
74 while (<CFG>)
75 {
76 if (/^(?:ccflags|optimize)='(.+)'$/) {
77 $_ = $1;
78 $define{$1} = 1 while /-D(\w+)/g;
79 }
2c2d71f5 80 if ($PLATFORM eq 'os2') {
81 $CONFIG_ARGS = $1 if /^(?:config_args)='(.+)'$/;
82 $ARCHNAME = $1 if /^(?:archname)='(.+)'$/;
83 }
549a6b10 84 }
85 close(CFG);
86}
87
88open(CFG,$config_h) || die "Cannot open $config_h: $!\n";
bbc8f9de 89while (<CFG>)
90 {
91 $define{$1} = 1 if /^\s*#\s*define\s+(MYMALLOC)\b/;
924b3ec4 92 $define{$1} = 1 if /^\s*#\s*define\s+(USE_THREADS)\b/;
549a6b10 93 $define{$1} = 1 if /^\s*#\s*define\s+(USE_PERLIO)\b/;
b86a2fa7 94 $define{$1} = 1 if /^\s*#\s*define\s+(MULTIPLICITY)\b/;
bbc8f9de 95 }
96close(CFG);
97
549a6b10 98if ($PLATFORM eq 'win32') {
99 warn join(' ',keys %define)."\n";
100 if ($define{PERL_OBJECT}) {
3075ddba 101 print "LIBRARY Perl56\n";
549a6b10 102 print "DESCRIPTION 'Perl interpreter'\n";
103 print "EXPORTS\n";
51371543 104# output_symbol("perl_alloc");
549a6b10 105 output_symbol("perl_get_host_info");
106 output_symbol("perl_alloc_using");
51371543 107# output_symbol("perl_construct");
108# output_symbol("perl_destruct");
109# output_symbol("perl_free");
110# output_symbol("perl_parse");
111# output_symbol("perl_run");
112# output_symbol("RunPerl");
51371543 113# exit(0);
51371543 114 }
115 else {
549a6b10 116 if ($CCTYPE ne 'GCC') {
117 print "LIBRARY Perl\n";
118 print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
119 }
120 else {
121 $define{'PERL_GLOBAL_STRUCT'} = 1;
122 $define{'MULTIPLICITY'} = 1;
123 }
124 print "EXPORTS\n";
125 }
2c2d71f5 126} elsif ($PLATFORM eq 'os2') {
127 ($v = $]) =~ s/(\d\.\d\d\d)(\d\d)$/$1_$2/;
128 $v .= '-thread' if $ARCHNAME =~ /-thread/;
129 #$sum = 0;
130 #for (split //, $v) {
131 # $sum = ($sum * 33) + ord;
132 # $sum &= 0xffffff;
133 #}
134 #$sum += $sum >> 5;
135 #$sum &= 0xffff;
136 #$sum = printf '%X', $sum;
137 ($dll = $define{PERL_DLL}) =~ s/\.dll$//i;
138 # print STDERR "'$dll' <= '$define{PERL_DLL}'\n";
139 print <<"---EOP---";
140LIBRARY '$dll' INITINSTANCE TERMINSTANCE
141DESCRIPTION '\@#perl5-porters\@perl.org:$v#\@ Perl interpreter, configured as $CONFIG_ARGS'
142STACKSIZE 32768
143CODE LOADONCALL
144DATA LOADONCALL NONSHARED MULTIPLE
145EXPORTS
146---EOP---
549a6b10 147} elsif ($PLATFORM eq 'aix') {
148 print "#!\n";
ac4c12e7 149}
bbc8f9de 150
22239a37 151my %skip;
152my %export;
153
51371543 154sub skip_symbols {
155 my $list = shift;
156 foreach my $symbol (@$list) {
157 $skip{$symbol} = 1;
158 }
22239a37 159}
160
51371543 161sub emit_symbols {
162 my $list = shift;
163 foreach my $symbol (@$list) {
164 my $skipsym = $symbol;
165 # XXX hack
166 if ($define{PERL_OBJECT}) {
167 $skipsym =~ s/^Perl_[GIT](\w+)_ptr$/PL_$1/;
168 }
169 emit_symbol($symbol) unless exists $skip{$skipsym};
170 }
22239a37 171}
172
549a6b10 173if ($PLATFORM eq 'win32') {
22239a37 174skip_symbols [qw(
db15561c 175PL_statusvalue_vms
176PL_archpat_auto
177PL_cryptseen
178PL_DBcv
179PL_generation
db15561c 180PL_lastgotoprobe
181PL_linestart
182PL_modcount
183PL_pending_ident
184PL_sortcxix
185PL_sublex_info
186PL_timesbuf
4f63d024 187main
188Perl_ErrorNo
189Perl_GetVars
a6c40364 190Perl_do_exec3
0a753a76 191Perl_do_ipcctl
192Perl_do_ipcget
193Perl_do_msgrcv
194Perl_do_msgsnd
195Perl_do_semop
196Perl_do_shmio
0a753a76 197Perl_dump_fds
d55594ae 198Perl_init_thread_intern
0a753a76 199Perl_my_bzero
200Perl_my_htonl
201Perl_my_ntohl
202Perl_my_swap
203Perl_my_chsize
0a753a76 204Perl_same_dirent
68dc0745 205Perl_setenv_getix
0a753a76 206Perl_unlnk
0a753a76 207Perl_watch
0a753a76 208Perl_safexcalloc
209Perl_safexmalloc
210Perl_safexfree
211Perl_safexrealloc
68dc0745 212Perl_my_memcmp
8b10511d 213Perl_my_memset
db15561c 214PL_cshlen
215PL_cshname
216PL_opsave
22239a37 217)];
549a6b10 218} elsif ($PLATFORM eq 'aix') {
219 skip_symbols([qw(
220Perl_dump_fds
221Perl_ErrorNo
222Perl_GetVars
223Perl_my_bcopy
224Perl_my_bzero
225Perl_my_chsize
226Perl_my_htonl
227Perl_my_memcmp
228Perl_my_memset
229Perl_my_ntohl
230Perl_my_swap
231Perl_safexcalloc
232Perl_safexfree
233Perl_safexmalloc
234Perl_safexrealloc
235Perl_same_dirent
236Perl_unlnk
237PL_cryptseen
238PL_opsave
239PL_statusvalue_vms
240PL_sys_intern
241)]);
242}
0a753a76 243
2c2d71f5 244if ($PLATFORM eq 'os2') {
245 emit_symbols([qw(
246ctermid
247get_sysinfo
248Perl_OS2_init
249OS2_Perl_data
250dlopen
251dlsym
252dlerror
253my_tmpfile
254my_tmpnam
255my_flock
256malloc_mutex
257threads_mutex
258nthreads
259nthreads_cond
260os2_cond_wait
261pthread_join
262pthread_create
263pthread_detach
264XS_Cwd_change_drive
265XS_Cwd_current_drive
266XS_Cwd_extLibpath
267XS_Cwd_extLibpath_set
268XS_Cwd_sys_abspath
269XS_Cwd_sys_chdir
270XS_Cwd_sys_cwd
271XS_Cwd_sys_is_absolute
272XS_Cwd_sys_is_relative
273XS_Cwd_sys_is_rooted
274XS_DynaLoader_mod2fname
275XS_File__Copy_syscopy
276Perl_Register_MQ
277Perl_Deregister_MQ
278Perl_Serve_Messages
279Perl_Process_Messages
280init_PMWIN_entries
281PMWIN_entries
282Perl_hab_GET
283)]);
284}
285
51371543 286if ($define{'PERL_OBJECT'}) {
287 skip_symbols [qw(
288 Perl_getenv_len
289 Perl_my_popen
290 Perl_my_pclose
291 )];
292}
293else {
294 skip_symbols [qw(
295 PL_Dir
296 PL_Env
297 PL_LIO
298 PL_Mem
299 PL_Proc
300 PL_Sock
301 PL_StdIO
302 )];
303}
c69f112c 304
bbc8f9de 305if ($define{'MYMALLOC'})
306 {
22239a37 307 emit_symbols [qw(
9423c6fc 308 Perl_dump_mstats
22239a37 309 Perl_malloc
f2517201 310 Perl_mfree
22239a37 311 Perl_realloc
312 Perl_calloc)];
bbc8f9de 313 }
32fcaa0b 314else
315 {
316 skip_symbols [qw(
df31f264 317 Perl_dump_mstats
4f63d024 318 Perl_malloc
319 Perl_mfree
320 Perl_realloc
321 Perl_calloc
32fcaa0b 322 Perl_malloced_size)];
323 }
bbc8f9de 324
d55594ae 325unless ($define{'USE_THREADS'})
326 {
22239a37 327 skip_symbols [qw(
db15561c 328PL_thr_key
329PL_sv_mutex
46124e9e 330PL_strtab_mutex
db15561c 331PL_svref_mutex
332PL_malloc_mutex
5ff3f7a4 333PL_cred_mutex
db15561c 334PL_eval_mutex
335PL_eval_cond
336PL_eval_owner
337PL_threads_mutex
338PL_nthreads
339PL_nthreads_cond
340PL_threadnum
341PL_threadsv_names
342PL_thrsv
22c35a8c 343PL_vtbl_mutex
eb480a0b 344Perl_getTHR
345Perl_setTHR
d55594ae 346Perl_condpair_magic
32f822de 347Perl_new_struct_thread
32f822de 348Perl_per_thread_magicals
d4cce5f1 349Perl_thread_create
350Perl_find_threadsv
d55594ae 351Perl_unlock_condpair
d55594ae 352Perl_magic_mutexfree
95906810 353)];
910dfcc8 354 }
c5be433b 355unless ($define{'USE_THREADS'} or $define{'PERL_IMPLICIT_CONTEXT'}
356 or $define{'PERL_OBJECT'})
357{
4f63d024 358 skip_symbols [qw(
359 Perl_croak_nocontext
360 Perl_die_nocontext
c5be433b 361 Perl_deb_nocontext
4f63d024 362 Perl_form_nocontext
363 Perl_warn_nocontext
c5be433b 364 Perl_warner_nocontext
4f63d024 365 Perl_newSVpvf_nocontext
366 Perl_sv_catpvf_nocontext
367 Perl_sv_setpvf_nocontext
368 Perl_sv_catpvf_mg_nocontext
369 Perl_sv_setpvf_mg_nocontext
370 )];
371 }
d4cce5f1 372
910dfcc8 373unless ($define{'FAKE_THREADS'})
374 {
db15561c 375 skip_symbols [qw(PL_curthr)];
d55594ae 376 }
377
22239a37 378sub readvar
379{
380 my $file = shift;
51371543 381 my $proc = shift || sub { "PL_$_[2]" };
549a6b10 382 open(VARS,$file) || die "Cannot open $file: $!\n";
22239a37 383 my @syms;
384 while (<VARS>)
385 {
386 # All symbols have a Perl_ prefix because that's what embed.h
387 # sticks in front of them.
51371543 388 push(@syms, &$proc($1,$2,$3)) if (/\bPERLVAR(A?I?C?)\(([IGT])(\w+)/);
22239a37 389 }
390 close(VARS);
391 return \@syms;
392}
393
d4cce5f1 394if ($define{'USE_THREADS'} || $define{'MULTIPLICITY'})
d55594ae 395 {
549a6b10 396 my $thrd = readvar($thrdvar_h);
22239a37 397 skip_symbols $thrd;
d55594ae 398 }
399
d4cce5f1 400if ($define{'MULTIPLICITY'})
d55594ae 401 {
549a6b10 402 my $interp = readvar($intrpvar_h);
22239a37 403 skip_symbols $interp;
404 }
405
406if ($define{'PERL_GLOBAL_STRUCT'})
407 {
549a6b10 408 my $global = readvar($perlvars_h);
22239a37 409 skip_symbols $global;
852c2e52 410 emit_symbols [qw(Perl_GetVars)];
db15561c 411 emit_symbols [qw(PL_Vars PL_VarsPtr)] unless $CCTYPE eq 'GCC';
d4cce5f1 412 }
d55594ae 413
36c15d3f 414unless ($define{'DEBUGGING'})
415 {
22239a37 416 skip_symbols [qw(
fea7140c 417 Perl_deb
418 Perl_deb_growlevel
419 Perl_debop
420 Perl_debprofdump
421 Perl_debstack
422 Perl_debstackptrs
22239a37 423 Perl_runops_debug
424 Perl_sv_peek
3836fe67 425 PL_block_type
22c35a8c 426 PL_watchaddr
427 PL_watchok)];
36c15d3f 428 }
429
549a6b10 430if ($PLATFORM eq 'win32' && $define{'HAVE_DES_FCRYPT'})
26618a56 431 {
432 emit_symbols [qw(win32_crypt)];
433 }
434
22c35a8c 435# functions from *.sym files
436
549a6b10 437my @syms = ($global_sym, $pp_sym, $globvar_sym);
438
439if ($define{'USE_PERLIO'})
22239a37 440 {
549a6b10 441 push @syms, $perlio_sym;
442 }
443
444for my $syms (@syms)
445 {
446 open (GLOBAL, "<$syms") || die "failed to open $syms: $!\n";
22c35a8c 447 while (<GLOBAL>)
448 {
449 next if (!/^[A-Za-z]/);
450 # Functions have a Perl_ prefix
451 # Variables have a PL_ prefix
452 chomp($_);
4f63d024 453 my $symbol = ($syms =~ /var\.sym$/i ? "PL_" : "");
22c35a8c 454 $symbol .= $_;
455 emit_symbol($symbol) unless exists $skip{$symbol};
456 }
457 close(GLOBAL);
22239a37 458 }
0a753a76 459
22c35a8c 460# variables
0a753a76 461
51371543 462if ($define{'PERL_OBJECT'}) {
43cd9f80 463 for my $f ($perlvars_h, $intrpvar_h, $thrdvar_h) {
51371543 464 my $glob = readvar($f, sub { "Perl_" . $_[1] . $_[2] . "_ptr" });
465 emit_symbols $glob;
466 }
467}
468else {
469 unless ($define{'PERL_GLOBAL_STRUCT'}) {
549a6b10 470 my $glob = readvar($perlvars_h);
51371543 471 emit_symbols $glob;
472 }
473 unless ($define{'MULTIPLICITY'}) {
549a6b10 474 my $glob = readvar($intrpvar_h);
51371543 475 emit_symbols $glob;
476 }
477
478 unless ($define{'MULTIPLICITY'} || $define{'USE_THREADS'}) {
549a6b10 479 my $glob = readvar($thrdvar_h);
51371543 480 emit_symbols $glob;
481 }
482}
0a753a76 483
549a6b10 484sub try_symbol {
485 my $symbol = shift;
22239a37 486
549a6b10 487 return if $symbol !~ /^[A-Za-z]/;
488 return if $symbol =~ /^\#/;
489 $symbol =~s/\r//g;
490 chomp($symbol);
43cd9f80 491 return if exists $skip{$symbol};
549a6b10 492 emit_symbol($symbol);
3e3baf6d 493}
0a753a76 494
549a6b10 495while (<DATA>) {
496 try_symbol($_);
ac4c12e7 497}
498
549a6b10 499if ($PLATFORM eq 'win32') {
500 foreach my $symbol (qw(
d28b3ca3 501boot_DynaLoader
549a6b10 502Perl_getTHR
503Perl_init_os_extras
504Perl_setTHR
d55594ae 505Perl_thread_create
549a6b10 506Perl_win32_init
507RunPerl
43cd9f80 508GetPerlInterpreter
509SetPerlInterpreter
68dc0745 510win32_errno
96e4d5b1 511win32_environ
68dc0745 512win32_stdin
513win32_stdout
96e4d5b1 514win32_stderr
68dc0745 515win32_ferror
516win32_feof
517win32_strerror
518win32_fprintf
519win32_printf
520win32_vfprintf
96e4d5b1 521win32_vprintf
68dc0745 522win32_fread
523win32_fwrite
524win32_fopen
525win32_fdopen
526win32_freopen
527win32_fclose
528win32_fputs
529win32_fputc
530win32_ungetc
531win32_getc
532win32_fileno
533win32_clearerr
534win32_fflush
535win32_ftell
536win32_fseek
537win32_fgetpos
538win32_fsetpos
539win32_rewind
540win32_tmpfile
541win32_abort
542win32_fstat
96e4d5b1 543win32_stat
68dc0745 544win32_pipe
545win32_popen
546win32_pclose
e24c7c18 547win32_rename
68dc0745 548win32_setmode
96e4d5b1 549win32_lseek
550win32_tell
68dc0745 551win32_dup
552win32_dup2
96e4d5b1 553win32_open
554win32_close
555win32_eof
68dc0745 556win32_read
557win32_write
3e3baf6d 558win32_spawnvp
5aabfad6 559win32_mkdir
560win32_rmdir
561win32_chdir
c90c0ff4 562win32_flock
eb62e965 563win32_execv
6890e559 564win32_execvp
54310121 565win32_htons
566win32_ntohs
567win32_htonl
568win32_ntohl
569win32_inet_addr
570win32_inet_ntoa
571win32_socket
572win32_bind
573win32_listen
574win32_accept
575win32_connect
576win32_send
577win32_sendto
578win32_recv
579win32_recvfrom
580win32_shutdown
3a25acb4 581win32_closesocket
54310121 582win32_ioctlsocket
583win32_setsockopt
584win32_getsockopt
585win32_getpeername
586win32_getsockname
587win32_gethostname
588win32_gethostbyname
589win32_gethostbyaddr
590win32_getprotobyname
591win32_getprotobynumber
592win32_getservbyname
593win32_getservbyport
594win32_select
595win32_endhostent
596win32_endnetent
597win32_endprotoent
598win32_endservent
599win32_getnetent
600win32_getnetbyname
601win32_getnetbyaddr
602win32_getprotoent
603win32_getservent
604win32_sethostent
605win32_setnetent
606win32_setprotoent
607win32_setservent
ad2e33dc 608win32_getenv
ac5c734f 609win32_putenv
84902520 610win32_perror
611win32_setbuf
612win32_setvbuf
613win32_flushall
614win32_fcloseall
615win32_fgets
616win32_gets
617win32_fgetc
618win32_putc
619win32_puts
620win32_getchar
621win32_putchar
622win32_malloc
623win32_calloc
624win32_realloc
625win32_free
f3986ebb 626win32_sleep
627win32_times
628win32_alarm
65e48ea9 629win32_open_osfhandle
630win32_get_osfhandle
f998180f 631win32_ioctl
ad0751ec 632win32_utime
b2af26b1 633win32_uname
22fae026 634win32_wait
f55ee38a 635win32_waitpid
636win32_kill
22fae026 637win32_str_os_error
ce2e26e5 638win32_opendir
639win32_readdir
640win32_telldir
641win32_seekdir
642win32_rewinddir
643win32_closedir
8ac9c18d 644win32_longpath
0cb96387 645win32_os_id
549a6b10 646 )) {
647 try_symbol($symbol);
648 }
649}
2c2d71f5 650elsif ($PLATFORM eq 'os2') {
651 open MAP, 'miniperl.map' or die 'Cannot read miniperl.map';
652 /^\s*[\da-f:]+\s+(\w+)/i and $mapped{$1}++ foreach <MAP>;
653 close MAP or die 'Cannot close miniperl.map';
654
655 @missing = grep { !exists $mapped{$_} } keys %export;
656 delete $export{$_} foreach @missing;
657}
22239a37 658
549a6b10 659# Now all symbols should be defined because
660# next we are going to output them.
661
662foreach my $symbol (sort keys %export)
663 {
664 output_symbol($symbol);
665 }
666
667sub emit_symbol {
668 my $symbol = shift;
669 chomp($symbol);
670 $export{$symbol} = 1;
671}
672
673sub output_symbol {
674 my $symbol = shift;
28dc62dc 675 $symbol = $bincompat5005{$symbol} if $symbol =~ /^($bincompat5005)$/;
549a6b10 676 if ($PLATFORM eq 'win32') {
549a6b10 677 $symbol = "_$symbol" if $CCTYPE eq 'BORLAND';
520c758a 678 print "\t$symbol\n";
549a6b10 679# XXX: binary compatibility between compilers is an exercise
680# in frustration :-(
681# if ($CCTYPE eq "BORLAND") {
682# # workaround Borland quirk by exporting both the straight
683# # name and a name with leading underscore. Note the
684# # alias *must* come after the symbol itself, if both
685# # are to be exported. (Linker bug?)
686# print "\t_$symbol\n";
687# print "\t$symbol = _$symbol\n";
688# }
689# elsif ($CCTYPE eq 'GCC') {
690# # Symbols have leading _ whole process is $%@"% slow
691# # so skip aliases for now
692# nprint "\t$symbol\n";
693# }
694# else {
695# # for binary coexistence, export both the symbol and
696# # alias with leading underscore
697# print "\t$symbol\n";
698# print "\t_$symbol = $symbol\n";
699# }
2c2d71f5 700 } elsif ($PLATFORM eq 'os2') {
701 print qq( "$symbol"\n);
549a6b10 702 } elsif ($PLATFORM eq 'aix') {
703 print "$symbol\n";
704 }
705}
706
7071;
708__DATA__
709# extra globals not included above.
710perl_alloc
711perl_construct
712perl_destruct
713perl_free
714perl_parse
715perl_run