From f3a0d7a2035e9f5e0c70effd55732607e3def263 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 3 Jul 2020 09:52:35 -0700 Subject: Rewrite Kernel#tap with Ruby (#3281) * Rewrite Kernel#tap with Ruby This was good for VM too, but of course my intention is to unblock JIT's inlining of a block over yield (inlining invokeyield has not been committed though). * Fix test_settracefunc About the :tap deletions, the :tap events are actually traced (we already have a TracePoint test for builtin methods), but it's filtered out by tp.path == "xyzzy" (it became ""). We could trace tp.path == "" cases too, but the lineno is impacted by kernel.rb changes and I didn't want to make it fragile for kernel.rb lineno changes. --- benchmark/kernel_tap.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 benchmark/kernel_tap.yml (limited to 'benchmark/kernel_tap.yml') diff --git a/benchmark/kernel_tap.yml b/benchmark/kernel_tap.yml new file mode 100644 index 0000000000..4dcbb31b4d --- /dev/null +++ b/benchmark/kernel_tap.yml @@ -0,0 +1,6 @@ +prelude: | + obj = Object.new + x = nil +benchmark: + kernel_tap: obj.tap { |o| x = o } +loop_count: 20000000 -- cgit v1.2.1