summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-14 09:31:24 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-14 09:31:24 +0000
commit04ac63fe57d3643dac0c0779d32f0b89ec9e2f15 (patch)
treeb0f3c8427285d93740c4edaaf7eb628262831db6
parentc5570cf9bde992f3d14a6382f1038fb422182f45 (diff)
Prefer uintptr_t over ptrdiff_t for i686
as debugged in PR [close https://github.com/ruby/ruby/pull/2130] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--mjit.c2
-rw-r--r--test/ruby/test_jit.rb6
2 files changed, 1 insertions, 7 deletions
diff --git a/mjit.c b/mjit.c
index 4fa9c82..9d849b1 100644
--- a/mjit.c
+++ b/mjit.c
@@ -380,7 +380,7 @@ rb_mjit_iseq_compile_info(const struct rb_iseq_constant_body *body)
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),
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index 700497c..50bfcef 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -529,9 +529,6 @@ class TestJIT < Test::Unit::TestCase
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
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