mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Refactor field names
This commit is contained in:
parent
0a14825f73
commit
22294731a8
3 changed files with 162 additions and 169 deletions
23
regint.h
23
regint.h
|
@ -45,8 +45,8 @@
|
|||
#define USE_CACHE_MATCH_OPT
|
||||
|
||||
#ifdef USE_CACHE_MATCH_OPT
|
||||
# define NUM_CACHE_OPCODE_FAIL -1
|
||||
# define NUM_CACHE_OPCODE_UNINIT -2
|
||||
# define NUM_CACHE_INDEX_FAIL -1
|
||||
# define NUM_CACHE_INDEX_UNINIT -2
|
||||
#endif
|
||||
|
||||
#if defined(ONIG_DEBUG_PARSE_TREE) || defined(ONIG_DEBUG_MATCH) || \
|
||||
|
@ -874,10 +874,11 @@ typedef struct _OnigStackType {
|
|||
|
||||
#ifdef USE_CACHE_MATCH_OPT
|
||||
typedef struct {
|
||||
UChar *addr;
|
||||
int num;
|
||||
int outer_repeat;
|
||||
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 */
|
||||
} OnigCacheIndex;
|
||||
#define NO_OUTER_REPEAT -1
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
|
@ -903,12 +904,12 @@ typedef struct {
|
|||
uint64_t end_time;
|
||||
#endif
|
||||
#ifdef USE_CACHE_MATCH_OPT
|
||||
int num_fail;
|
||||
int enable_cache_match_opt;
|
||||
int num_cache_opcode;
|
||||
int num_cache_table;
|
||||
OnigCacheIndex *cache_index_table;
|
||||
uint8_t *match_cache;
|
||||
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 */
|
||||
#endif
|
||||
} OnigMatchArg;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue