Commit c6d297b
committed
Refactor Inliner
Inliner has become a bit of a ball of mud. It was over 2000 lines and handled several aspects that
did not have clear boundaries. This commit refactors Inliner into three units in a new package `inlines`.
They are:
- Inlines.scala: The frontend for querying inline methods and issuing inline calls.
- Inliner.scala: This unit does the main job of inlining. It transforms a call with
a given right hand side into a list of bindings and an expansion.
- InlineReducer.scala: A helper class used by Inliner that does rewriting of inlined code
with the aim of optimizing it.
The three units are joined by `PrepareInlineable` in package `inlines`.1 parent 65a86ae commit c6d297b
File tree
23 files changed
+2010
-1953
lines changed- compiler/src/dotty/tools/dotc
- ast
- core
- tasty
- inlines
- sbt
- transform
- typer
23 files changed
+2010
-1953
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
999 | 999 | | |
1000 | 1000 | | |
1001 | 1001 | | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
1002 | 1014 | | |
1003 | 1015 | | |
1004 | 1016 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
830 | 830 | | |
831 | 831 | | |
832 | 832 | | |
833 | | - | |
| 833 | + | |
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
| |||
0 commit comments