Module: Axiom::Optimizer::Function::Predicate::Comparable::NeverComparable
- Defined in:
- lib/axiom/optimizer/function/predicate/comparable.rb
Overview
Optimize when the operands will never be comparable
Instance Method Summary collapse
-
#optimizable? ⇒ Boolean
private
Test if the operands will never be comparable.
Instance Method Details
#optimizable? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Test if the operands will never be comparable
101 102 103 104 105 106 107 108 |
# File 'lib/axiom/optimizer/function/predicate/comparable.rb', line 101 def optimizable? util = Util if util.constant?(left) then left_invalid_constant? elsif util.constant?(right) then right_invalid_constant? else !comparable? end end |