Add LOG_PERROR; prettify the "removed".
[p5sagit/p5-mst-13.2.git] / opcode.pl
index 2e6ae01..c435f42 100755 (executable)
--- a/opcode.pl
+++ b/opcode.pl
@@ -31,7 +31,7 @@ while (<DATA>) {
 
 $i = 0;
 print <<"END";
-/* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!! 
+/* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
    This file is built by opcode.pl from its data.  Any changes made here
    will be lost!
 */
@@ -44,7 +44,7 @@ print <<"END";
 END
 
 print ON <<"END";
-/* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!! 
+/* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
    This file is built by opcode.pl from its data.  Any changes made here
    will be lost!
 */
@@ -93,7 +93,7 @@ END
 for (@ops) {
     my($safe_desc) = $desc{$_};
 
-    # Have to escape double quotes and escape characters.    
+    # Have to escape double quotes and escape characters.
     $safe_desc =~ s/(^|[^\\])([\\"])/$1\\$2/g;
 
     print qq(\t"$safe_desc",\n);
@@ -262,7 +262,7 @@ open PP, '>pp_proto.h' or die "Error creating pp_proto.h: $!";
 open PPSYM, '>pp.sym' or die "Error creating pp.sym: $!";
 
 print PP <<"END";
-/* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!! 
+/* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
    This file is built by opcode.pl from its data.  Any changes made here
    will be lost!
 */
@@ -271,7 +271,7 @@ END
 
 print PPSYM <<"END";
 #
-# !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!! 
+# !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
 #   This file is built by opcode.pl from its data.  Any changes made here
 #   will be lost!
 #
@@ -364,6 +364,37 @@ __END__
 
 # New ops always go at the very end
 
+# A recapitulation of the format of this file:
+# The file consists of five columns: the name of the op, an English
+# description, the name of the "check" routine used to optimize this
+# operation, some flags, and a description of the operands.
+
+# The flags consist of options followed by a mandatory op class signifier
+
+# The classes are:
+# baseop      - 0            unop     - 1            binop      - 2
+# logop       - |            listop   - @            pmop       - /
+# padop/svop  - $            padop    - # (unused)   loop       - {
+# baseop/unop - %            loopexop - }            filestatop - -
+# pvop/svop   - "
+
+# Other options are:
+#   needs stack mark                    - m
+#   needs constant folding              - f
+#   produces a scalar                   - s
+#   produces an integer                 - i
+#   needs a target                      - t
+#   target can be in a pad              - T
+#   has a corresponding integer version - I
+#   has side effects                    - d
+#   uses $_ if no argument given        - u
+
+# Values for the operands are:
+# scalar      - S            list     - L            array     - A
+# hash        - H            sub (CV) - C            file      - F
+# socket      - Fs           filetest - F-           reference - R
+# "?" denotes an optional operand.
+
 # Nothing.
 
 null           null operation          ck_null         0       
@@ -630,7 +661,7 @@ exit                exit                    ck_exit         ds%     S?
 
 # I/O.
 
-open           open                    ck_open         ist@    F S? L
+open           open                    ck_open         ismt@   F S? L
 close          close                   ck_fun          is%     F?
 pipe_op                pipe                    ck_fun          is@     F F