aboutsummaryrefslogtreecommitdiffstats
path: root/regint.h
diff options
context:
space:
mode:
authorTSUYUSATO Kitsune <make.just.on@gmail.com>2022-11-08 15:13:27 +0900
committerYusuke Endoh <mame@ruby-lang.org>2022-11-09 23:21:26 +0900
commita1c1fc558a0ee791e91a66cae5c9515679890339 (patch)
tree30fd8a2b80ad2f61c7f0b9b12c01e6ad592e4039 /regint.h
parent22294731a82642ac63ed6708e0015361d05d6677 (diff)
downloadruby-a1c1fc558a0ee791e91a66cae5c9515679890339.tar.gz
Revert "Refactor field names"
This reverts commit 1e6673d6bbd2adbf555d82c7c0906ceb148ed6ee.
Diffstat (limited to 'regint.h')
-rw-r--r--regint.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/regint.h b/regint.h
index e1e48c0951..12b5d5c70a 100644
--- a/regint.h
+++ b/regint.h
@@ -45,8 +45,8 @@
#define USE_CACHE_MATCH_OPT
#ifdef USE_CACHE_MATCH_OPT
-# define NUM_CACHE_INDEX_FAIL -1
-# define NUM_CACHE_INDEX_UNINIT -2
+# define NUM_CACHE_OPCODE_FAIL -1
+# define NUM_CACHE_OPCODE_UNINIT -2
#endif
#if defined(ONIG_DEBUG_PARSE_TREE) || defined(ONIG_DEBUG_MATCH) || \
@@ -874,11 +874,10 @@ typedef struct _OnigStackType {
#ifdef USE_CACHE_MATCH_OPT
typedef struct {
- UChar* addr; /* pointer to corresponding opcode. */
- int point; /* cache point number (in outer repeat if `outer_repeat != -1`) */
- int outer_repeat; /* outer repeat index number */
+ UChar *addr;
+ int num;
+ int outer_repeat;
} OnigCacheIndex;
-#define NO_OUTER_REPEAT -1
#endif
typedef struct {
@@ -904,12 +903,12 @@ typedef struct {
uint64_t end_time;
#endif
#ifdef USE_CACHE_MATCH_OPT
- int num_fail; /* counter of failure (backtrack) number for switching cache optimization. */
- int num_cache_point; /* number of cache point in program */
- int num_cache_index; /* size of cache index array */
- int enable_cache_opt; /* whether cache optimization is enabled */
- OnigCacheIndex* cache_index; /* cache index array for computing cache point number */
- uint8_t* cache; /* bit array for cache optimization */
+ int num_fail;
+ int enable_cache_match_opt;
+ int num_cache_opcode;
+ int num_cache_table;
+ OnigCacheIndex *cache_index_table;
+ uint8_t *match_cache;
#endif
} OnigMatchArg;