1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
k0kubun 2019-04-14 09:31:24 +00:00
parent c5570cf9bd
commit 04ac63fe57
2 changed files with 1 additions and 7 deletions

2
mjit.c
View file

@ -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),

View file

@ -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