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

* gc.c (newobj_of_slowpass): fix typo (pass -> path).

Pointed out by Yukihiro Matsumoto  <matz@ruby-lang.org>.
* gc.c (newobj_of_...): `of' is unnecessary.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2015-10-10 18:49:05 +00:00
parent d9ac64fdc7
commit f6e57af98d
3 changed files with 14 additions and 7 deletions

View file

@ -1,3 +1,10 @@
Sun Oct 11 03:48:46 2015 Koichi Sasada <ko1@atdot.net>
* gc.c (newobj_of_slowpass): fix typo (pass -> path).
Pointed out by Yukihiro Matsumoto <matz@ruby-lang.org>.
* gc.c (newobj_of_...): `of' is unnecessary.
Sat Oct 10 19:04:42 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/socket/udpsocket.c (udp_connect, udp_bind): get open files

12
gc.c
View file

@ -1702,7 +1702,7 @@ gc_event_hook_body(rb_thread_t *th, rb_objspace_t *objspace, const rb_event_flag
} while (0)
static inline VALUE
newobj_of_init(rb_objspace_t *objspace, VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, VALUE obj, int hook_needed)
newobj_init(rb_objspace_t *objspace, VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, VALUE obj, int hook_needed)
{
if (RGENGC_CHECK_MODE > 0) assert(BUILTIN_TYPE(obj) == T_NONE);
@ -1784,10 +1784,10 @@ newobj_of_init(rb_objspace_t *objspace, VALUE klass, VALUE flags, VALUE v1, VALU
return obj;
}
NOINLINE(static VALUE newobj_of_slowpass(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, rb_objspace_t *objspace));
NOINLINE(static VALUE newobj_slowpath(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, rb_objspace_t *objspace));
static VALUE
newobj_of_slowpass(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, rb_objspace_t *objspace)
newobj_slowpath(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, rb_objspace_t *objspace)
{
VALUE obj;
@ -1806,7 +1806,7 @@ newobj_of_slowpass(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, rb_ob
}
obj = heap_get_freeobj(objspace, heap_eden);
return newobj_of_init(objspace, klass, flags, v1, v2, v3, obj, gc_event_hook_needed_p(objspace, RUBY_INTERNAL_EVENT_NEWOBJ));
return newobj_init(objspace, klass, flags, v1, v2, v3, obj, gc_event_hook_needed_p(objspace, RUBY_INTERNAL_EVENT_NEWOBJ));
}
static inline VALUE
@ -1827,10 +1827,10 @@ newobj_of(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3)
if (LIKELY(!(during_gc || ruby_gc_stressful) && gc_event_hook_needed_p(objspace, RUBY_INTERNAL_EVENT_NEWOBJ) == FALSE &&
(obj = heap_get_freeobj_head(objspace, heap_eden)) != Qfalse)) {
return newobj_of_init(objspace, klass, flags, v1, v2, v3, obj, FALSE);
return newobj_init(objspace, klass, flags, v1, v2, v3, obj, FALSE);
}
else {
return newobj_of_slowpass(klass, flags, v1, v2, v3, objspace);
return newobj_slowpath(klass, flags, v1, v2, v3, objspace);
}
}

View file

@ -1343,7 +1343,7 @@ vm_callee_setup_arg(rb_thread_t *th, struct rb_calling_info *calling, const stru
CI_SET_FASTPATH(cc,
(UNLIKELY(ci->flag & VM_CALL_TAILCALL) ? vm_call_iseq_setup_tailcall_0start :
vm_call_iseq_setup_normal_0start),
vm_call_iseq_setup_normal_0start),
(!IS_ARGS_SPLAT(ci) && !IS_ARGS_KEYWORD(ci) &&
!(METHOD_ENTRY_VISI(cc->me) == METHOD_VISI_PROTECTED)));
return 0;