Commit graph

576 commits

Author SHA1 Message Date
Leonardo de Moura
cf313d2101 chore: improve eqvTypes 2022-10-09 16:42:55 -07:00
Leonardo de Moura
43fe67c41a chore: helper pass for debugging purposes 2022-10-09 16:41:54 -07:00
Leonardo de Moura
9feb4d8ab7 fix: do not generate code for [extern] functions 2022-10-09 15:35:29 -07:00
Leonardo de Moura
11fcdb7bf4 feat: add cast at exit points if necessary when inlining code 2022-10-09 13:01:10 -07:00
Leonardo de Moura
ef2d17120c chore: fix note 2022-10-09 12:25:45 -07:00
Leonardo de Moura
cc09afc5e1 fix: type error introducing when inlining LCNF functions
This issue has been reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Annoying.20LCNF.20errors/near/303142516
2022-10-09 12:10:11 -07:00
Leonardo de Moura
f61ec4929f chore: add low-level normExprCore 2022-10-09 12:10:11 -07:00
Leonardo de Moura
e81673366a chore: remove leftover 2022-10-09 12:10:11 -07:00
Leonardo de Moura
613c8027d7 fix: missing instantiateParamsLevelParams 2022-10-09 12:10:11 -07:00
Leonardo de Moura
827ef94486 feat: add eqvTypes 2022-10-09 12:10:11 -07:00
Leonardo de Moura
c14d07fe2e feat: include def/fun/jp resulting type in the LCNF pretty printer 2022-10-09 12:10:11 -07:00
Leonardo de Moura
eeb98d9cf4 refactor: rename FixedArgs => FixedParams 2022-10-09 12:10:11 -07:00
Leonardo de Moura
37a61568bc feat: improve fixed parameter analyzer 2022-10-09 12:10:11 -07:00
Leonardo de Moura
8e6cb25cbf chore: temporarily disable eager lambda lifting
We need a better heuristic for deciding which functions in instances
should be eagerly lambda lifted. Otherwise, it will have to keep
chasing which instances we have to annotate with `[inline]`.
2022-10-08 19:51:19 -07:00
Leonardo de Moura
1148392f45 fix: Closure.lean 2022-10-08 19:51:19 -07:00
Leonardo de Moura
2efb1dbdf1 doc: lambda lifting 2022-10-08 19:51:19 -07:00
Leonardo de Moura
b7d4fd03a3 feat: eager lambda lifting 2022-10-08 19:51:19 -07:00
Leonardo de Moura
878e72b2f9 feat: lambda lifting 2022-10-08 19:51:19 -07:00
Leonardo de Moura
3c90b2fd3e feat: add Decl.save 2022-10-08 19:51:19 -07:00
Leonardo de Moura
79683c4bf6 chore: missing imports 2022-10-07 18:11:19 -07:00
Leonardo de Moura
45974229d2 feat: reactivate extendJoinPointContext at mono phase
closes #1686

cc @hargoniX
2022-10-07 16:27:44 -07:00
Leonardo de Moura
9eb641e7da feat: reuse specialized functions between different compilation units 2022-10-07 16:07:17 -07:00
Leonardo de Moura
f11e44910b refactor: add Closure.lean
This module will also be used by the lambda lifter.
2022-10-07 15:56:10 -07:00
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