summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-26 02:38:45 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-26 02:38:45 (GMT)
commit6e62e59eec1de52626c9a62d7145ac07ad4c95f5 (patch)
treef686c32b15c016111cfbf3f2e11b23b1d52c47be /vm_insnhelper.c
parentfa3d1ca0f4c29c0f740233ebd5bcdc9d2ddc24d5 (diff)
revert r64847, r64846 and r64839
because r64849 seems to fix issues which we were confused about. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 29b9358..29e6545 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -3653,6 +3653,30 @@ vm_opt_ltlt(VALUE recv, VALUE obj)
}
static VALUE
+vm_opt_and(VALUE recv, VALUE obj)
+{
+ if (FIXNUM_2_P(recv, obj) &&
+ BASIC_OP_UNREDEFINED_P(BOP_AND, INTEGER_REDEFINED_OP_FLAG)) {
+ return LONG2NUM(FIX2LONG(recv) & FIX2LONG(obj));
+ }
+ else {
+ return Qundef;
+ }
+}
+
+static VALUE
+vm_opt_or(VALUE recv, VALUE obj)
+{
+ if (FIXNUM_2_P(recv, obj) &&
+ BASIC_OP_UNREDEFINED_P(BOP_OR, INTEGER_REDEFINED_OP_FLAG)) {
+ return LONG2NUM(FIX2LONG(recv) | FIX2LONG(obj));
+ }
+ else {
+ return Qundef;
+ }
+}
+
+static VALUE
vm_opt_aref(VALUE recv, VALUE obj)
{
if (SPECIAL_CONST_P(recv)) {