summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-10 16:54:47 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-10 16:54:47 (GMT)
commitaea14e68fb32af5323a52676f760938794080ba0 (patch)
treeba3749046e859a91710c9d1ae584e96c9659a30a /insns.def
parent7b6f0478e3f2606583b61c2ccb8f3ddebc93f4bb (diff)
insns.def: cache nil const
* insns.def (getinlinecache): Qnil is a valid value as a constant. this can be observable when accessing a deprecated constant which is nil. non-nil constant is warned just once for each location, but every time if it is nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def7
1 files changed, 5 insertions, 2 deletions
diff --git a/insns.def b/insns.def
index fb5e83c..2c1f7d3 100644
--- a/insns.def
+++ b/insns.def
@@ -951,10 +951,13 @@ getinlinecache
()
(VALUE val)
{
- val = vm_ic_hit_p(ic, GET_EP());
- if (val != Qnil) {
+ if (vm_ic_hit_p(ic, GET_EP())) {
+ val = ic->ic_value.value;
JUMP(dst);
}
+ else {
+ val = Qnil;
+ }
}
/* set inline cache */