dotty.tools.dotc.transform.PatternMatcher.Translator.OptimizedCodegen
Inline runOrElse and get rid of Option allocations
Inline runOrElse and get rid of Option allocations
runOrElse(scrut: scrutTp)(matcher): resTp = matcher(scrut) getOrElse ${catchAll(scrut
)}
the matcher's optional result is encoded as a flag, keepGoing, where keepGoing == true encodes result.isEmpty,
if keepGoing is false, the result Some(x) of the naive translation is encoded as matchRes == x