aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2020-08-31 22:48:34 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2020-09-01 22:02:29 -0400
commit4c3f0597de99103374012522beecadeaa9e25eed (patch)
tree493fda46e4d0afe2182fe36d20852a89d6c1bab6 /vm_insnhelper.c
parent94b54b038c1f4d6d2b54e10dd0305b1bc283449b (diff)
downloadruby-4c3f0597de99103374012522beecadeaa9e25eed.tar.gz
Remove the pc argument of vm_trace()
This makes the binary 272 bytes smaller on -O3 GCC 10.2.0.
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index f1c293a50a..9dcd75cc6c 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -4902,7 +4902,7 @@ vm_opt_regexpmatch2(VALUE recv, VALUE obj)
rb_event_flag_t rb_iseq_event_flags(const rb_iseq_t *iseq, size_t pos);
-NOINLINE(static void vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc));
+NOINLINE(static void vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp));
static inline void
vm_trace_hook(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc,
@@ -4955,8 +4955,9 @@ rb_vm_opt_cfunc_p(CALL_CACHE cc, int insn)
} while (0)
static void
-vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc)
+vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
{
+ const VALUE *pc = reg_cfp->pc;
rb_event_flag_t enabled_flags = ruby_vm_event_flags & ISEQ_TRACE_EVENTS;
if (enabled_flags == 0 && ruby_vm_event_local_num == 0) {