mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Delay start of the match cache optimization (#7738)
This commit is contained in:
parent
18b27185c3
commit
ac730d3e75
Notes:
git
2023-05-04 04:16:11 +00:00
Merged-By: makenowjust <make.just.on@gmail.com>
2 changed files with 23 additions and 11 deletions
9
regint.h
9
regint.h
|
@ -909,7 +909,7 @@ typedef struct {
|
|||
uint64_t end_time;
|
||||
#endif
|
||||
#ifdef USE_MATCH_CACHE
|
||||
int enable_match_cache;
|
||||
int match_cache_status;
|
||||
long num_fails;
|
||||
long num_cache_opcodes;
|
||||
OnigCacheOpcode* cache_opcodes;
|
||||
|
@ -918,8 +918,13 @@ typedef struct {
|
|||
#endif
|
||||
} OnigMatchArg;
|
||||
|
||||
#define NUM_CACHE_OPCODES_UNINIT 1
|
||||
#define NUM_CACHE_OPCODES_IMPOSSIBLE -1
|
||||
#define NUM_CACHE_OPCODES_UNINIT -2
|
||||
|
||||
#define MATCH_CACHE_STATUS_UNINIT 1
|
||||
#define MATCH_CACHE_STATUS_INIT 2
|
||||
#define MATCH_CACHE_STATUS_DISABLED -1
|
||||
#define MATCH_CACHE_STATUS_ENABLED 0
|
||||
|
||||
#define IS_CODE_SB_WORD(enc,code) \
|
||||
(ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue