aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-12 17:52:41 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-12 17:52:41 -0800
commit775d672c867ab68d7152d0f0ad58f548bbfda461 (patch)
tree59ae0eb2e589607ac729fd3216c3bf0e46851c18
parente14e4bacadaeb6e9031077a95a7ac25d5c70646f (diff)
Removed dead code for getting opcode names
-rw-r--r--vm.c29
-rw-r--r--vm.h1
2 files changed, 0 insertions, 30 deletions
diff --git a/vm.c b/vm.c
index 6969c55..94e18fa 100644
--- a/vm.c
+++ b/vm.c
@@ -13,30 +13,6 @@
#include "vm.h"
-/*
- * The names of the opcodes (keep in sync with the enum definition above)
- */
-static const char *opcode_names[] = {
- [VM_ANYCHAR] = "ANYCHAR",
- [VM_STRING] = "STRING",
- [VM_RANGE] = "RANGE",
- [VM_NOT] = "NOT",
- [VM_UPTO_AND] = "UPTO_AND",
- [VM_REPEAT] = "REPEAT",
- [VM_BEFORE] = "BEFORE",
- [VM_AFTER] = "AFTER",
- [VM_CAPTURE] = "CAPTURE",
- [VM_HIDE] = "HIDE",
- [VM_OTHERWISE] = "OTHERWISE",
- [VM_CHAIN] = "CHAIN",
- [VM_REPLACE] = "REPLACE",
- [VM_EQUAL] = "EQUAL",
- [VM_NOT_EQUAL] = "NOT_EQUAL",
- [VM_REF] = "REF",
- [VM_BACKREF] = "BACKREF",
- [VM_NODENT] = "NODENT",
-};
-
// UTF8-compliant char iteration
static inline const char *next_char(file_t *f, const char *str)
{
@@ -54,11 +30,6 @@ static inline const char *next_char(file_t *f, const char *str)
return str;
}
-const char *opcode_name(enum VMOpcode o)
-{
- return opcode_names[o];
-}
-
/*
* Recursively deallocate a match object and set to NULL
*/
diff --git a/vm.h b/vm.h
index b19f80b..189f9f4 100644
--- a/vm.h
+++ b/vm.h
@@ -8,7 +8,6 @@
#include "types.h"
-const char *opcode_name(enum VMOpcode o);
__attribute__((hot, nonnull(2,3,4)))
match_t *match(def_t *defs, file_t *f, const char *str, vm_op_t *op, unsigned int flags);
__attribute__((nonnull))