mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_insnhelper.c (vm_env_cref): make it inline for performance.
* vm_insnhelper.c (rb_vm_get_cref): use NULL instead of 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8da9e6d549
commit
15d735de15
2 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
Fri Oct 30 06:43:50 2015 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm_insnhelper.c (vm_env_cref): make it inline for performance.
|
||||
|
||||
* vm_insnhelper.c (rb_vm_get_cref): use NULL instead of 0.
|
||||
|
||||
Fri Oct 30 06:20:40 2015 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* insns.def: nobody set ic->ic_value.value to Qundef.
|
||||
|
|
|
@ -448,7 +448,7 @@ check_cref(VALUE obj, int can_be_svar)
|
|||
}
|
||||
}
|
||||
|
||||
static rb_cref_t *
|
||||
static inline rb_cref_t *
|
||||
vm_env_cref(const VALUE *ep)
|
||||
{
|
||||
rb_cref_t *cref;
|
||||
|
@ -492,11 +492,12 @@ rb_vm_get_cref(const VALUE *ep)
|
|||
{
|
||||
rb_cref_t *cref = vm_env_cref(ep);
|
||||
|
||||
if (cref == 0) {
|
||||
if (cref != NULL) {
|
||||
return cref;
|
||||
}
|
||||
else {
|
||||
rb_bug("rb_vm_get_cref: unreachable");
|
||||
}
|
||||
|
||||
return cref;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Reference in a new issue