Leonardo de Moura
e7a36f32f1
refactor: add MonadScope class
...
We are going to use it to implement the lambda lifting pass too.
2022-10-07 14:59:59 -07:00
Mario Carneiro
391aef5cd7
feat: automatic extension names
2022-10-06 17:19:30 -07:00
Leonardo de Moura
9996686690
feat: display mono phase code
2022-10-06 07:48:59 -07:00
Leonardo de Moura
87caf6d38a
fix: bug at toMonoType
2022-10-06 07:41:36 -07:00
Leonardo de Moura
acd2836cb5
feat: add saveMono pass to normalize mono phase free variable ids
...
Motivation: control .olean size
2022-10-06 07:24:30 -07:00
Leonardo de Moura
d9fcfd71d9
fix: missing test
2022-10-06 07:18:27 -07:00
Leonardo de Moura
73ee2d92aa
fix: constructor parameter validation for mono phase
2022-10-06 06:57:06 -07:00
Leonardo de Moura
faa30bccb2
feat: activate toMono compiler pass
...
It increases the .olean sizes.
2022-10-06 06:23:08 -07:00
Leonardo de Moura
80bf4f3334
fix: erase type (and type former) parameters occurrences at toMono
2022-10-06 06:23:08 -07:00
Leonardo de Moura
23182882d4
fix: erase universe levels at toMono
2022-10-06 06:23:08 -07:00
Leonardo de Moura
d409ad75b5
fix: bug at trivialStructToMono
2022-10-06 06:23:08 -07:00
Leonardo de Moura
08bfb7060d
feat: add support for trivial structures, Decidable, and constructors at toMono
2022-10-06 05:33:13 -07:00
Leonardo de Moura
a0894dedbb
feat: add phaseOut field to Pass
...
We need it for passes that move the code from one phase to another.
See `toMono` pass.
cc @hargoniX
2022-10-06 03:29:21 -07:00
Leonardo de Moura
b172ba8a34
feat: add toMono pass
...
It has to activate by default yet.
2022-10-05 10:39:41 -07:00
Leonardo de Moura
e64e877e8f
feat: add Decl.toMono skeleton
2022-10-05 10:33:01 -07:00
Leonardo de Moura
9f76da2b7f
feat: add env extension for the mono phase
2022-10-05 10:31:52 -07:00
Leonardo de Moura
c6b3ebdd85
feat: detect trivial structures and add extension for storing mono phase types
2022-10-05 08:55:44 -07:00
Leonardo de Moura
00f6f83379
refactor: add BaseTypes.lean
2022-10-05 07:27:39 -07:00
Leonardo de Moura
913ca41129
refactor: merge lcAny and lcErased
...
`lcErased` is a superset of `lcAny` anyway, and we didn't find ways of
using the distinction to generate better code.
2022-10-05 04:46:52 -07:00
Leonardo de Moura
ebdbdc1043
chore: temporarily disable extendJoinPointContext
...
see #1686
2022-10-04 17:41:41 -07:00
Leonardo de Moura
adeab12beb
feat: add support for Iff.rec and Iff.casesOn to new code generator
...
closes #1684
2022-10-04 06:32:49 -07:00
Sebastian Ullrich
8ed831101e
chore: benchmark new compiler
2022-10-04 05:03:54 -07:00
Leonardo de Moura
c4db085ac1
fix: missing dependency check at simpJpCases?
2022-10-03 19:39:10 -07:00
Leonardo de Moura
b3aff375f0
feat: add CodeDecl.dependsOn
2022-10-03 19:36:26 -07:00
Leonardo de Moura
da4812659c
feat: use DiscrM to implement simpJpCases?
2022-10-03 19:13:31 -07:00
Leonardo de Moura
ddbf4c01eb
refactor: add DiscrM.lean
2022-10-03 19:00:30 -07:00
Leonardo de Moura
f0be5439e6
feat: JpCases for join points with multiple parameters
2022-10-03 18:35:16 -07:00
Henrik Böving
eaab29712d
feat: extend join point context pass
2022-10-03 17:03:22 -07:00
Leonardo de Moura
fed7ff27e8
fix: issue reported on Zulip
...
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Annoying.20LCNF.20errors/near/302056742
2022-10-03 09:51:32 -07:00
Leonardo de Moura
dc6f635f41
refactor: add LCNF/Internalize.lean
2022-10-03 09:18:11 -07:00
Leonardo de Moura
31d59e337b
fix: LCNF any type issue
...
This fixes an issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Annoying.20LCNF.20errors/near/301935406
2022-10-02 08:09:13 -07:00
Leonardo de Moura
190a1331bd
feat: add toMonoType
2022-10-01 20:44:31 -07:00
Leonardo de Moura
1ce9e30403
refactor: extension for storing LCNF types for declarations that do not have code associated with them
2022-10-01 20:44:31 -07:00
Leonardo de Moura
15909f209f
feat: inline small declarations not tagged with [noinline]
2022-09-30 20:51:37 -07:00
Leonardo de Moura
72506c81ea
chore: trace.Compiler.simp.inline
2022-09-30 20:21:34 -07:00
Leonardo de Moura
18b5ff9e78
chore: propagate recursive flag during code specialization
2022-09-30 20:01:18 -07:00
Leonardo de Moura
9fda3d973d
feat: add trace option trace.Compiler.saveBase
2022-09-30 19:50:33 -07:00
Leonardo de Moura
0e18b4318c
feat: online inline recursive functions if they are tagged with [inlineIfReduce]
2022-09-30 19:39:12 -07:00
Leonardo de Moura
4c2c6931f4
feat: add flag at LCNF Decl indicating whether the original Lean declaration was declared using partial or unsafe
2022-09-30 19:28:05 -07:00
Leonardo de Moura
fb1a603e60
feat: add another CSE pass before saveBase
2022-09-29 18:56:20 -07:00
Leonardo de Moura
595734b936
chore: remove workaround
...
It is now implemented at `Quote (Array _)`
2022-09-29 17:12:48 -07:00
Leonardo de Moura
b4454902c1
feat: LCNF Code.forEachExpr and Decl.forEachExpr
2022-09-29 15:50:49 -07:00
Leonardo de Moura
13edf0e9cc
feat: add forEachModuleDecl and forEachMainModuleDecl
2022-09-29 14:16:10 -07:00
Leonardo de Moura
bb1e94de82
feat: normalize free variable ids before saving LCNF code in the environment
2022-09-29 12:48:21 -07:00
Leonardo de Moura
8cca2ea24e
fix: refresh LCNF parameter binder names
2022-09-29 12:46:53 -07:00
Leonardo de Moura
e5494e7a49
fix: eta-expansion at compatibleTypes
...
It fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Annoying.20LCNF.20errors/near/301424293
2022-09-29 11:02:06 -07:00
Leonardo de Moura
5c925f9345
feat: add functions to create small arrays and use them in the constant folder
...
It reduces the code generated for functions using a bunch
of quotations. For example, the size of
`Lean.Elab.Term.Do.ToTerm.matchNestedTermResult` went from 2348 to 1507
2022-09-28 22:00:50 -07:00
Leonardo de Moura
6bc6522d86
feat: constructor => discriminant optimization
2022-09-28 21:14:19 -07:00
Leonardo de Moura
73ebaf8499
feat: improve visitLambda at toLCNF
2022-09-28 19:17:28 -07:00
Leonardo de Moura
94c2ec38d5
feat: implement cast TODO
...
fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Annoying.20LCNF.20errors/near/301269857
2022-09-28 15:40:53 -07:00