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 => 'keys values',
45 while (my ($func, $names) = splice @raw_alias, 0, 2) {
46 $alias{$_} = $func foreach split ' ', $names;
53 /* -*- buffer-read-only: t -*-
57 * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
58 * 2000, 2001, 2002, 2003, 2004, 2005 by Larry Wall and others
60 * You may distribute under the terms of either the GNU General Public
61 * License or the Artistic License, as specified in the README file.
63 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
64 * This file is built by opcode.pl from its data. Any changes made here
68 #ifndef PERL_GLOBAL_STRUCT_INIT
70 #define Perl_pp_i_preinc Perl_pp_preinc
71 #define Perl_pp_i_predec Perl_pp_predec
72 #define Perl_pp_i_postinc Perl_pp_postinc
73 #define Perl_pp_i_postdec Perl_pp_postdec
78 /* -*- buffer-read-only: t -*-
82 * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, by Larry Wall and others
84 * You may distribute under the terms of either the GNU General Public
85 * License or the Artistic License, as specified in the README file.
88 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
89 * This file is built by opcode.pl from its data. Any changes made here
97 print ON "\t", &tab(3,"OP_\U$_,"), "/* ", $i++, " */\n";
99 print ON "\t", &tab(3,"OP_max"), "\n";
100 print ON "} opcode;\n";
101 print ON "\n#define MAXO ", scalar @ops, "\n";
102 print ON "#define OP_phoney_INPUT_ONLY -1\n";
103 print ON "#define OP_phoney_OUTPUT_ONLY -2\n\n";
105 # Emit op names and descriptions.
110 #define OP_NAME(o) ((o)->op_type == OP_CUSTOM ? custom_op_name(o) : \\
111 PL_op_name[(o)->op_type])
112 #define OP_DESC(o) ((o)->op_type == OP_CUSTOM ? custom_op_desc(o) : \\
113 PL_op_desc[(o)->op_type])
116 EXTCONST char* const PL_op_name[];
118 EXTCONST char* const PL_op_name[] = {
133 EXTCONST char* const PL_op_desc[];
135 EXTCONST char* const PL_op_desc[] = {
139 my($safe_desc) = $desc{$_};
141 # Have to escape double quotes and escape characters.
142 $safe_desc =~ s/(^|[^\\])([\\"])/$1\\$2/g;
144 print qq(\t"$safe_desc",\n);
153 #endif /* !PERL_GLOBAL_STRUCT_INIT */
156 # Emit function declarations.
158 #for (sort keys %ckname) {
159 # print "OP *\t", &tab(3,$_),"(pTHX_ OP* o);\n";
165 # print "OP *\t", &tab(3, "pp_$_"), "(pTHX);\n";
168 # Emit ppcode switch array.
174 #ifdef PERL_GLOBAL_STRUCT_INIT
175 static const Perl_ppaddr_t Gppaddr[]
177 # ifndef PERL_GLOBAL_STRUCT
178 EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
180 #endif /* PERL_GLOBAL_STRUCT */
181 #if (defined(DOINIT) && !defined(PERL_GLOBAL_STRUCT)) || defined(PERL_GLOBAL_STRUCT_INIT)
186 my $name = $alias{$_} || "Perl_pp_$_";
187 print "\tMEMBER_TO_FPTR($name),\n" unless $_ eq "custom";
197 # Emit check routines.
200 #ifdef PERL_GLOBAL_STRUCT_INIT
201 static const Perl_check_t Gcheck[]
203 # ifndef PERL_GLOBAL_STRUCT
204 EXT Perl_check_t PL_check[] /* or perlvars.h */
207 #if (defined(DOINIT) && !defined(PERL_GLOBAL_STRUCT)) || defined(PERL_GLOBAL_STRUCT_INIT)
212 print "\t", &tab(3, "MEMBER_TO_FPTR(Perl_$check{$_}),"), "\t/* $_ */\n";
222 # Emit allowed argument types.
225 #ifndef PERL_GLOBAL_STRUCT_INIT
228 EXT const U32 PL_opargs[];
230 EXT const U32 PL_opargs[] = {
240 R, 7, # scalar reference
250 '$', 6, # svop_or_padop
252 '"', 8, # pvop_or_svop
255 '%', 11, # baseop_or_unop
256 '-', 12, # filestatop
266 $argsum |= 1 if $flags =~ /m/; # needs stack mark
267 $argsum |= 2 if $flags =~ /f/; # fold constants
268 $argsum |= 4 if $flags =~ /s/; # always produces scalar
269 $argsum |= 8 if $flags =~ /t/; # needs target scalar
270 $argsum |= (8|256) if $flags =~ /T/; # ... which may be lexical
271 $argsum |= 16 if $flags =~ /i/; # always produces integer
272 $argsum |= 32 if $flags =~ /I/; # has corresponding int op
273 $argsum |= 64 if $flags =~ /d/; # danger, unknown side effects
274 $argsum |= 128 if $flags =~ /u/; # defaults to $_
275 $flags =~ /([\W\d_])/ or die qq[Opcode "$_" has no class indicator];
276 $argsum |= $opclass{$1} << 9;
277 $mul = 0x2000; # 2 ^ OASHIFT
278 for $arg (split(' ',$args{$_})) {
280 $OP_IS_SOCKET{$_} = 1 if $arg =~ s/s//;
281 $OP_IS_FILETEST{$_} = 1 if $arg =~ s/-//;
283 $argnum = ($arg =~ s/\?//) ? 8 : 0;
284 die "op = $_, arg = $arg\n" unless length($arg) == 1;
285 $argnum += $argnum{$arg};
286 warn "# Conflicting bit 32 for '$_'.\n"
287 if $argnum & 8 and $mul == 0x10000000;
288 $argsum += $argnum * $mul;
291 $argsum = sprintf("0x%08x", $argsum);
292 print "\t", &tab(3, "$argsum,"), "/* $_ */\n";
301 #endif /* !PERL_GLOBAL_STRUCT_INIT */
304 if (keys %OP_IS_SOCKET) {
305 print ON "\n#define OP_IS_SOCKET(op) \\\n\t(";
306 print ON join(" || \\\n\t ",
307 map { "(op) == OP_" . uc() } sort keys %OP_IS_SOCKET);
311 if (keys %OP_IS_FILETEST) {
312 print ON "\n#define OP_IS_FILETEST(op) \\\n\t(";
313 print ON join(" || \\\n\t ",
314 map { "(op) == OP_" . uc() } sort keys %OP_IS_FILETEST);
318 print OC "/* ex: set ro: */\n";
319 print ON "/* ex: set ro: */\n";
321 close OC or die "Error closing opcode.h: $!";
322 close ON or die "Error closing opnames.h: $!";
324 foreach ('opcode.h', 'opnames.h') {
325 safer_rename_silent $_, "$_-old";
327 safer_rename $opcode_new, 'opcode.h';
328 safer_rename $opname_new, 'opnames.h';
330 $pp_proto_new = 'pp_proto.h-new';
331 $pp_sym_new = 'pp.sym-new';
333 open PP, ">$pp_proto_new" or die "Error creating $pp_proto_new: $!";
335 open PPSYM, ">$pp_sym_new" or die "Error creating $pp_sym_new: $!";
339 /* -*- buffer-read-only: t -*-
340 !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
341 This file is built by opcode.pl from its data. Any changes made here
348 # -*- buffer-read-only: t -*-
350 # !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
351 # This file is built by opcode.pl from its data. Any changes made here
358 for (sort keys %ckname) {
359 print PP "PERL_CKDEF(Perl_$_)\n";
360 print PPSYM "Perl_$_\n";
361 #OP *\t", &tab(3,$_),"(OP* o);\n";
367 next if /^i_(pre|post)(inc|dec)$/;
369 print PP "PERL_PPDEF(Perl_pp_$_)\n";
370 print PPSYM "Perl_pp_$_\n";
372 print PP "\n/* ex: set ro: */\n";
373 print PPSYM "\n# ex: set ro:\n";
375 close PP or die "Error closing pp_proto.h: $!";
376 close PPSYM or die "Error closing pp.sym: $!";
378 foreach ('pp_proto.h', 'pp.sym') {
379 safer_rename_silent $_, "$_-old";
381 safer_rename $pp_proto_new, 'pp_proto.h';
382 safer_rename $pp_sym_new, 'pp.sym';
385 foreach ('opcode.h', 'opnames.h', 'pp_proto.h', 'pp.sym') {
386 1 while unlink "$_-old";
390 ###########################################################################
393 $t .= "\t" x ($l - (length($t) + 1) / 8);
396 ###########################################################################
398 # Some comments about 'T' opcode classifier:
400 # Safe to set if the ppcode uses:
401 # tryAMAGICbin, tryAMAGICun, SETn, SETi, SETu, PUSHn, PUSHTARG, SETTARG,
402 # SETs(TARG), XPUSHn, XPUSHu,
404 # Unsafe to set if the ppcode uses dTARG or [X]RETPUSH[YES|NO|UNDEF]
406 # lt and friends do SETs (including ncmp, but not scmp)
408 # Additional mode of failure: the opcode can modify TARG before it "used"
409 # all the arguments (or may call an external function which does the same).
410 # If the target coincides with one of the arguments ==> kaboom.
412 # pp.c pos substr each not OK (RETPUSHUNDEF)
413 # substr vec also not OK due to LV to target (are they???)
414 # ref not OK (RETPUSHNO)
415 # trans not OK (dTARG; TARG = sv_newmortal();)
416 # ucfirst etc not OK: TMP arg processed inplace
417 # quotemeta not OK (unsafe when TARG == arg)
418 # each repeat not OK too due to list context
419 # pack split - unknown whether they are safe
420 # sprintf: is calling do_sprintf(TARG,...) which can act on TARG
421 # before other args are processed.
423 # Suspicious wrt "additional mode of failure" (and only it):
424 # schop, chop, postinc/dec, bit_and etc, negate, complement.
426 # Also suspicious: 4-arg substr, sprintf, uc/lc (POK_only), reverse, pack.
428 # substr/vec: doing TAINT_off()???
431 # readline - unknown whether it is safe
432 # match subst not OK (dTARG)
433 # grepwhile not OK (not always setting)
434 # join not OK (unsafe when TARG == arg)
436 # Suspicious wrt "additional mode of failure": concat (dealt with
437 # in ck_sassign()), join (same).
440 # mapwhile flip caller not OK (not always setting)
443 # backtick glob warn die not OK (not always setting)
444 # warn not OK (RETPUSHYES)
445 # open fileno getc sysread syswrite ioctl accept shutdown
446 # ftsize(etc) readlink telldir fork alarm getlogin not OK (RETPUSHUNDEF)
447 # umask select not OK (XPUSHs(&PL_sv_undef);)
448 # fileno getc sysread syswrite tell not OK (meth("FILENO" "GETC"))
449 # sselect shm* sem* msg* syscall - unknown whether they are safe
450 # gmtime not OK (list context)
452 # Suspicious wrt "additional mode of failure": warn, die, select.
456 # New ops always go at the end, just before 'custom'
458 # A recapitulation of the format of this file:
459 # The file consists of five columns: the name of the op, an English
460 # description, the name of the "check" routine used to optimize this
461 # operation, some flags, and a description of the operands.
463 # The flags consist of options followed by a mandatory op class signifier
466 # baseop - 0 unop - 1 binop - 2
467 # logop - | listop - @ pmop - /
468 # padop/svop - $ padop - # (unused) loop - {
469 # baseop/unop - % loopexop - } filestatop - -
470 # pvop/svop - " cop - ;
473 # needs stack mark - m
474 # needs constant folding - f
475 # produces a scalar - s
476 # produces an integer - i
478 # target can be in a pad - T
479 # has a corresponding integer version - I
480 # has side effects - d
481 # uses $_ if no argument given - u
483 # Values for the operands are:
484 # scalar - S list - L array - A
485 # hash - H sub (CV) - C file - F
486 # socket - Fs filetest - F- reference - R
487 # "?" denotes an optional operand.
491 null null operation ck_null 0
493 scalar scalar ck_fun s% S
497 pushmark pushmark ck_null s0
498 wantarray wantarray ck_null is0
500 const constant item ck_svconst s$
502 gvsv scalar variable ck_null ds$
503 gv glob value ck_null ds$
504 gelem glob elem ck_null d2 S S
505 padsv private variable ck_null ds0
506 padav private array ck_null d0
507 padhv private hash ck_null d0
508 padany private value ck_null d0
510 pushre push regexp ck_null d/
512 # References and stuff.
514 rv2gv ref-to-glob cast ck_rvconst ds1
515 rv2sv scalar dereference ck_rvconst ds1
516 av2arylen array length ck_null is1
517 rv2cv subroutine dereference ck_rvconst d1
518 anoncode anonymous subroutine ck_anoncode $
519 prototype subroutine prototype ck_null s% S
520 refgen reference constructor ck_spair m1 L
521 srefgen single ref constructor ck_null fs1 S
522 ref reference-type operator ck_fun stu% S?
523 bless bless ck_fun s@ S S?
527 backtick quoted execution (``, qx) ck_open t%
528 # glob defaults its first arg to $_
529 glob glob ck_glob t@ S?
530 readline <HANDLE> ck_null t% F?
531 rcatline append I/O operator ck_null t$
533 # Bindable operators.
535 regcmaybe regexp internal guard ck_fun s1 S
536 regcreset regexp internal reset ck_fun s1 S
537 regcomp regexp compilation ck_null s| S
538 match pattern match (m//) ck_match d/
539 qr pattern quote (qr//) ck_match s/
540 subst substitution (s///) ck_match dis/ S
541 substcont substitution iterator ck_null dis|
542 trans transliteration (tr///) ck_match is" S
545 # sassign is special-cased for op class
547 sassign scalar assignment ck_sassign s0
548 aassign list assignment ck_null t2 L L
550 chop chop ck_spair mts% L
551 schop scalar chop ck_null stu% S?
552 chomp chomp ck_spair mTs% L
553 schomp scalar chomp ck_null sTu% S?
554 defined defined operator ck_defined isu% S?
555 undef undef operator ck_lfun s% S?
556 study study ck_fun su% S?
557 pos match position ck_lfun stu% S?
559 preinc preincrement (++) ck_lfun dIs1 S
560 i_preinc integer preincrement (++) ck_lfun dis1 S
561 predec predecrement (--) ck_lfun dIs1 S
562 i_predec integer predecrement (--) ck_lfun dis1 S
563 postinc postincrement (++) ck_lfun dIst1 S
564 i_postinc integer postincrement (++) ck_lfun disT1 S
565 postdec postdecrement (--) ck_lfun dIst1 S
566 i_postdec integer postdecrement (--) ck_lfun disT1 S
568 # Ordinary operators.
570 pow exponentiation (**) ck_null fsT2 S S
572 multiply multiplication (*) ck_null IfsT2 S S
573 i_multiply integer multiplication (*) ck_null ifsT2 S S
574 divide division (/) ck_null IfsT2 S S
575 i_divide integer division (/) ck_null ifsT2 S S
576 modulo modulus (%) ck_null IifsT2 S S
577 i_modulo integer modulus (%) ck_null ifsT2 S S
578 repeat repeat (x) ck_repeat mt2 L S
580 add addition (+) ck_null IfsT2 S S
581 i_add integer addition (+) ck_null ifsT2 S S
582 subtract subtraction (-) ck_null IfsT2 S S
583 i_subtract integer subtraction (-) ck_null ifsT2 S S
584 concat concatenation (.) or string ck_concat fsT2 S S
585 stringify string ck_fun fsT@ S
587 left_shift left bitshift (<<) ck_bitop fsT2 S S
588 right_shift right bitshift (>>) ck_bitop fsT2 S S
590 lt numeric lt (<) ck_null Iifs2 S S
591 i_lt integer lt (<) ck_null ifs2 S S
592 gt numeric gt (>) ck_null Iifs2 S S
593 i_gt integer gt (>) ck_null ifs2 S S
594 le numeric le (<=) ck_null Iifs2 S S
595 i_le integer le (<=) ck_null ifs2 S S
596 ge numeric ge (>=) ck_null Iifs2 S S
597 i_ge integer ge (>=) ck_null ifs2 S S
598 eq numeric eq (==) ck_null Iifs2 S S
599 i_eq integer eq (==) ck_null ifs2 S S
600 ne numeric ne (!=) ck_null Iifs2 S S
601 i_ne integer ne (!=) ck_null ifs2 S S
602 ncmp numeric comparison (<=>) ck_null Iifst2 S S
603 i_ncmp integer comparison (<=>) ck_null ifst2 S S
605 slt string lt ck_null ifs2 S S
606 sgt string gt ck_null ifs2 S S
607 sle string le ck_null ifs2 S S
608 sge string ge ck_null ifs2 S S
609 seq string eq ck_null ifs2 S S
610 sne string ne ck_null ifs2 S S
611 scmp string comparison (cmp) ck_null ifst2 S S
613 bit_and bitwise and (&) ck_bitop fst2 S S
614 bit_xor bitwise xor (^) ck_bitop fst2 S S
615 bit_or bitwise or (|) ck_bitop fst2 S S
617 negate negation (-) ck_null Ifst1 S
618 i_negate integer negation (-) ck_null ifsT1 S
619 not not ck_null ifs1 S
620 complement 1's complement (~) ck_bitop fst1 S
622 # High falutin' math.
624 atan2 atan2 ck_fun fsT@ S S
625 sin sin ck_fun fsTu% S?
626 cos cos ck_fun fsTu% S?
627 rand rand ck_fun sT% S?
628 srand srand ck_fun s% S?
629 exp exp ck_fun fsTu% S?
630 log log ck_fun fsTu% S?
631 sqrt sqrt ck_fun fsTu% S?
635 int int ck_fun fsTu% S?
636 hex hex ck_fun fsTu% S?
637 oct oct ck_fun fsTu% S?
638 abs abs ck_fun fsTu% S?
642 length length ck_lengthconst isTu% S?
643 substr substr ck_substr st@ S S S? S?
644 vec vec ck_fun ist@ S S S
646 index index ck_index isT@ S S S?
647 rindex rindex ck_index isT@ S S S?
649 sprintf sprintf ck_fun mfst@ S L
650 formline formline ck_fun ms@ S L
651 ord ord ck_fun ifsTu% S?
652 chr chr ck_fun fsTu% S?
653 crypt crypt ck_fun fsT@ S S
654 ucfirst ucfirst ck_fun fstu% S?
655 lcfirst lcfirst ck_fun fstu% S?
656 uc uc ck_fun fstu% S?
657 lc lc ck_fun fstu% S?
658 quotemeta quotemeta ck_fun fstu% S?
662 rv2av array dereference ck_rvconst dt1
663 aelemfast constant array element ck_null s$ A S
664 aelem array element ck_null s2 A S
665 aslice array slice ck_null m@ A L
670 values values ck_fun t% H
671 keys keys ck_fun t% H
672 delete delete ck_delete % S
673 exists exists ck_exists is% S
674 rv2hv hash dereference ck_rvconst dt1
675 helem hash element ck_null s2@ H S
676 hslice hash slice ck_null m@ H L
678 # Explosives and implosives.
680 unpack unpack ck_unpack @ S S?
681 pack pack ck_fun mst@ S L
682 split split ck_split t@ S S S
683 join join or string ck_join mst@ S L
687 list list ck_null m@ L
688 lslice list slice ck_null 2 H L L
689 anonlist anonymous list ([]) ck_fun ms@ L
690 anonhash anonymous hash ({}) ck_fun ms@ L
692 splice splice ck_fun m@ A S? S? L
693 push push ck_fun imsT@ A L
694 pop pop ck_shift s% A?
695 shift shift ck_shift s% A?
696 unshift unshift ck_fun imsT@ A L
697 sort sort ck_sort m@ C? L
698 reverse reverse ck_fun mt@ L
700 grepstart grep ck_grep dm@ C L
701 grepwhile grep iterator ck_null dt|
703 mapstart map ck_grep dm@ C L
704 mapwhile map iterator ck_null dt|
708 range flipflop ck_null | S S
709 flip range (or flip) ck_null 1 S S
710 flop range (or flop) ck_null 1
714 and logical and (&&) ck_null |
715 or logical or (||) ck_null |
716 xor logical xor ck_null fs2 S S
717 cond_expr conditional expression ck_null d|
718 andassign logical and assignment (&&=) ck_null s|
719 orassign logical or assignment (||=) ck_null s|
721 method method lookup ck_method d1
722 entersub subroutine entry ck_subr dmt1 L
723 leavesub subroutine exit ck_null 1
724 leavesublv lvalue subroutine return ck_null 1
725 caller caller ck_fun t% S?
726 warn warn ck_fun imst@ L
727 die die ck_die dimst@ L
728 reset symbol reset ck_fun is% S?
730 lineseq line sequence ck_null @
731 nextstate next statement ck_null s;
732 dbstate debug next statement ck_null s;
733 unstack iteration finalizer ck_null s0
734 enter block entry ck_null 0
735 leave block exit ck_null @
736 scope block ck_null @
737 enteriter foreach loop entry ck_null d{
738 iter foreach loop iterator ck_null 0
739 enterloop loop entry ck_null d{
740 leaveloop loop exit ck_null 2
741 return return ck_return dm@ L
742 last last ck_null ds}
743 next next ck_null ds}
744 redo redo ck_null ds}
745 dump dump ck_null ds}
746 goto goto ck_null ds}
747 exit exit ck_exit ds% S?
750 #nswitch numeric switch ck_null d
751 #cswitch character switch ck_null d
755 open open ck_open ismt@ F S? L
756 close close ck_fun is% F?
757 pipe_op pipe ck_fun is@ F F
759 fileno fileno ck_fun ist% F
760 umask umask ck_fun ist% S?
761 binmode binmode ck_fun s@ F S?
763 tie tie ck_fun idms@ R S L
764 untie untie ck_fun is% R
765 tied tied ck_fun s% R
766 dbmopen dbmopen ck_fun is@ H S S
767 dbmclose dbmclose ck_fun is% H
769 sselect select system call ck_select t@ S S S S
770 select select ck_select st@ F?
772 getc getc ck_eof st% F?
773 read read ck_fun imst@ F R S S?
774 enterwrite write ck_fun dis% F?
775 leavewrite write exit ck_null 1
777 prtf printf ck_listiob ims@ F? L
778 print print ck_listiob ims@ F? L
780 sysopen sysopen ck_fun s@ F S S S?
781 sysseek sysseek ck_fun s@ F S S
782 sysread sysread ck_fun imst@ F R S S?
783 syswrite syswrite ck_fun imst@ F S S? S?
785 send send ck_fun imst@ Fs S S S?
786 recv recv ck_fun imst@ Fs R S S
788 eof eof ck_eof is% F?
789 tell tell ck_fun st% F?
790 seek seek ck_fun s@ F S S
791 # truncate really behaves as if it had both "S S" and "F S"
792 truncate truncate ck_trunc is@ S S
794 fcntl fcntl ck_fun st@ F S S
795 ioctl ioctl ck_fun st@ F S S
796 flock flock ck_fun isT@ F S
800 socket socket ck_fun is@ Fs S S S
801 sockpair socketpair ck_fun is@ Fs Fs S S S
803 bind bind ck_fun is@ Fs S
804 connect connect ck_fun is@ Fs S
805 listen listen ck_fun is@ Fs S
806 accept accept ck_fun ist@ Fs Fs
807 shutdown shutdown ck_fun ist@ Fs S
809 gsockopt getsockopt ck_fun is@ Fs S S
810 ssockopt setsockopt ck_fun is@ Fs S S S
812 getsockname getsockname ck_fun is% Fs
813 getpeername getpeername ck_fun is% Fs
817 lstat lstat ck_ftst u- F
818 stat stat ck_ftst u- F
819 ftrread -R ck_ftst isu- F-
820 ftrwrite -W ck_ftst isu- F-
821 ftrexec -X ck_ftst isu- F-
822 fteread -r ck_ftst isu- F-
823 ftewrite -w ck_ftst isu- F-
824 fteexec -x ck_ftst isu- F-
825 ftis -e ck_ftst isu- F-
826 fteowned -o ck_ftst isu- F-
827 ftrowned -O ck_ftst isu- F-
828 ftzero -z ck_ftst isu- F-
829 ftsize -s ck_ftst istu- F-
830 ftmtime -M ck_ftst stu- F-
831 ftatime -A ck_ftst stu- F-
832 ftctime -C ck_ftst stu- F-
833 ftsock -S ck_ftst isu- F-
834 ftchr -c ck_ftst isu- F-
835 ftblk -b ck_ftst isu- F-
836 ftfile -f ck_ftst isu- F-
837 ftdir -d ck_ftst isu- F-
838 ftpipe -p ck_ftst isu- F-
839 ftlink -l ck_ftst isu- F-
840 ftsuid -u ck_ftst isu- F-
841 ftsgid -g ck_ftst isu- F-
842 ftsvtx -k ck_ftst isu- F-
843 fttty -t ck_ftst is- F-
844 fttext -T ck_ftst isu- F-
845 ftbinary -B ck_ftst isu- F-
849 chdir chdir ck_fun isT% S?
850 chown chown ck_fun imsT@ L
851 chroot chroot ck_fun isTu% S?
852 unlink unlink ck_fun imsTu@ L
853 chmod chmod ck_fun imsT@ L
854 utime utime ck_fun imsT@ L
855 rename rename ck_fun isT@ S S
856 link link ck_fun isT@ S S
857 symlink symlink ck_fun isT@ S S
858 readlink readlink ck_fun stu% S?
859 mkdir mkdir ck_fun isTu@ S? S?
860 rmdir rmdir ck_fun isTu% S?
864 open_dir opendir ck_fun is@ F S
865 readdir readdir ck_fun % F
866 telldir telldir ck_fun st% F
867 seekdir seekdir ck_fun s@ F S
868 rewinddir rewinddir ck_fun s% F
869 closedir closedir ck_fun is% F
873 fork fork ck_null ist0
874 wait wait ck_null isT0
875 waitpid waitpid ck_fun isT@ S S
876 system system ck_exec imsT@ S? L
877 exec exec ck_exec dimsT@ S? L
878 kill kill ck_fun dimsT@ L
879 getppid getppid ck_null isT0
880 getpgrp getpgrp ck_fun isT% S?
881 setpgrp setpgrp ck_fun isT@ S? S?
882 getpriority getpriority ck_fun isT@ S S
883 setpriority setpriority ck_fun isT@ S S S
887 # NOTE: MacOS patches the 'i' of time() away later when the interpreter
888 # is created because in MacOS time() is already returning times > 2**31-1,
889 # that is, non-integers.
891 time time ck_null isT0
893 localtime localtime ck_fun t% S?
894 gmtime gmtime ck_fun t% S?
895 alarm alarm ck_fun istu% S?
896 sleep sleep ck_fun isT% S?
900 shmget shmget ck_fun imst@ S S S
901 shmctl shmctl ck_fun imst@ S S S
902 shmread shmread ck_fun imst@ S S S S
903 shmwrite shmwrite ck_fun imst@ S S S S
907 msgget msgget ck_fun imst@ S S
908 msgctl msgctl ck_fun imst@ S S S
909 msgsnd msgsnd ck_fun imst@ S S S
910 msgrcv msgrcv ck_fun imst@ S S S S S
914 semget semget ck_fun imst@ S S S
915 semctl semctl ck_fun imst@ S S S S
916 semop semop ck_fun imst@ S S
920 require require ck_require du% S?
921 dofile do "file" ck_fun d1 S
922 entereval eval "string" ck_eval d% S
923 leaveeval eval "string" exit ck_null 1 S
924 #evalonce eval constant string ck_null d1 S
925 entertry eval {block} ck_null |
926 leavetry eval {block} exit ck_null @
930 ghbyname gethostbyname ck_fun % S
931 ghbyaddr gethostbyaddr ck_fun @ S S
932 ghostent gethostent ck_null 0
933 gnbyname getnetbyname ck_fun % S
934 gnbyaddr getnetbyaddr ck_fun @ S S
935 gnetent getnetent ck_null 0
936 gpbyname getprotobyname ck_fun % S
937 gpbynumber getprotobynumber ck_fun @ S
938 gprotoent getprotoent ck_null 0
939 gsbyname getservbyname ck_fun @ S S
940 gsbyport getservbyport ck_fun @ S S
941 gservent getservent ck_null 0
942 shostent sethostent ck_fun is% S
943 snetent setnetent ck_fun is% S
944 sprotoent setprotoent ck_fun is% S
945 sservent setservent ck_fun is% S
946 ehostent endhostent ck_null is0
947 enetent endnetent ck_null is0
948 eprotoent endprotoent ck_null is0
949 eservent endservent ck_null is0
950 gpwnam getpwnam ck_fun % S
951 gpwuid getpwuid ck_fun % S
952 gpwent getpwent ck_null 0
953 spwent setpwent ck_null is0
954 epwent endpwent ck_null is0
955 ggrnam getgrnam ck_fun % S
956 ggrgid getgrgid ck_fun % S
957 ggrent getgrent ck_null 0
958 sgrent setgrent ck_null is0
959 egrent endgrent ck_null is0
960 getlogin getlogin ck_null st0
964 syscall syscall ck_fun imst@ S L
966 # For multi-threading
967 lock lock ck_rfun s% R
968 threadsv per-thread value ck_null ds0
971 setstate set statement info ck_null s;
972 method_named method with known name ck_null d$
974 dor defined or (//) ck_null |
975 dorassign defined or assignment (//=) ck_null s|
977 # Add new ops before this, the custom operator.
979 custom unknown custom operator ck_null 0