mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Export rb_flo_div_flo for MJIT
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
767ab942bc
commit
d6cd22dbc5
2 changed files with 2 additions and 1 deletions
|
@ -1104,7 +1104,7 @@ double_div_double(double x, double y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
MJIT_FUNC_EXPORTED VALUE
|
||||||
rb_flo_div_flo(VALUE x, VALUE y)
|
rb_flo_div_flo(VALUE x, VALUE y)
|
||||||
{
|
{
|
||||||
double num = RFLOAT_VALUE(x);
|
double num = RFLOAT_VALUE(x);
|
||||||
|
|
|
@ -463,6 +463,7 @@ class TestJIT < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_compile_insn_opt_calc
|
def test_compile_insn_opt_calc
|
||||||
assert_compile_once('4 + 2 - ((2 * 3 / 2) % 2)', result_inspect: '5', insns: %i[opt_plus opt_minus opt_mult opt_div opt_mod])
|
assert_compile_once('4 + 2 - ((2 * 3 / 2) % 2)', result_inspect: '5', insns: %i[opt_plus opt_minus opt_mult opt_div opt_mod])
|
||||||
|
assert_compile_once('4.0 + 2.0 - ((2.0 * 3.0 / 2.0) % 2.0)', result_inspect: '5.0', insns: %i[opt_plus opt_minus opt_mult opt_div opt_mod])
|
||||||
assert_compile_once('4 + 2', result_inspect: '6')
|
assert_compile_once('4 + 2', result_inspect: '6')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue