summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2024-02-23 11:08:09 -0800
committerGitHub <[email protected]>2024-02-23 19:08:09 +0000
commit8a6740c70edf39cdf6230659d191240c43dc6d22 (patch)
tree33ccb69b507392b7bc842dfe97e904f8a5bb4ef9 /error.c
parent50ace992c75724aac6765b944f9017e21901e276 (diff)
YJIT: Lazily push a frame for specialized C funcs (#10080)
* YJIT: Lazily push a frame for specialized C funcs Co-authored-by: Maxime Chevalier-Boisvert <[email protected]> * Fix a comment on pc_to_cfunc * Rename rb_yjit_check_pc to rb_yjit_lazy_push_frame * Rename it to jit_prepare_lazy_frame_call * Fix a typo * Optimize String#getbyte as well * Optimize String#byteslice as well --------- Co-authored-by: Maxime Chevalier-Boisvert <[email protected]>
Diffstat (limited to 'error.c')
-rw-r--r--error.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/error.c b/error.c
index 385da82f38..ac579777be 100644
--- a/error.c
+++ b/error.c
@@ -48,6 +48,7 @@
#include "ruby/util.h"
#include "ruby_assert.h"
#include "vm_core.h"
+#include "yjit.h"
#include "builtin.h"
@@ -1409,6 +1410,7 @@ rb_exc_new_cstr(VALUE etype, const char *s)
VALUE
rb_exc_new_str(VALUE etype, VALUE str)
{
+ rb_yjit_lazy_push_frame(GET_EC()->cfp->pc);
StringValue(str);
return rb_class_new_instance(1, &str, etype);
}
@@ -3827,6 +3829,7 @@ inspect_frozen_obj(VALUE obj, VALUE mesg, int recur)
void
rb_error_frozen_object(VALUE frozen_obj)
{
+ rb_yjit_lazy_push_frame(GET_EC()->cfp->pc);
VALUE debug_info;
const ID created_info = id_debug_created_info;
VALUE mesg = rb_sprintf("can't modify frozen %"PRIsVALUE": ",