ruby-changes:30663
From: charliesome <ko1@a...>
Date: Sat, 31 Aug 2013 15:07:28 +0900 (JST)
Subject: [ruby-changes:30663] charliesome:r42742 (trunk): * compile.c (NODE_MATCH3): pass CALL_INFO to opt_regexpmatch2
charliesome 2013-08-31 15:07:21 +0900 (Sat, 31 Aug 2013) New Revision: 42742 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42742 Log: * compile.c (NODE_MATCH3): pass CALL_INFO to opt_regexpmatch2 * insns.def (opt_regexpmatch2): use CALL_SIMPLE_METHOD to call =~ if the receiver is not a T_STRING [Bug #8847] [ruby-core:56916] Modified files: trunk/ChangeLog trunk/compile.c trunk/insns.def Index: ChangeLog =================================================================== --- ChangeLog (revision 42741) +++ ChangeLog (revision 42742) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Aug 31 15:03:00 2013 Charlie Somerville <charliesome@r...> + + * compile.c (NODE_MATCH3): pass CALL_INFO to opt_regexpmatch2 + + * insns.def (opt_regexpmatch2): use CALL_SIMPLE_METHOD to call =~ if + the receiver is not a T_STRING [Bug #8847] [ruby-core:56916] + Sat Aug 31 14:07:11 2013 Tanaka Akira <akr@f...> * lib/securerandom.rb (random_bytes): Use Process.clock_gettime. Index: insns.def =================================================================== --- insns.def (revision 42741) +++ insns.def (revision 42742) @@ -2090,7 +2090,7 @@ opt_regexpmatch1 https://github.com/ruby/ruby/blob/trunk/insns.def#L2090 */ DEFINE_INSN opt_regexpmatch2 -() +(CALL_INFO ci) (VALUE obj2, VALUE obj1) (VALUE val) { @@ -2098,7 +2098,9 @@ opt_regexpmatch2 https://github.com/ruby/ruby/blob/trunk/insns.def#L2098 val = rb_reg_match(obj1, obj2); } else { - val = rb_funcall(obj2, idEqTilde, 1, obj1); + PUSH(obj2); + PUSH(obj1); + CALL_SIMPLE_METHOD(obj2); } } Index: compile.c =================================================================== --- compile.c (revision 42741) +++ compile.c (revision 42742) @@ -4760,7 +4760,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ https://github.com/ruby/ruby/blob/trunk/compile.c#L4760 else { ADD_SEQ(ret, recv); ADD_SEQ(ret, val); - ADD_INSN(ret, line, opt_regexpmatch2); + ADD_INSN1(ret, line, opt_regexpmatch2, new_callinfo(iseq, idEqTilde, 1, 0, 0)); } } else { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/