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

ruby-changes:55341

From: k0kubun <ko1@a...>
Date: Sun, 14 Apr 2019 18:31:29 +0900 (JST)
Subject: [ruby-changes:55341] k0kubun:r67549 (trunk): Prefer uintptr_t over ptrdiff_t for i686

k0kubun	2019-04-14 18:31:24 +0900 (Sun, 14 Apr 2019)

  New Revision: 67549

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67549

  Log:
    Prefer uintptr_t over ptrdiff_t for i686
    
    as debugged in PR
    
    [close https://github.com/ruby/ruby/pull/2130]

  Modified files:
    trunk/mjit.c
    trunk/test/ruby/test_jit.rb
Index: test/ruby/test_jit.rb
===================================================================
--- test/ruby/test_jit.rb	(revision 67548)
+++ test/ruby/test_jit.rb	(revision 67549)
@@ -529,9 +529,6 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L529
       print block.call(obj)
     end;
 
-    if RUBY_PLATFORM =~ /i686/
-      skip 'recompilation is not happening on i686'
-    end
     # send call -> optimized call (send JIT) -> optimized call
     assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: '122', success_count: 2, min_calls: 2)
     begin;
@@ -708,9 +705,6 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L705
   end
 
   def test_inlined_undefined_ivar
-    if RUBY_PLATFORM =~ /i686/
-      skip 'recompilation is not happening on i686'
-    end
     assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: "bbb", success_count: 3, min_calls: 3)
     begin;
       class Foo
Index: mjit.c
===================================================================
--- mjit.c	(revision 67548)
+++ mjit.c	(revision 67549)
@@ -380,7 +380,7 @@ rb_mjit_iseq_compile_info(const struct r https://github.com/ruby/ruby/blob/trunk/mjit.c#L380
 void
 rb_mjit_recompile_iseq(const rb_iseq_t *iseq)
 {
-    if ((ptrdiff_t)iseq->body->jit_func <= (ptrdiff_t)LAST_JIT_ISEQ_FUNC)
+    if ((uintptr_t)iseq->body->jit_func <= (uintptr_t)LAST_JIT_ISEQ_FUNC)
         return;
 
     verbose(1, "JIT recompile: %s@%s:%d", RSTRING_PTR(iseq->body->location.label),

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

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