Commit graph

14790 commits

Author SHA1 Message Date
Sebastian Ullrich
76ea8169bc feat(library/init/lean/expander): prefix ~> notation macro: construct RHS, move to new module 2018-09-24 09:53:28 -07:00
Sebastian Ullrich
f0a983fe30 fix(frontends/lean/pp): function with implicits in structure instance 2018-09-24 09:53:28 -07:00
Sebastian Ullrich
9a0b1c7a7f feat(library/init/lean/parser/basic): allow views to specify default value used with opt_param when nested in other views 2018-09-24 09:53:28 -07:00
Leonardo de Moura
07f96e8e09 feat(library/compiler): move let-decls that are used in only one minor to it 2018-09-23 19:27:06 -07:00
Leonardo de Moura
b9e2b4ad9f chore(library/compiler/cse): add "todo" 2018-09-23 19:27:06 -07:00
Leonardo de Moura
783b063535 chore(library/compiler/csimp): check arity
It is still commented since we need to handle `cases_on` first.
2018-09-23 19:27:06 -07:00
Leonardo de Moura
6e9e9c0012 feat(library/compiler): eta expand definitions 2018-09-23 19:27:06 -07:00
Leonardo de Moura
a31f12d8cd chore(library/init/core): revert ite+thunks modification
We don't need it since we marked `ite` as `[macro_inline]`
2018-09-23 19:27:06 -07:00
Leonardo de Moura
ad82ad69ec feat(library/init/core): cleanup bor and band 2018-09-23 19:27:06 -07:00
Leonardo de Moura
dd046b0e0a feat(library/init/core): mark id_rhs as [macro_inline] 2018-09-23 19:27:06 -07:00
Leonardo de Moura
c75db3bfc6 feat(library/compiler): unfold [macro_definition] before LCNF/ANF conversion 2018-09-23 19:27:06 -07:00
Leonardo de Moura
d43f9627c2 feat(library/init/core): use [macro_inline] to get shortcircuit semantics in new compiler stack 2018-09-23 19:27:06 -07:00
Leonardo de Moura
3473822c01 feat(library/compiler/inliner): add [macro_inline] attribute
For the old compiler stack, it behaves like `[inline]`.
For the new compiler stack, it instructs the compiler to inline
definitions before LCNF/ANF conversion.
2018-09-23 19:27:06 -07:00
Sebastian Ullrich
41c0bc87fd refactor(library/init/lean/parser): make views shallow via tysyntax 2018-09-22 21:24:38 -07:00
Leonardo de Moura
57af24ee82 fix(library/compiler/csimp): bugs when using beta_reduce, and is_let_val propagation 2018-09-22 05:08:06 -07:00
Leonardo de Moura
4a7cc94944 feat(library/compiler/csimp): remove unnecessary trivial let-decls 2018-09-21 15:10:07 -07:00
Leonardo de Moura
b6169d7077 feat(library/compiler/csimp): preparing for new design 2018-09-21 14:10:56 -07:00
Leonardo de Moura
7cfd3b4129 feat(library/compiler/lcnf): modify lcnf format
We should not require the body of a let-decl to be atomic.
2018-09-21 10:59:46 -07:00
Leonardo de Moura
097aa7ef14 chore(library/compiler): cleanup cce 2018-09-21 10:25:35 -07:00
Leonardo de Moura
ff2e28e557 feat(library/compiler): add cce: common case elimination 2018-09-20 21:38:57 -07:00
Leonardo de Moura
1534f17a89 feat(library/compiler/lcnf): add better support for complete-transition used in the equation compiler and x@ patterns 2018-09-20 21:38:57 -07:00
Leonardo de Moura
f556e0947b fix(library/compiler/lcnf): bug, minor premise must have a lambda for each field in LCNF 2018-09-20 21:38:57 -07:00
Sebastian Ullrich
896b45239e feat(library/module_mgr,shell/lean): abort on import with errors 2018-09-20 15:46:47 -07:00
Sebastian Ullrich
f21609c93d chore(CMakeLists): relwithdebinfo build: disable assertions, frame pointer
(We don't really have any method for setting those just locally)
2018-09-20 15:46:47 -07:00
Leonardo de Moura
79c8e37cdf fix(library/compiler/csimp): incorrect assertions 2018-09-20 15:33:57 -07:00
Leonardo de Moura
e55b65ad78 chore(library/compiler/lcnf): make it clear when we create the let-expr 2018-09-20 15:33:57 -07:00
Leonardo de Moura
0ee6d80b3c feat(library/compiler/preprocess): add mode for llvm-profdata 2018-09-20 15:33:57 -07:00
Sebastian Ullrich
15d11cc483 feat(library/module_mgr): profile .olean serialization/deserialization 2018-09-20 13:54:17 -07:00
Leonardo de Moura
1efdd1a65d feat(library/compiler/csimp): improve inliner 2018-09-20 12:05:49 -07:00
Leonardo de Moura
8d4f7bb8ec feat(util/timeit): add simpler type for threshold 2018-09-20 12:05:48 -07:00
Leonardo de Moura
0ff1f16bf0 feat(frontends/lean/pp): add pp.compact_let option
It helps to debug the new compiler stack.
2018-09-20 12:05:48 -07:00
Sebastian Ullrich
65ddca1510 perf(library/init/lean/parser/syntax): avoid quadratic behavior in update_leading 2018-09-20 09:40:21 -07:00
Sebastian Ullrich
b859560a83 feat(library/init/lean/parser/term): @/@@ notation 2018-09-20 09:40:21 -07:00
Sebastian Ullrich
0a8d0a6870 feat(library/init/lean/parser/term): projection notation 2018-09-20 09:40:21 -07:00
Sebastian Ullrich
b8bd0cc5e6 feat(library/init/lean/parser/term): parentheses and tuples 2018-09-20 09:40:21 -07:00
Sebastian Ullrich
d7d968cead feat(library/init/lean/parser/basic): merge explicit and default (0) token precedences 2018-09-20 09:40:21 -07:00
Sebastian Ullrich
6f68a0d1eb feat(library/init/lean/parser/basic): check for conflicting tokens 2018-09-20 09:40:21 -07:00
Sebastian Ullrich
64a5d0f240 refactor(library/init/lean/parser): has_tokens default 2018-09-20 09:38:10 -07:00
Sebastian Ullrich
c7c459d47b Revert "perf(library/init/lean/parser): collect tokens in trie instead of list, do not inline"
This reverts commit e4c50b2b09.

Lists are efficient enough and make it easier to customize the trie construction.

Keep the `donotinline` though.
2018-09-20 09:38:10 -07:00
Sebastian Ullrich
b7f7f257c5 feat(library/init/lean/parser/declaration): inductive, structure 2018-09-20 09:38:10 -07:00
Leonardo de Moura
f640b1bbac feat(library/init/lean/ir/extract_cpp): missing inlines 2018-09-20 08:39:25 -07:00
Leonardo de Moura
38c9a2d28a feat(library/compiler/csimp): do not invoke reduce_cases_cases until we implement it 2018-09-20 08:39:25 -07:00
Leonardo de Moura
a3a8165388 feat(library/init/control/monad): provide seq_right default implementation for monad
It was using the `seq_right` from `applicative` which is
```
(seq_right := λ α β a b, const α id <$> a <*> b)
```
and horrible code was being generated.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2018-09-20 08:39:25 -07:00
Leonardo de Moura
5ff9e24b17 feat(library/init/control): do not use unnecessary structures
It confuses the compiler.
2018-09-20 08:39:25 -07:00
Leonardo de Moura
28877282ce fix(library/init/function): missing @[inline] 2018-09-20 08:39:25 -07:00
Leonardo de Moura
d3f4b8198b fix(library/compiler/csimp): disable problematic optimization 2018-09-20 08:39:25 -07:00
Leonardo de Moura
94f01c90fd feat(library/compiler/csimp): process lambda's lazily and combine dead-let-elimination 2018-09-20 08:39:25 -07:00
Sebastian Ullrich
623a6603cb feat(library/init/lean/parser/term): lambda, pi, arrow 2018-09-19 12:36:34 -07:00
Sebastian Ullrich
e4c50b2b09 perf(library/init/lean/parser): collect tokens in trie instead of list, do not inline 2018-09-19 12:36:34 -07:00
Sebastian Ullrich
fc97c63c72 fix(library/derive_attribute): vm_compile synthesized instances 2018-09-19 12:36:34 -07:00