[前][次][番号順一覧][スレッド一覧]

ruby-changes:56969

From: Takashi <ko1@a...>
Date: Mon, 12 Aug 2019 20:40:33 +0900 (JST)
Subject: [ruby-changes:56969] Takashi Kokubun: e6a0a954c9 (master): Add another test for frame omitted inlining

https://git.ruby-lang.org/ruby.git/commit/?id=e6a0a954c9

From e6a0a954c9ef5170b8b25088455106b3748c2187 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Mon, 12 Aug 2019 20:40:13 +0900
Subject: Add another test for frame omitted inlining


diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index 188c013..c9255f2 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -859,6 +859,22 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L859
     end;
   end
 
+  def test_frame_omitted_inlining
+    assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: "true\ntrue\ntrue\n", success_count: 1, min_calls: 2)
+    begin;
+      class Numeric
+        remove_method :zero?
+        def zero?
+          self == 0
+        end
+      end
+
+      3.times do
+        p 0.zero?
+      end
+    end;
+  end
+
   def test_block_handler_with_possible_frame_omitted_inlining
     assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: "70.0\n70.0\n70.0\n", success_count: 2, min_calls: 2)
     begin;
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]