From fc5ee247d5307a292cd2b083ce82fc24005bb385 Mon Sep 17 00:00:00 2001 From: Daniel Colson Date: Tue, 19 Aug 2025 10:02:13 -0400 Subject: ZJIT: Compile toregexp (#14200) `toregexp` is fairly similar to `concatstrings`, so this commit extracts a helper for pushing and popping operands on the native stack. There's probably opportunity to move some of this into lir (e.g. Alan suggested a push_many that could use STP on ARM to push 2 at a time), but I might save that for another day. --- internal/re.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'internal') diff --git a/internal/re.h b/internal/re.h index 2788f8b42a..593e5c464f 100644 --- a/internal/re.h +++ b/internal/re.h @@ -25,4 +25,9 @@ int rb_match_count(VALUE match); VALUE rb_reg_new_ary(VALUE ary, int options); VALUE rb_reg_last_defined(VALUE match); +#define ARG_REG_OPTION_MASK \ + (ONIG_OPTION_IGNORECASE|ONIG_OPTION_MULTILINE|ONIG_OPTION_EXTEND) +#define ARG_ENCODING_FIXED 16 +#define ARG_ENCODING_NONE 32 + #endif /* INTERNAL_RE_H */ -- cgit v1.2.3