Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Additional fixes and improvements of smartmatch optimizations
- Better detection of invocations, method calls wrapped into `hllize` are considered now. - Better detection of possible return value type for an AST node. - As a result of the above two items, smartmatches with method calls can now be optimized too. - For some instantiations we can now infer the final type of returned object. In some cases it may differ from the invocator's type if method `new` decides it would make sense to return something different. For example, iterators often return an `Empty` iterator if there are no elements in an iterable object. - On some occasions when smartmatch topic/LHS hapens to be a `Junction` at run-time, instead of falling back to `.ACCEPTS.Bool` on RHS to handle the junction correctly, it is possible to use a new `Junction` method `BOOLIFY-ACCEPTS` with topic/LHS as method's invocant. The method avoids extra iterations over eigenstates when possible; i.e. it shortcuts when conditions allow. - Fixed typematching sometimes not respecting junctions. - Tydied up `Regexp` safety check. Fixes #4693
- Loading branch information