diff options
author | TSUYUSATO Kitsune <make.just.on@gmail.com> | 2022-10-03 22:21:56 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2022-11-09 23:21:26 +0900 |
commit | 881bf9a0b8b52c05a5917b95d988ae4b9a391a47 (patch) | |
tree | f5b724175cd10ee5dab64496e3f12112b900054e /regint.h | |
parent | 230267d1a8f2b8245e911513926c06299ddeebc8 (diff) | |
download | ruby-881bf9a0b8b52c05a5917b95d988ae4b9a391a47.tar.gz |
Implement cache optimization for regexp matching
Diffstat (limited to 'regint.h')
-rw-r--r-- | regint.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -41,6 +41,14 @@ /* for byte-code statistical data. */ /* #define ONIG_DEBUG_STATISTICS */ +/* enable matching optimization by using cache. */ +#define USE_CACHE_MATCH_OPT + +#ifdef USE_CACHE_MATCH_OPT +# define NUM_CACHE_OPCODE_FAIL -1 +# define NUM_CACHE_OPCODE_UNINIT -2 +#endif + #if defined(ONIG_DEBUG_PARSE_TREE) || defined(ONIG_DEBUG_MATCH) || \ defined(ONIG_DEBUG_SEARCH) || defined(ONIG_DEBUG_COMPILE) || \ defined(ONIG_DEBUG_STATISTICS) || defined(ONIG_DEBUG_MEMLEAK) |