Skip to content

Commit

Permalink
RJIT: Rewind $! after compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Dec 23, 2023
1 parent ef06510 commit da02d08
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rjit.c
Expand Up @@ -172,7 +172,7 @@ extern VALUE rb_gc_enable(void);
extern VALUE rb_gc_disable(void);
extern uint64_t rb_vm_insns_count;

// Disable GC, TracePoint, JIT, and stats
// Disable GC, TracePoint, JIT, stats, and $!
#define WITH_RJIT_ISOLATED_USING_PC(using_pc, stmt) do { \
VALUE was_disabled = rb_gc_disable(); \
\
Expand All @@ -192,8 +192,12 @@ extern uint64_t rb_vm_insns_count;
rjit_stats_p = false; \
uint64_t insns_count = rb_vm_insns_count; \
\
VALUE err = rb_errinfo(); \
\
stmt; \
\
rb_set_errinfo(err); \
\
rb_vm_insns_count = insns_count; \
rjit_stats_p = rb_rjit_opts.stats; \
\
Expand Down

0 comments on commit da02d08

Please sign in to comment.