aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-08-02 15:03:34 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-08-02 15:03:34 +0900
commita0980f2446c0db735b8ffeb37e241370c458a626 (patch)
treeff8b0696ccec1e081117963f9e77cdbfab2fd756 /vm_insnhelper.c
parent19006b711d8649b69d6f9dafad073a2f57201dd7 (diff)
downloadruby-a0980f2446c0db735b8ffeb37e241370c458a626.tar.gz
Revert "Add a specialized instruction for `.nil?` calls"
This reverts commit 9faef3113fb4331524b81ba73005ba13fa0ef6c6. It seemed to cause a failure on macOS Mojave, though I'm unsure how. https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1014/ruby-master/log/20190802T034503Z.fail.html.gz This tentative revert is to check if the issue is actually caused by the change or not.
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 1875d35de1..57f6d91e88 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -4228,26 +4228,6 @@ vm_opt_empty_p(VALUE recv)
}
}
-VALUE rb_false(VALUE obj);
-
-static VALUE
-vm_opt_nil_p(CALL_INFO ci, CALL_CACHE cc, VALUE recv)
-{
- if (recv == Qnil) {
- if (BASIC_OP_UNREDEFINED_P(BOP_NIL_P, NIL_REDEFINED_OP_FLAG)) {
- return Qtrue;
- } else {
- return Qundef;
- }
- } else {
- if (vm_method_cfunc_is(ci, cc, recv, rb_false)) {
- return Qfalse;
- } else {
- return Qundef;
- }
- }
-}
-
static VALUE
fix_succ(VALUE x)
{