This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
embed.pl can read the names of ck_* functions direct from regen/opcodes
authorNicholas Clark <nick@ccl4.org>
Sun, 9 Jan 2011 10:08:29 +0000 (10:08 +0000)
committerNicholas Clark <nick@ccl4.org>
Sun, 9 Jan 2011 10:08:29 +0000 (10:08 +0000)
Previously regen/opcode.pl wrote them to pp.sym for regen/embed.pl to read.

pp.sym
regen/embed.pl
regen/opcode.pl

diff --git a/pp.sym b/pp.sym
index 11e8f78..09a35fc 100644 (file)
--- a/pp.sym
+++ b/pp.sym
@@ -5,50 +5,6 @@
 #   here will be lost!
 #
 
-Perl_ck_anoncode
-Perl_ck_bitop
-Perl_ck_chdir
-Perl_ck_concat
-Perl_ck_defined
-Perl_ck_delete
-Perl_ck_die
-Perl_ck_each
-Perl_ck_eof
-Perl_ck_eval
-Perl_ck_exec
-Perl_ck_exists
-Perl_ck_exit
-Perl_ck_ftst
-Perl_ck_fun
-Perl_ck_glob
-Perl_ck_grep
-Perl_ck_index
-Perl_ck_join
-Perl_ck_lfun
-Perl_ck_listiob
-Perl_ck_match
-Perl_ck_method
-Perl_ck_null
-Perl_ck_open
-Perl_ck_push
-Perl_ck_readline
-Perl_ck_repeat
-Perl_ck_require
-Perl_ck_return
-Perl_ck_rfun
-Perl_ck_rvconst
-Perl_ck_sassign
-Perl_ck_select
-Perl_ck_shift
-Perl_ck_smartmatch
-Perl_ck_sort
-Perl_ck_spair
-Perl_ck_split
-Perl_ck_subr
-Perl_ck_substr
-Perl_ck_svconst
-Perl_ck_trunc
-Perl_ck_unpack
 Perl_pp_null
 Perl_pp_stub
 Perl_pp_scalar
index 92dcfce..2a7d344 100755 (executable)
@@ -123,6 +123,25 @@ while (<IN>) {
     push @embed, \@args;
 }
 
+open IN, 'regen/opcodes' or die $!;
+{
+    my %syms;
+
+    while (<IN>) {
+       chop;
+       next unless $_;
+       next if /^#/;
+       my (undef, undef, $check) = split /\t+/, $_;
+       ++$syms{$check};
+    }
+
+    foreach (keys %syms) {
+       # These are all indirectly referenced by globals.c.
+       push @embed, ['pR', 'OP *', $_, 'NN OP *o'];
+    }
+}
+close IN;
+
 open IN, 'pp.sym' or die $!;
 {
     my %syms;
@@ -138,12 +157,7 @@ open IN, 'pp.sym' or die $!;
 
     foreach (sort keys %syms) {
        s/^Perl_//;
-       if (/^ck_/) {
-           # These are all indirectly referenced by globals.c.
-           # This is somewhat annoying.
-           push @embed, ['pR', 'OP *', $_, 'NN OP *o'];
-       }
-       elsif (/^pp_/) {
+       if (/^pp_/) {
            push @embed, ['p', 'OP *', $_];
        }
        else {
index 54b78b8..a8f5e0b 100755 (executable)
@@ -482,11 +482,6 @@ print $ppsym <<"END";
 END
 
 
-for (sort keys %ckname) {
-    print $ppsym "Perl_$_\n";
-#OP *\t", &tab(3,$_),"(OP* o);\n";
-}
-
 for (@ops) {
     next if /^i_(pre|post)(inc|dec)$/;
     next if /^custom$/;