diff options
author | TSUYUSATO Kitsune <make.just.on@gmail.com> | 2023-05-22 11:27:34 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-22 11:27:34 +0900 |
commit | a5819b5b2510556de0719317662d96096ce4089a (patch) | |
tree | 2f9d3a6d5dc0742ff2088630dfe99862377bc49b /regexec.c | |
parent | 872249e209fdb7b7c890a93b0f93a74a62d21aec (diff) | |
download | ruby-a5819b5b2510556de0719317662d96096ce4089a.tar.gz |
Allow the match cache optimization for atomic groups (#7804)
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -446,8 +446,10 @@ count_num_cache_opcodes(const regex_t* reg, long* num_cache_opcodes_ptr) case OP_POP_POS: case OP_PUSH_POS_NOT: case OP_FAIL_POS: + goto impossible; case OP_PUSH_STOP_BT: case OP_POP_STOP_BT: + break; case OP_LOOK_BEHIND: case OP_PUSH_LOOK_BEHIND_NOT: case OP_FAIL_LOOK_BEHIND_NOT: @@ -709,8 +711,10 @@ init_cache_opcodes(const regex_t* reg, OnigCacheOpcode* cache_opcodes, long* num case OP_POP_POS: case OP_PUSH_POS_NOT: case OP_FAIL_POS: + goto unexpected_bytecode_error; case OP_PUSH_STOP_BT: case OP_POP_STOP_BT: + break; case OP_LOOK_BEHIND: case OP_PUSH_LOOK_BEHIND_NOT: case OP_FAIL_LOOK_BEHIND_NOT: |