ruby-changes:53466
From: nobu <ko1@a...>
Date: Mon, 12 Nov 2018 16:14:48 +0900 (JST)
Subject: [ruby-changes:53466] nobu:r65682 (trunk): Export rb_flo_div_flo for MJIT
nobu 2018-11-12 16:14:43 +0900 (Mon, 12 Nov 2018) New Revision: 65682 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65682 Log: Export rb_flo_div_flo for MJIT Modified files: trunk/numeric.c trunk/test/ruby/test_jit.rb Index: numeric.c =================================================================== --- numeric.c (revision 65681) +++ numeric.c (revision 65682) @@ -1104,7 +1104,7 @@ double_div_double(double x, double y) https://github.com/ruby/ruby/blob/trunk/numeric.c#L1104 } } -VALUE +MJIT_FUNC_EXPORTED VALUE rb_flo_div_flo(VALUE x, VALUE y) { double num = RFLOAT_VALUE(x); Index: test/ruby/test_jit.rb =================================================================== --- test/ruby/test_jit.rb (revision 65681) +++ test/ruby/test_jit.rb (revision 65682) @@ -463,6 +463,7 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L463 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.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') end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/