mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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 <maxime.chevalierboisvert@shopify.com> * 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 <maxime.chevalierboisvert@shopify.com>
This commit is contained in:
parent
50ace992c7
commit
8a6740c70e
12 changed files with 206 additions and 10 deletions
3
error.c
3
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": ",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue