From 5906a5a7329e34a43dc46d4fc3cdf1b04cc13d0a Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Mon, 18 Oct 2021 11:30:18 -0400 Subject: Add comments about special runtime routines YJIT calls When YJIT make calls to routines without reconstructing interpreter state through jit_prepare_routine_call(), it relies on the routine to never allocate, raise, and push/pop control frames. Comment about this on the routines that YJTI calls. This is probably something we should dynamically verify on debug builds. It's hard to statically verify this as it requires verifying all functions in the call tree. Maybe something to look at in the future. --- internal/string.h | 1 + 1 file changed, 1 insertion(+) (limited to 'internal/string.h') diff --git a/internal/string.h b/internal/string.h index d010669ca8..18b01862f7 100644 --- a/internal/string.h +++ b/internal/string.h @@ -116,6 +116,7 @@ is_broken_string(VALUE str) } /* expect tail call optimization */ +// YJIT needs this function to never allocate and never raise static inline VALUE rb_str_eql_internal(const VALUE str1, const VALUE str2) { -- cgit v1.2.1