Please sign in to comment.
Selectively skip compiler phases:
- In `assignUniqueSymbols` where a full traversal of the AST is done anyway, we detect the presence of certain node types to set flags for Distinct, TypeMapping / MappedScalaType, AggregateFunctionSymbol and Option operations. - Depending on these flags, the phases `createAggregates`, `expandSums`, `removeMappedTypes` and `rewriteDistinct` can be skipped entirely. - Another flag is set in `expandSums` indicating whether there is anything left to be cleaned up by `expandConditionals`, otherwise this phase is also skipped. This reduces the runtime for CompilerBenchmark by about 15%.
- Loading branch information...
Showing with 139 additions and 84 deletions.
- +57 −29 slick/src/main/scala/slick/compiler/AssignUniqueSymbols.scala
- +48 −44 slick/src/main/scala/slick/compiler/CreateAggregates.scala
- +3 −1 slick/src/main/scala/slick/compiler/CreateResultSetMapping.scala
- +4 −1 slick/src/main/scala/slick/compiler/ExpandConditionals.scala
- +25 −7 slick/src/main/scala/slick/compiler/ExpandSums.scala
- +2 −2 slick/src/main/scala/slick/compiler/RewriteDistinct.scala