3 # Get function prototypes
4 require 'regen_lib.pl';
7 $opcode_new = 'opcode.h-new';
8 $opname_new = 'opnames.h-new';
9 open(OC, ">$opcode_new") || die "Can't create $opcode_new: $!\n";
11 open(ON, ">$opname_new") || die "Can't create $opname_new: $!\n";
21 ($key, $desc, $check, $flags, $args) = split(/\t+/, $_, 5);
23 warn qq[Description "$desc" duplicates $seen{$desc}\n] if $seen{$desc};
24 die qq[Opcode "$key" duplicates $seen{$key}\n] if $seen{$key};
25 $seen{$desc} = qq[description of opcode "$key"];
26 $seen{$key} = qq[opcode "$key"];
30 $check{$key} = $check;
32 $flags{$key} = $flags;
40 # Format is "this function" => "does these op names"
42 Perl_do_kv => [qw( keys values )],
43 Perl_unimplemented_op => [qw(padany threadsv mapstart)],
44 # All the ops with a body of { return NORMAL; }
45 Perl_pp_null => [qw(scalar regcmaybe lineseq scope)],
47 Perl_pp_goto => ['dump'],
48 Perl_pp_require => ['dofile'],
49 Perl_pp_untie => ['dbmclose'],
50 Perl_pp_sysread => [qw(read recv)],
51 Perl_pp_sysseek => ['seek'],
52 Perl_pp_ioctl => ['fcntl'],
53 Perl_pp_ssockopt => ['gsockopt'],
54 Perl_pp_getpeername => ['getsockname'],
55 Perl_pp_stat => ['lstat'],
56 Perl_pp_ftrowned => [qw(fteowned ftzero ftsock ftchr ftblk
57 ftfile ftdir ftpipe ftsuid ftsgid
59 Perl_pp_fttext => ['ftbinary'],
60 Perl_pp_gmtime => ['localtime'],
61 Perl_pp_semget => [qw(shmget msgget)],
62 Perl_pp_semctl => [qw(shmctl msgctl)],
63 Perl_pp_ghostent => [qw(ghbyname ghbyaddr)],
64 Perl_pp_gnetent => [qw(gnbyname gnbyaddr)],
65 Perl_pp_gprotoent => [qw(gpbyname gpbynumber)],
66 Perl_pp_gservent => [qw(gsbyname gsbyport)],
67 Perl_pp_gpwent => [qw(gpwnam gpwuid)],
68 Perl_pp_ggrent => [qw(ggrnam ggrgid)],
69 Perl_pp_ftis => [qw(ftsize ftmtime ftatime ftctime)],
70 Perl_pp_chown => [qw(unlink chmod utime kill)],
71 Perl_pp_link => ['symlink'],
72 Perl_pp_ftrread => [qw(ftrwrite ftrexec fteread ftewrite
74 Perl_pp_shmwrite => [qw(shmread msgsnd msgrcv semop)],
75 Perl_pp_send => ['syswrite'],
76 Perl_pp_defined => [qw(dor dorassign)],
77 Perl_pp_and => ['andassign'],
78 Perl_pp_or => ['orassign'],
79 Perl_pp_ucfirst => ['lcfirst'],
82 while (my ($func, $names) = splice @raw_alias, 0, 2) {
83 $alias{$_} = $func for @$names;
90 /* -*- buffer-read-only: t -*-
94 * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
95 * 2000, 2001, 2002, 2003, 2004, 2005 by Larry Wall and others
97 * You may distribute under the terms of either the GNU General Public
98 * License or the Artistic License, as specified in the README file.
100 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
101 * This file is built by opcode.pl from its data. Any changes made here
105 #ifndef PERL_GLOBAL_STRUCT_INIT
107 #define Perl_pp_i_preinc Perl_pp_preinc
108 #define Perl_pp_i_predec Perl_pp_predec
109 #define Perl_pp_i_postinc Perl_pp_postinc
110 #define Perl_pp_i_postdec Perl_pp_postdec
112 PERL_PPDEF(Perl_unimplemented_op)
117 /* -*- buffer-read-only: t -*-
121 * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, by Larry Wall and others
123 * You may distribute under the terms of either the GNU General Public
124 * License or the Artistic License, as specified in the README file.
127 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
128 * This file is built by opcode.pl from its data. Any changes made here
132 typedef enum opcode {
136 print ON "\t", &tab(3,"OP_\U$_,"), "/* ", $i++, " */\n";
138 print ON "\t", &tab(3,"OP_max"), "\n";
139 print ON "} opcode;\n";
140 print ON "\n#define MAXO ", scalar @ops, "\n";
141 print ON "#define OP_phoney_INPUT_ONLY -1\n";
142 print ON "#define OP_phoney_OUTPUT_ONLY -2\n\n";
144 # Emit op names and descriptions.
149 #define OP_NAME(o) ((o)->op_type == OP_CUSTOM ? custom_op_name(o) : \\
150 PL_op_name[(o)->op_type])
151 #define OP_DESC(o) ((o)->op_type == OP_CUSTOM ? custom_op_desc(o) : \\
152 PL_op_desc[(o)->op_type])
155 EXTCONST char* const PL_op_name[];
157 EXTCONST char* const PL_op_name[] = {
172 EXTCONST char* const PL_op_desc[];
174 EXTCONST char* const PL_op_desc[] = {
178 my($safe_desc) = $desc{$_};
180 # Have to escape double quotes and escape characters.
181 $safe_desc =~ s/(^|[^\\])([\\"])/$1\\$2/g;
183 print qq(\t"$safe_desc",\n);
192 #endif /* !PERL_GLOBAL_STRUCT_INIT */
195 # Emit function declarations.
197 #for (sort keys %ckname) {
198 # print "OP *\t", &tab(3,$_),"(pTHX_ OP* o);\n";
204 # print "OP *\t", &tab(3, "pp_$_"), "(pTHX);\n";
207 # Emit ppcode switch array.
213 #ifdef PERL_GLOBAL_STRUCT_INIT
214 static const Perl_ppaddr_t Gppaddr[]
216 # ifndef PERL_GLOBAL_STRUCT
217 EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
219 #endif /* PERL_GLOBAL_STRUCT */
220 #if (defined(DOINIT) && !defined(PERL_GLOBAL_STRUCT)) || defined(PERL_GLOBAL_STRUCT_INIT)
225 $_ eq "custom" and next;
226 if (my $name = $alias{$_}) {
227 print "\tMEMBER_TO_FPTR($name),\t/* Perl_pp_$_ */\n";
230 print "\tMEMBER_TO_FPTR(Perl_pp_$_),\n";
241 # Emit check routines.
244 #ifdef PERL_GLOBAL_STRUCT_INIT
245 static const Perl_check_t Gcheck[]
247 # ifndef PERL_GLOBAL_STRUCT
248 EXT Perl_check_t PL_check[] /* or perlvars.h */
251 #if (defined(DOINIT) && !defined(PERL_GLOBAL_STRUCT)) || defined(PERL_GLOBAL_STRUCT_INIT)
256 print "\t", &tab(3, "MEMBER_TO_FPTR(Perl_$check{$_}),"), "\t/* $_ */\n";
266 # Emit allowed argument types.
269 #ifndef PERL_GLOBAL_STRUCT_INIT
272 EXT const U32 PL_opargs[];
274 EXT const U32 PL_opargs[] = {
284 R, 7, # scalar reference
294 '$', 6, # svop_or_padop
296 '"', 8, # pvop_or_svop
299 '%', 11, # baseop_or_unop
300 '-', 12, # filestatop
310 $argsum |= 1 if $flags =~ /m/; # needs stack mark
311 $argsum |= 2 if $flags =~ /f/; # fold constants
312 $argsum |= 4 if $flags =~ /s/; # always produces scalar
313 $argsum |= 8 if $flags =~ /t/; # needs target scalar
314 $argsum |= (8|256) if $flags =~ /T/; # ... which may be lexical
315 $argsum |= 16 if $flags =~ /i/; # always produces integer
316 $argsum |= 32 if $flags =~ /I/; # has corresponding int op
317 $argsum |= 64 if $flags =~ /d/; # danger, unknown side effects
318 $argsum |= 128 if $flags =~ /u/; # defaults to $_
319 $flags =~ /([\W\d_])/ or die qq[Opcode "$_" has no class indicator];
320 $argsum |= $opclass{$1} << 9;
321 $mul = 0x2000; # 2 ^ OASHIFT
322 for $arg (split(' ',$args{$_})) {
324 $OP_IS_SOCKET{$_} = 1 if $arg =~ s/s//;
325 $OP_IS_FILETEST{$_} = 1 if $arg =~ s/-//;
327 $argnum = ($arg =~ s/\?//) ? 8 : 0;
328 die "op = $_, arg = $arg\n" unless length($arg) == 1;
329 $argnum += $argnum{$arg};
330 warn "# Conflicting bit 32 for '$_'.\n"
331 if $argnum & 8 and $mul == 0x10000000;
332 $argsum += $argnum * $mul;
335 $argsum = sprintf("0x%08x", $argsum);
336 print "\t", &tab(3, "$argsum,"), "/* $_ */\n";
345 #endif /* !PERL_GLOBAL_STRUCT_INIT */
348 if (keys %OP_IS_SOCKET) {
349 print ON "\n#define OP_IS_SOCKET(op) \\\n\t(";
350 print ON join(" || \\\n\t ",
351 map { "(op) == OP_" . uc() } sort keys %OP_IS_SOCKET);
355 if (keys %OP_IS_FILETEST) {
356 print ON "\n#define OP_IS_FILETEST(op) \\\n\t(";
357 print ON join(" || \\\n\t ",
358 map { "(op) == OP_" . uc() } sort keys %OP_IS_FILETEST);
362 print OC "/* ex: set ro: */\n";
363 print ON "/* ex: set ro: */\n";
365 close OC or die "Error closing opcode.h: $!";
366 close ON or die "Error closing opnames.h: $!";
368 foreach ('opcode.h', 'opnames.h') {
369 safer_rename_silent $_, "$_-old";
371 safer_rename $opcode_new, 'opcode.h';
372 safer_rename $opname_new, 'opnames.h';
374 $pp_proto_new = 'pp_proto.h-new';
375 $pp_sym_new = 'pp.sym-new';
377 open PP, ">$pp_proto_new" or die "Error creating $pp_proto_new: $!";
379 open PPSYM, ">$pp_sym_new" or die "Error creating $pp_sym_new: $!";
383 /* -*- buffer-read-only: t -*-
384 !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
385 This file is built by opcode.pl from its data. Any changes made here
392 # -*- buffer-read-only: t -*-
394 # !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
395 # This file is built by opcode.pl from its data. Any changes made here
402 for (sort keys %ckname) {
403 print PP "PERL_CKDEF(Perl_$_)\n";
404 print PPSYM "Perl_$_\n";
405 #OP *\t", &tab(3,$_),"(OP* o);\n";
411 next if /^i_(pre|post)(inc|dec)$/;
413 print PP "PERL_PPDEF(Perl_pp_$_)\n";
414 print PPSYM "Perl_pp_$_\n";
416 print PP "\n/* ex: set ro: */\n";
417 print PPSYM "\n# ex: set ro:\n";
419 close PP or die "Error closing pp_proto.h: $!";
420 close PPSYM or die "Error closing pp.sym: $!";
422 foreach ('pp_proto.h', 'pp.sym') {
423 safer_rename_silent $_, "$_-old";
425 safer_rename $pp_proto_new, 'pp_proto.h';
426 safer_rename $pp_sym_new, 'pp.sym';
429 foreach ('opcode.h', 'opnames.h', 'pp_proto.h', 'pp.sym') {
430 1 while unlink "$_-old";
434 ###########################################################################
437 $t .= "\t" x ($l - (length($t) + 1) / 8);
440 ###########################################################################
442 # Some comments about 'T' opcode classifier:
444 # Safe to set if the ppcode uses:
445 # tryAMAGICbin, tryAMAGICun, SETn, SETi, SETu, PUSHn, PUSHTARG, SETTARG,
446 # SETs(TARG), XPUSHn, XPUSHu,
448 # Unsafe to set if the ppcode uses dTARG or [X]RETPUSH[YES|NO|UNDEF]
450 # lt and friends do SETs (including ncmp, but not scmp)
452 # Additional mode of failure: the opcode can modify TARG before it "used"
453 # all the arguments (or may call an external function which does the same).
454 # If the target coincides with one of the arguments ==> kaboom.
456 # pp.c pos substr each not OK (RETPUSHUNDEF)
457 # substr vec also not OK due to LV to target (are they???)
458 # ref not OK (RETPUSHNO)
459 # trans not OK (dTARG; TARG = sv_newmortal();)
460 # ucfirst etc not OK: TMP arg processed inplace
461 # quotemeta not OK (unsafe when TARG == arg)
462 # each repeat not OK too due to list context
463 # pack split - unknown whether they are safe
464 # sprintf: is calling do_sprintf(TARG,...) which can act on TARG
465 # before other args are processed.
467 # Suspicious wrt "additional mode of failure" (and only it):
468 # schop, chop, postinc/dec, bit_and etc, negate, complement.
470 # Also suspicious: 4-arg substr, sprintf, uc/lc (POK_only), reverse, pack.
472 # substr/vec: doing TAINT_off()???
475 # readline - unknown whether it is safe
476 # match subst not OK (dTARG)
477 # grepwhile not OK (not always setting)
478 # join not OK (unsafe when TARG == arg)
480 # Suspicious wrt "additional mode of failure": concat (dealt with
481 # in ck_sassign()), join (same).
484 # mapwhile flip caller not OK (not always setting)
487 # backtick glob warn die not OK (not always setting)
488 # warn not OK (RETPUSHYES)
489 # open fileno getc sysread syswrite ioctl accept shutdown
490 # ftsize(etc) readlink telldir fork alarm getlogin not OK (RETPUSHUNDEF)
491 # umask select not OK (XPUSHs(&PL_sv_undef);)
492 # fileno getc sysread syswrite tell not OK (meth("FILENO" "GETC"))
493 # sselect shm* sem* msg* syscall - unknown whether they are safe
494 # gmtime not OK (list context)
496 # Suspicious wrt "additional mode of failure": warn, die, select.
500 # New ops always go at the end, just before 'custom'
502 # A recapitulation of the format of this file:
503 # The file consists of five columns: the name of the op, an English
504 # description, the name of the "check" routine used to optimize this
505 # operation, some flags, and a description of the operands.
507 # The flags consist of options followed by a mandatory op class signifier
510 # baseop - 0 unop - 1 binop - 2
511 # logop - | listop - @ pmop - /
512 # padop/svop - $ padop - # (unused) loop - {
513 # baseop/unop - % loopexop - } filestatop - -
514 # pvop/svop - " cop - ;
517 # needs stack mark - m
518 # needs constant folding - f
519 # produces a scalar - s
520 # produces an integer - i
522 # target can be in a pad - T
523 # has a corresponding integer version - I
524 # has side effects - d
525 # uses $_ if no argument given - u
527 # Values for the operands are:
528 # scalar - S list - L array - A
529 # hash - H sub (CV) - C file - F
530 # socket - Fs filetest - F- reference - R
531 # "?" denotes an optional operand.
535 null null operation ck_null 0
537 scalar scalar ck_fun s% S
541 pushmark pushmark ck_null s0
542 wantarray wantarray ck_null is0
544 const constant item ck_svconst s$
546 gvsv scalar variable ck_null ds$
547 gv glob value ck_null ds$
548 gelem glob elem ck_null d2 S S
549 padsv private variable ck_null ds0
550 padav private array ck_null d0
551 padhv private hash ck_null d0
552 padany private value ck_null d0
554 pushre push regexp ck_null d/
556 # References and stuff.
558 rv2gv ref-to-glob cast ck_rvconst ds1
559 rv2sv scalar dereference ck_rvconst ds1
560 av2arylen array length ck_null is1
561 rv2cv subroutine dereference ck_rvconst d1
562 anoncode anonymous subroutine ck_anoncode $
563 prototype subroutine prototype ck_null s% S
564 refgen reference constructor ck_spair m1 L
565 srefgen single ref constructor ck_null fs1 S
566 ref reference-type operator ck_fun stu% S?
567 bless bless ck_fun s@ S S?
571 backtick quoted execution (``, qx) ck_open t%
572 # glob defaults its first arg to $_
573 glob glob ck_glob t@ S?
574 readline <HANDLE> ck_null t% F?
575 rcatline append I/O operator ck_null t$
577 # Bindable operators.
579 regcmaybe regexp internal guard ck_fun s1 S
580 regcreset regexp internal reset ck_fun s1 S
581 regcomp regexp compilation ck_null s| S
582 match pattern match (m//) ck_match d/
583 qr pattern quote (qr//) ck_match s/
584 subst substitution (s///) ck_match dis/ S
585 substcont substitution iterator ck_null dis|
586 trans transliteration (tr///) ck_match is" S
589 # sassign is special-cased for op class
591 sassign scalar assignment ck_sassign s0
592 aassign list assignment ck_null t2 L L
594 chop chop ck_spair mts% L
595 schop scalar chop ck_null stu% S?
596 chomp chomp ck_spair mTs% L
597 schomp scalar chomp ck_null sTu% S?
598 defined defined operator ck_defined isu% S?
599 undef undef operator ck_lfun s% S?
600 study study ck_fun su% S?
601 pos match position ck_lfun stu% S?
603 preinc preincrement (++) ck_lfun dIs1 S
604 i_preinc integer preincrement (++) ck_lfun dis1 S
605 predec predecrement (--) ck_lfun dIs1 S
606 i_predec integer predecrement (--) ck_lfun dis1 S
607 postinc postincrement (++) ck_lfun dIst1 S
608 i_postinc integer postincrement (++) ck_lfun disT1 S
609 postdec postdecrement (--) ck_lfun dIst1 S
610 i_postdec integer postdecrement (--) ck_lfun disT1 S
612 # Ordinary operators.
614 pow exponentiation (**) ck_null fsT2 S S
616 multiply multiplication (*) ck_null IfsT2 S S
617 i_multiply integer multiplication (*) ck_null ifsT2 S S
618 divide division (/) ck_null IfsT2 S S
619 i_divide integer division (/) ck_null ifsT2 S S
620 modulo modulus (%) ck_null IifsT2 S S
621 i_modulo integer modulus (%) ck_null ifsT2 S S
622 repeat repeat (x) ck_repeat mt2 L S
624 add addition (+) ck_null IfsT2 S S
625 i_add integer addition (+) ck_null ifsT2 S S
626 subtract subtraction (-) ck_null IfsT2 S S
627 i_subtract integer subtraction (-) ck_null ifsT2 S S
628 concat concatenation (.) or string ck_concat fsT2 S S
629 stringify string ck_fun fsT@ S
631 left_shift left bitshift (<<) ck_bitop fsT2 S S
632 right_shift right bitshift (>>) ck_bitop fsT2 S S
634 lt numeric lt (<) ck_null Iifs2 S S
635 i_lt integer lt (<) ck_null ifs2 S S
636 gt numeric gt (>) ck_null Iifs2 S S
637 i_gt integer gt (>) ck_null ifs2 S S
638 le numeric le (<=) ck_null Iifs2 S S
639 i_le integer le (<=) ck_null ifs2 S S
640 ge numeric ge (>=) ck_null Iifs2 S S
641 i_ge integer ge (>=) ck_null ifs2 S S
642 eq numeric eq (==) ck_null Iifs2 S S
643 i_eq integer eq (==) ck_null ifs2 S S
644 ne numeric ne (!=) ck_null Iifs2 S S
645 i_ne integer ne (!=) ck_null ifs2 S S
646 ncmp numeric comparison (<=>) ck_null Iifst2 S S
647 i_ncmp integer comparison (<=>) ck_null ifst2 S S
649 slt string lt ck_null ifs2 S S
650 sgt string gt ck_null ifs2 S S
651 sle string le ck_null ifs2 S S
652 sge string ge ck_null ifs2 S S
653 seq string eq ck_null ifs2 S S
654 sne string ne ck_null ifs2 S S
655 scmp string comparison (cmp) ck_null ifst2 S S
657 bit_and bitwise and (&) ck_bitop fst2 S S
658 bit_xor bitwise xor (^) ck_bitop fst2 S S
659 bit_or bitwise or (|) ck_bitop fst2 S S
661 negate negation (-) ck_null Ifst1 S
662 i_negate integer negation (-) ck_null ifsT1 S
663 not not ck_null ifs1 S
664 complement 1's complement (~) ck_bitop fst1 S
666 # High falutin' math.
668 atan2 atan2 ck_fun fsT@ S S
669 sin sin ck_fun fsTu% S?
670 cos cos ck_fun fsTu% S?
671 rand rand ck_fun sT% S?
672 srand srand ck_fun s% S?
673 exp exp ck_fun fsTu% S?
674 log log ck_fun fsTu% S?
675 sqrt sqrt ck_fun fsTu% S?
679 int int ck_fun fsTu% S?
680 hex hex ck_fun fsTu% S?
681 oct oct ck_fun fsTu% S?
682 abs abs ck_fun fsTu% S?
686 length length ck_lengthconst isTu% S?
687 substr substr ck_substr st@ S S S? S?
688 vec vec ck_fun ist@ S S S
690 index index ck_index isT@ S S S?
691 rindex rindex ck_index isT@ S S S?
693 sprintf sprintf ck_fun mfst@ S L
694 formline formline ck_fun ms@ S L
695 ord ord ck_fun ifsTu% S?
696 chr chr ck_fun fsTu% S?
697 crypt crypt ck_fun fsT@ S S
698 ucfirst ucfirst ck_fun fstu% S?
699 lcfirst lcfirst ck_fun fstu% S?
700 uc uc ck_fun fstu% S?
701 lc lc ck_fun fstu% S?
702 quotemeta quotemeta ck_fun fstu% S?
706 rv2av array dereference ck_rvconst dt1
707 aelemfast constant array element ck_null s$ A S
708 aelem array element ck_null s2 A S
709 aslice array slice ck_null m@ A L
714 values values ck_fun t% H
715 keys keys ck_fun t% H
716 delete delete ck_delete % S
717 exists exists ck_exists is% S
718 rv2hv hash dereference ck_rvconst dt1
719 helem hash element ck_null s2@ H S
720 hslice hash slice ck_null m@ H L
722 # Explosives and implosives.
724 unpack unpack ck_unpack @ S S?
725 pack pack ck_fun mst@ S L
726 split split ck_split t@ S S S
727 join join or string ck_join mst@ S L
731 list list ck_null m@ L
732 lslice list slice ck_null 2 H L L
733 anonlist anonymous list ([]) ck_fun ms@ L
734 anonhash anonymous hash ({}) ck_fun ms@ L
736 splice splice ck_fun m@ A S? S? L
737 push push ck_fun imsT@ A L
738 pop pop ck_shift s% A?
739 shift shift ck_shift s% A?
740 unshift unshift ck_fun imsT@ A L
741 sort sort ck_sort dm@ C? L
742 reverse reverse ck_fun mt@ L
744 grepstart grep ck_grep dm@ C L
745 grepwhile grep iterator ck_null dt|
747 mapstart map ck_grep dm@ C L
748 mapwhile map iterator ck_null dt|
752 range flipflop ck_null | S S
753 flip range (or flip) ck_null 1 S S
754 flop range (or flop) ck_null 1
758 and logical and (&&) ck_null |
759 or logical or (||) ck_null |
760 xor logical xor ck_null fs2 S S
761 cond_expr conditional expression ck_null d|
762 andassign logical and assignment (&&=) ck_null s|
763 orassign logical or assignment (||=) ck_null s|
765 method method lookup ck_method d1
766 entersub subroutine entry ck_subr dmt1 L
767 leavesub subroutine exit ck_null 1
768 leavesublv lvalue subroutine return ck_null 1
769 caller caller ck_fun t% S?
770 warn warn ck_fun imst@ L
771 die die ck_die dimst@ L
772 reset symbol reset ck_fun is% S?
774 lineseq line sequence ck_null @
775 nextstate next statement ck_null s;
776 dbstate debug next statement ck_null s;
777 unstack iteration finalizer ck_null s0
778 enter block entry ck_null 0
779 leave block exit ck_null @
780 scope block ck_null @
781 enteriter foreach loop entry ck_null d{
782 iter foreach loop iterator ck_null 0
783 enterloop loop entry ck_null d{
784 leaveloop loop exit ck_null 2
785 return return ck_return dm@ L
786 last last ck_null ds}
787 next next ck_null ds}
788 redo redo ck_null ds}
789 dump dump ck_null ds}
790 goto goto ck_null ds}
791 exit exit ck_exit ds% S?
794 #nswitch numeric switch ck_null d
795 #cswitch character switch ck_null d
799 open open ck_open ismt@ F S? L
800 close close ck_fun is% F?
801 pipe_op pipe ck_fun is@ F F
803 fileno fileno ck_fun ist% F
804 umask umask ck_fun ist% S?
805 binmode binmode ck_fun s@ F S?
807 tie tie ck_fun idms@ R S L
808 untie untie ck_fun is% R
809 tied tied ck_fun s% R
810 dbmopen dbmopen ck_fun is@ H S S
811 dbmclose dbmclose ck_fun is% H
813 sselect select system call ck_select t@ S S S S
814 select select ck_select st@ F?
816 getc getc ck_eof st% F?
817 read read ck_fun imst@ F R S S?
818 enterwrite write ck_fun dis% F?
819 leavewrite write exit ck_null 1
821 prtf printf ck_listiob ims@ F? L
822 print print ck_listiob ims@ F? L
824 sysopen sysopen ck_fun s@ F S S S?
825 sysseek sysseek ck_fun s@ F S S
826 sysread sysread ck_fun imst@ F R S S?
827 syswrite syswrite ck_fun imst@ F S S? S?
829 send send ck_fun imst@ Fs S S S?
830 recv recv ck_fun imst@ Fs R S S
832 eof eof ck_eof is% F?
833 tell tell ck_fun st% F?
834 seek seek ck_fun s@ F S S
835 # truncate really behaves as if it had both "S S" and "F S"
836 truncate truncate ck_trunc is@ S S
838 fcntl fcntl ck_fun st@ F S S
839 ioctl ioctl ck_fun st@ F S S
840 flock flock ck_fun isT@ F S
844 socket socket ck_fun is@ Fs S S S
845 sockpair socketpair ck_fun is@ Fs Fs S S S
847 bind bind ck_fun is@ Fs S
848 connect connect ck_fun is@ Fs S
849 listen listen ck_fun is@ Fs S
850 accept accept ck_fun ist@ Fs Fs
851 shutdown shutdown ck_fun ist@ Fs S
853 gsockopt getsockopt ck_fun is@ Fs S S
854 ssockopt setsockopt ck_fun is@ Fs S S S
856 getsockname getsockname ck_fun is% Fs
857 getpeername getpeername ck_fun is% Fs
861 lstat lstat ck_ftst u- F
862 stat stat ck_ftst u- F
863 ftrread -R ck_ftst isu- F-
864 ftrwrite -W ck_ftst isu- F-
865 ftrexec -X ck_ftst isu- F-
866 fteread -r ck_ftst isu- F-
867 ftewrite -w ck_ftst isu- F-
868 fteexec -x ck_ftst isu- F-
869 ftis -e ck_ftst isu- F-
870 fteowned -o ck_ftst isu- F-
871 ftrowned -O ck_ftst isu- F-
872 ftzero -z ck_ftst isu- F-
873 ftsize -s ck_ftst istu- F-
874 ftmtime -M ck_ftst stu- F-
875 ftatime -A ck_ftst stu- F-
876 ftctime -C ck_ftst stu- F-
877 ftsock -S ck_ftst isu- F-
878 ftchr -c ck_ftst isu- F-
879 ftblk -b ck_ftst isu- F-
880 ftfile -f ck_ftst isu- F-
881 ftdir -d ck_ftst isu- F-
882 ftpipe -p ck_ftst isu- F-
883 ftlink -l ck_ftst isu- F-
884 ftsuid -u ck_ftst isu- F-
885 ftsgid -g ck_ftst isu- F-
886 ftsvtx -k ck_ftst isu- F-
887 fttty -t ck_ftst is- F-
888 fttext -T ck_ftst isu- F-
889 ftbinary -B ck_ftst isu- F-
893 chdir chdir ck_fun isT% S?
894 chown chown ck_fun imsT@ L
895 chroot chroot ck_fun isTu% S?
896 unlink unlink ck_fun imsTu@ L
897 chmod chmod ck_fun imsT@ L
898 utime utime ck_fun imsT@ L
899 rename rename ck_fun isT@ S S
900 link link ck_fun isT@ S S
901 symlink symlink ck_fun isT@ S S
902 readlink readlink ck_fun stu% S?
903 mkdir mkdir ck_fun isTu@ S? S?
904 rmdir rmdir ck_fun isTu% S?
908 open_dir opendir ck_fun is@ F S
909 readdir readdir ck_fun % F
910 telldir telldir ck_fun st% F
911 seekdir seekdir ck_fun s@ F S
912 rewinddir rewinddir ck_fun s% F
913 closedir closedir ck_fun is% F
917 fork fork ck_null ist0
918 wait wait ck_null isT0
919 waitpid waitpid ck_fun isT@ S S
920 system system ck_exec imsT@ S? L
921 exec exec ck_exec dimsT@ S? L
922 kill kill ck_fun dimsT@ L
923 getppid getppid ck_null isT0
924 getpgrp getpgrp ck_fun isT% S?
925 setpgrp setpgrp ck_fun isT@ S? S?
926 getpriority getpriority ck_fun isT@ S S
927 setpriority setpriority ck_fun isT@ S S S
931 # NOTE: MacOS patches the 'i' of time() away later when the interpreter
932 # is created because in MacOS time() is already returning times > 2**31-1,
933 # that is, non-integers.
935 time time ck_null isT0
937 localtime localtime ck_fun t% S?
938 gmtime gmtime ck_fun t% S?
939 alarm alarm ck_fun istu% S?
940 sleep sleep ck_fun isT% S?
944 shmget shmget ck_fun imst@ S S S
945 shmctl shmctl ck_fun imst@ S S S
946 shmread shmread ck_fun imst@ S S S S
947 shmwrite shmwrite ck_fun imst@ S S S S
951 msgget msgget ck_fun imst@ S S
952 msgctl msgctl ck_fun imst@ S S S
953 msgsnd msgsnd ck_fun imst@ S S S
954 msgrcv msgrcv ck_fun imst@ S S S S S
958 semget semget ck_fun imst@ S S S
959 semctl semctl ck_fun imst@ S S S S
960 semop semop ck_fun imst@ S S
964 require require ck_require du% S?
965 dofile do "file" ck_fun d1 S
966 entereval eval "string" ck_eval d% S
967 leaveeval eval "string" exit ck_null 1 S
968 #evalonce eval constant string ck_null d1 S
969 entertry eval {block} ck_null |
970 leavetry eval {block} exit ck_null @
974 ghbyname gethostbyname ck_fun % S
975 ghbyaddr gethostbyaddr ck_fun @ S S
976 ghostent gethostent ck_null 0
977 gnbyname getnetbyname ck_fun % S
978 gnbyaddr getnetbyaddr ck_fun @ S S
979 gnetent getnetent ck_null 0
980 gpbyname getprotobyname ck_fun % S
981 gpbynumber getprotobynumber ck_fun @ S
982 gprotoent getprotoent ck_null 0
983 gsbyname getservbyname ck_fun @ S S
984 gsbyport getservbyport ck_fun @ S S
985 gservent getservent ck_null 0
986 shostent sethostent ck_fun is% S
987 snetent setnetent ck_fun is% S
988 sprotoent setprotoent ck_fun is% S
989 sservent setservent ck_fun is% S
990 ehostent endhostent ck_null is0
991 enetent endnetent ck_null is0
992 eprotoent endprotoent ck_null is0
993 eservent endservent ck_null is0
994 gpwnam getpwnam ck_fun % S
995 gpwuid getpwuid ck_fun % S
996 gpwent getpwent ck_null 0
997 spwent setpwent ck_null is0
998 epwent endpwent ck_null is0
999 ggrnam getgrnam ck_fun % S
1000 ggrgid getgrgid ck_fun % S
1001 ggrent getgrent ck_null 0
1002 sgrent setgrent ck_null is0
1003 egrent endgrent ck_null is0
1004 getlogin getlogin ck_null st0
1008 syscall syscall ck_fun imst@ S L
1010 # For multi-threading
1011 lock lock ck_rfun s% R
1012 threadsv per-thread value ck_null ds0
1015 setstate set statement info ck_null s;
1016 method_named method with known name ck_null d$
1018 dor defined or (//) ck_null |
1019 dorassign defined or assignment (//=) ck_null s|
1021 # Add new ops before this, the custom operator.
1023 custom unknown custom operator ck_null 0