ruby-changes:50119
From: k0kubun <ko1@a...>
Date: Tue, 6 Feb 2018 00:49:36 +0900 (JST)
Subject: [ruby-changes:50119] k0kubun:r62237 (trunk): vm_insnhelper.c: prefix rb_ to simple_iseq_p
k0kubun 2018-02-06 00:49:32 +0900 (Tue, 06 Feb 2018) New Revision: 62237 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62237 Log: vm_insnhelper.c: prefix rb_ to simple_iseq_p which is started to be used by mjit_compile.c in r62197. Related to r62235, this intends to transform the function to static. Of course we shouldn't pollute the namespace anyway. Modified files: trunk/mjit_compile.c trunk/vm_insnhelper.c Index: vm_insnhelper.c =================================================================== --- vm_insnhelper.c (revision 62236) +++ vm_insnhelper.c (revision 62237) @@ -1598,7 +1598,7 @@ vm_call_iseq_setup_normal_0start(rb_exec https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1598 } int -simple_iseq_p(const rb_iseq_t *iseq) +rb_simple_iseq_p(const rb_iseq_t *iseq) { return iseq->body->param.flags.has_opt == FALSE && iseq->body->param.flags.has_rest == FALSE && @@ -1612,7 +1612,7 @@ static inline int https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1612 vm_callee_setup_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc, const rb_iseq_t *iseq, VALUE *argv, int param_size, int local_size) { - if (LIKELY(simple_iseq_p(iseq) && !(ci->flag & VM_CALL_KW_SPLAT))) { + if (LIKELY(rb_simple_iseq_p(iseq) && !(ci->flag & VM_CALL_KW_SPLAT))) { rb_control_frame_t *cfp = ec->cfp; CALLER_SETUP_ARG(cfp, calling, ci); /* splat arg */ @@ -2604,7 +2604,7 @@ vm_callee_setup_block_arg_arg0_check(VAL https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2604 static int vm_callee_setup_block_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, const struct rb_call_info *ci, const rb_iseq_t *iseq, VALUE *argv, const enum arg_setup_type arg_setup_type) { - if (simple_iseq_p(iseq)) { + if (rb_simple_iseq_p(iseq)) { rb_control_frame_t *cfp = ec->cfp; VALUE arg0; Index: mjit_compile.c =================================================================== --- mjit_compile.c (revision 62236) +++ mjit_compile.c (revision 62237) @@ -57,9 +57,9 @@ get_iseq_if_available(CALL_CACHE cc) https://github.com/ruby/ruby/blob/trunk/mjit_compile.c#L57 static int inlinable_iseq_p(CALL_INFO ci, CALL_CACHE cc, const rb_iseq_t *iseq) { - extern int simple_iseq_p(const rb_iseq_t *iseq); + extern int rb_simple_iseq_p(const rb_iseq_t *iseq); return iseq != NULL - && simple_iseq_p(iseq) && !(ci->flag & VM_CALL_KW_SPLAT) /* top of vm_callee_setup_arg */ + && rb_simple_iseq_p(iseq) && !(ci->flag & VM_CALL_KW_SPLAT) /* top of vm_callee_setup_arg */ && (!IS_ARGS_SPLAT(ci) && !IS_ARGS_KEYWORD(ci) && !(METHOD_ENTRY_VISI(cc->me) == METHOD_VISI_PROTECTED)); /* CI_SET_FASTPATH */ } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/