summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opnames.h1
-rwxr-xr-xregen/opcode.pl3
2 files changed, 4 insertions, 0 deletions
diff --git a/opnames.h b/opnames.h
index 8b6a39a161..fd86d2a827 100644
--- a/opnames.h
+++ b/opnames.h
@@ -392,6 +392,7 @@ typedef enum opcode {
} opcode;
#define MAXO 374
+#define OP_FREED MAXO
/* the OP_IS_* macros are optimized to a simple range check because
all the member OPs are contiguous in regen/opcodes table.
diff --git a/regen/opcode.pl b/regen/opcode.pl
index d8186cd294..1c15edc6b4 100755
--- a/regen/opcode.pl
+++ b/regen/opcode.pl
@@ -46,6 +46,8 @@ while (<OPS>) {
warn qq[Description "$desc" duplicates $seen{$desc}\n]
if $seen{$desc} and $key ne "transr";
die qq[Opcode "$key" duplicates $seen{$key}\n] if $seen{$key};
+ die qq[Opcode "freed" is reserved for the slab allocator\n]
+ if $key eq 'freed';
$seen{$desc} = qq[description of opcode "$key"];
$seen{$key} = qq[opcode "$key"];
@@ -189,6 +191,7 @@ for (@ops) {
print $on "\t", tab(3,"OP_max"), "\n";
print $on "} opcode;\n";
print $on "\n#define MAXO ", scalar @ops, "\n";
+print $on "#define OP_FREED MAXO\n";
# Emit op names and descriptions.