Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix defined?(::Object) logic in JIT. Partial fix for #2090.
The current IR for this logic uses the runtime helper call isDefinedConstantOrMethod, which can trigger exceptions on its own (if e.g. the method lookup triggers an error?). Because of that handler, this bug in the JIT was caught and swallowed, resulting in the defined? returning nil. That is not correct behavior; only the exceptions we would expect to be raised by these lookups should be caught. In addition, I don't believe the :: form can be used to call methods (::foo doesn't parse), so the use of exception handling and isDefinedConstOrMethod may be inappropriate here.
- Loading branch information