diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-08-02 23:25:38 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2019-08-02 23:25:38 +0900 |
commit | 086ffe72c711179c30a773027e0b4113e908d399 (patch) | |
tree | 1ed14b8037dfe0f60d858ec5a1fa019bd1e592dc /insns.def | |
parent | e9e17cbc051e894dfd27eda5feca2939f65552db (diff) |
Revert "Revert "Add a specialized instruction for `.nil?` calls""
This reverts commit a0980f2446c0db735b8ffeb37e241370c458a626.
Retry for macOS Mojave.
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -808,6 +808,20 @@ opt_str_freeze } } +/* optimized nil? */ +DEFINE_INSN +opt_nil_p +(CALL_INFO ci, CALL_CACHE cc) +(VALUE recv) +(VALUE val) +{ + val = vm_opt_nil_p(ci, cc, recv); + + if (val == Qundef) { + CALL_SIMPLE_METHOD(); + } +} + DEFINE_INSN opt_str_uminus (VALUE str, CALL_INFO ci, CALL_CACHE cc) |