Sebastian Ullrich
e7bf1cd3dc
refactor: simplify adaptUncacheableContextFn
...
compiler.ir.result reports 0 allocations on happy path
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
fb941d0827
fix: ensure parser caching is sound re. syntax stack accesses
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
12b267bd8c
refactor: categoryParserOfStack is dead
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
17782fba1a
fix: replace broken ptrEq cache sanity checks with private ParserContext constructor
...
The context is now manipulated using `adaptCacheableContext` and `adaptUncacheableContext`
and created using `ParserFn.run`.
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
d5255e94e8
perf: improve dynamicQuot caching
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
d3f7d0350f
refactor: move parser types into separate file
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
9a4626c495
fix: must cache stack of parser evals
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
36189cb51a
chore: simplify parser cache key computation, panic on environment/token table divergence
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
ed03ff9d00
perf: cache leading_parser and syntax as well
...
We better hope the `leading_parser`s are closed terms
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
da6efe1bca
fix: make parser caching sound (I hope?)
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
35509b5e98
refactor: more sensible ordering of declarations in Lean.Parser.Basic
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
246923886a
fix: do not create choice nodes for failed parses
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
57320712f0
fix: extraneous missing items on parser stack
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
7e193a45ce
perf: cache category parses
2022-11-11 09:13:02 +01:00
Leonardo de Moura
8030aed56e
fix: fixes #1814
...
Missing `hasAssignableMVar` checks.
2022-11-10 20:42:02 -08:00
Leonardo de Moura
c147059fd7
fix: fixes #1812
2022-11-10 08:58:09 -08:00
Leonardo de Moura
9b02f982e2
chore: add ppCode'
2022-11-10 08:07:35 -08:00
Leonardo de Moura
2386c401d2
chore: use String.get' and String.next' at Parser/Basic.lean
...
This commit also cleans up old frontend legacy.
2022-11-09 17:06:22 -08:00
Leonardo de Moura
1704debcd0
perf: add parseImports'
...
Faster version of `parserImports` for Lake
2022-11-09 14:50:11 -08:00
Leonardo de Moura
69bd25af4f
chore: add Repr and Inhabited instances for Import
2022-11-09 14:35:57 -08:00
Adrien Champion
5849fdc6c9
feat: require strict indentation on nested by-s
2022-11-08 08:30:42 -08:00
Mario Carneiro
4bf89dfa12
feat: allow doSeq in let x <- e | seq
...
fixes #1804
2022-11-08 08:29:21 -08:00
Leonardo de Moura
b4d13a8946
refactor: LetExpr => LetValue
...
We use "let value" in many other places in the code base.
2022-11-07 18:51:07 -08:00
Leonardo de Moura
e8b4a8875c
fix: type argument that is a fvar at FixedParams.lean
2022-11-07 18:18:07 -08:00
Leonardo de Moura
9399164201
fix: simpCasesOnCtor?
2022-11-07 18:18:06 -08:00
Leonardo de Moura
a5dadfdb7a
feat: activate all passes
2022-11-07 16:18:36 -08:00
Leonardo de Moura
828a815821
fix: simpAppApp?
2022-11-07 16:18:36 -08:00
Leonardo de Moura
92faeec832
fix: add Simp.findFunDecl'?
...
It may look like a simple optimization but affects the inlining
heuristics. Example:
```
fun f ... := ...
let x_1 := f
let x_2 := x_1 a
let x_3 := x_1 b
...
```
Before this commit, `f` was not being marked as being used multiple times.
2022-11-07 16:18:36 -08:00
Leonardo de Moura
f342d0ea35
fix: avoid unnecessary whitespace at LCNF pretty printer
2022-11-07 16:18:36 -08:00
Leonardo de Moura
cf13b29760
fix: nasty bug due to #1804
2022-11-07 16:18:36 -08:00
Leonardo de Moura
c5584581ce
fix: inferType for Code.jmp
2022-11-07 16:18:36 -08:00
Leonardo de Moura
0cfdf285e3
chore: remove unnecessary auxiliary declaration
2022-11-07 16:18:36 -08:00
Leonardo de Moura
46d83f2d80
fix: unnecessary paren at ppArg
2022-11-07 16:18:36 -08:00
Leonardo de Moura
3a818ed6ae
fix: broken cache at toLCNF
2022-11-07 16:18:36 -08:00
Leonardo de Moura
390d4b28f2
chore: disable most LCNF passes to be able to use update-stage0
...
We cannot effectively test without an `update-stage0` since the LCNF
representation is different and incompatible with the one in the
.olean files.
One of the passes is not terminating (probably `simp`) when compiling
stage2.
2022-11-07 16:18:36 -08:00
Leonardo de Moura
623e8cddf6
fix: ReduceArity.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
2e8150e50d
chore: port Check.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
ea8e7d5c99
chore: port ReduceArity.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
a71c438838
chore: port ToMono.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
9647f003c5
chore: port Specialize.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
beb923c79f
chore: anyFVar and allFVar
2022-11-07 16:18:36 -08:00
Leonardo de Moura
eaade5abde
chore: port LambdaLifting.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
0e85d9aa34
chore: re-activate Simp.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
1e3c7d2b4e
fix: Simp/Main.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
db44a3a3f3
fix: JpCases.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
2328cf2fb4
feat: add ppLetExpr
2022-11-07 16:18:36 -08:00
Leonardo de Moura
a19e8fc526
chore: port Simp/Main.lean
2022-11-07 16:18:36 -08:00
Henrik Böving
c5a99bda2b
chore: port join point optimizations to LetExpr
2022-11-07 16:18:36 -08:00
Henrik Böving
695f972ff2
chore: migrate Compiler Probing to LetExpr
2022-11-07 16:18:36 -08:00
Henrik Böving
963cd8d175
chore: port FloatLetIn to LetExpr
2022-11-07 16:18:36 -08:00