#!/usr/bin/perl
+unlink "opcode.h";
open(OC, ">opcode.h") || die "Can't create opcode.h: $!\n";
select OC;
# Emit function declarations.
for (sort keys %ckname) {
- print "OP *\t", &tab(3,$_),"_((OP* op));\n";
+ print "OP *\t", &tab(3,$_),"_((OP* o));\n";
}
print "\n";
for (@ops) {
- print "OP *\t", &tab(3, "pp_\L$_"), "_((void));\n";
+ print "OP *\t", &tab(3, "pp_\L$_"), "_((ARGSproto));\n";
}
# Emit ppcode switch array.
rv2sv scalar deref ck_rvconst ds
av2arylen array length ck_null is
rv2cv subroutine deref ck_rvconst d
-anoncode anonymous subroutine ck_null 0
+anoncode anonymous subroutine ck_anoncode 0
prototype subroutine prototype ck_null s S
refgen reference constructor ck_spair m L
srefgen scalar ref constructor ck_null fs S
# Pushy I/O.
backtick backticks ck_null t
-glob glob ck_glob t S S
+# glob defaults its first arg to $_
+glob glob ck_glob t S? S?
readline <HANDLE> ck_null t
rcatline append I/O operator ck_null t
sgt string gt ck_scmp ifs S S
sle string le ck_scmp ifs S S
sge string ge ck_scmp ifs S S
-seq string eq ck_scmp ifs S S
-sne string ne ck_scmp ifs S S
+seq string eq ck_null ifs S S
+sne string ne ck_null ifs S S
scmp string comparison ck_scmp ifst S S
bit_and bitwise and ck_bitop fst S S
log log ck_fun fstu S?
sqrt sqrt ck_fun fstu S?
+# Lowbrow math.
+
int int ck_fun fstu S?
-hex hex ck_fun istu S?
-oct oct ck_fun istu S?
+hex hex ck_fun fstu S?
+oct oct ck_fun fstu S?
abs abs ck_fun fstu S?
# String stuff.
aelem array element ck_null s A S
aslice array slice ck_null m A L
-# Associative arrays.
+# Hashes.
each each ck_fun t H
values values ck_fun t H
keys keys ck_fun t H
-delete delete ck_delete s S
-exists exists operator ck_delete is S
-rv2hv associative array deref ck_rvconst dt
-helem associative array elem ck_null s H S
-hslice associative array slice ck_null m H L
+delete delete ck_delete 0 S
+exists exists operator ck_exists is S
+rv2hv hash deref ck_rvconst dt
+helem hash elem ck_null s H S
+hslice hash slice ck_null m H L
# Explosives and implosives.
print print ck_listiob ims F? L
sysopen sysopen ck_fun s F S S S?
+sysseek sysseek ck_fun s F S S
sysread sysread ck_fun imst F R S S?
syswrite syswrite ck_fun imst F S S S?
# Miscellaneous.
syscall syscall ck_fun imst S L
+
+# For multi-threading
+lock lock ck_null s S