Project

General

Profile

« Previous | Next » 

Revision 936ee555

Added by alanwu (Alan Wu) about 4 years ago

Improve opt_not by expanding cfunc codegen

This commit improves opt_not by making it correct when TrueClass#!
and/or FalseClass#! is defined and genearting better code when the
receiver is a heap object.

guard_known_class() can now handle true, false, and nil, and we
introduce a codegen function reimplementing rb_obj_not(), used when we
know we are calling into rb_obj_not().

Co-authored-by: Maxime Chevalier-Boisvert
Co-authored-by: Noah Gibbs