Commit graph

6068 commits

Author SHA1 Message Date
Sebastian Ullrich
c59f7a55cf fix: initialize precompiled modules 2022-01-20 18:55:57 +01:00
Gabriel Ebner
ab276a5ae3 chore: show declaration with sorry in #eval 2022-01-17 13:18:22 -08:00
Leonardo de Moura
999e125e3f feat: mark arguments such as {_ : BEq α} as specialization target
We want to specialize functions such as
```
def find? {_ : BEq α} {_ : Hashable α} : PersistentHashMap α β → α → Option β
  | { root := n, .. }, k => findAux n (hash k |>.toUSize) k
```
2022-01-17 13:05:50 -08:00
Leonardo de Moura
6ea0aaf35a fix: do not invoke add_extern for declarations marked with implementedBy 2022-01-14 20:27:50 -08:00
Leonardo de Moura
9499cea2a5 fix: bug at skip_code_generation 2022-01-14 19:58:24 -08:00
Leonardo de Moura
b22a3a4cc4 feat: skip code generation for declarations marked with implementedBy, init, and builtinInit
This is a bit hackish. We should clean up when we rewrite the compiler
in Lean.
2022-01-14 19:20:16 -08:00
Gabriel Ebner
e605c541d0 fix: do not infer type in erase_irrelevant
At the time erase_irrelevant is called, we have already eliminated the
`cast`-applications.  Therefore non-atomic expressions may no longer
be well-typed (and `infer_type` can fail).
2022-01-03 07:13:55 -08:00
Sebastian Ullrich
292fb257a7 perf: do not specialize Prop typeclasses 2021-12-22 17:48:11 -08:00
Sebastian Ullrich
399ad64854 perf: do not specialize Inhabited 2021-12-22 17:48:11 -08:00
Sebastian Ullrich
45e8d9af43 feat: support [nospecialize] on typeclasses 2021-12-22 17:48:11 -08:00
Sebastian Ullrich
fdd939fc40 fix: accidental memory leak in last commit 2021-12-21 19:43:02 +01:00
Sebastian Ullrich
3318f1fb05 feat: record declaration name in interpretation profile 2021-12-21 19:04:58 +01:00
Gabriel Ebner
e65f3fe810 fix: use redirected stderr for tout() 2021-12-16 10:23:05 -08:00
Joshua Seaton
a9317760e7
chore: update IR interpreter enum hygiene
This change addresses -Wreturn type and -Wimplicit-fallthrough
infractions in the IR interpreter. Moreover, default switch cases on
enum classes are removed to leverage compiler complaints of missing
cases, which ensures that all related switch logic gets thoughtfully
extended when the enums are extended themselves.
2021-11-28 10:29:08 +01:00
Leonardo de Moura
50ac21d0a6 refactor: move is_constructor_app to inductive.cpp 2021-11-25 11:31:00 -08:00
Leonardo de Moura
e22bffa94f refactor: move is_structure_like to inductive.cpp 2021-11-25 11:31:00 -08:00
Sebastian Ullrich
5a65189894 chore: use empty string for --githash instead of weird "GITDIR-NOTFOUND" when not building from commit 2021-11-04 15:29:48 -07:00
Leonardo de Moura
352391bfcb chore: remove mpz_get_d dependency 2021-10-26 12:40:20 -07:00
Leonardo de Moura
80a73dd903 feat: basic support for definitions at inductive declarations 2021-10-25 12:44:35 -07:00
Leonardo de Moura
81729d96f9 fix: make sure Quot primitives stay in eta expanded form
fixes #716
2021-10-08 09:36:06 -07:00
Leonardo de Moura
305d035f17 chore: use lean_always_assert at erase_irrelevant.cpp
The performance impact should be insignificant, and it should help
debugging issue https://github.com/leanprover/lean4/issues/716
2021-10-07 07:44:56 -07:00
Leonardo de Moura
28d81ee456 fix: do not extract closed terms containing constants being defined
It may produce crashes during initialization.
2021-09-30 12:46:38 -07:00
Sebastian Ullrich
b13d3e6ca5 fix: dllexport functions not already annotated in header 2021-09-20 18:41:46 +02:00
Leonardo de Moura
3fa54e604d fix: inductive type name is not a necessarily a prefix of the constructor name in Lean 4 anymore 2021-09-14 18:52:43 -07:00
Leonardo de Moura
96d00ff2d7 fix: fixes #664 2021-09-12 19:54:45 -07:00
Leonardo de Moura
e6f02b7b1a fix: workaround for inlining heuristic 2021-09-11 14:05:29 -07:00
Leonardo de Moura
6b235b05d2 feat: avoid code generation after stage1 for match auxiliary functions 2021-09-11 13:41:38 -07:00
Leonardo de Moura
c8406a301d chore: reduce src/include/lean 2021-09-07 08:24:54 -07:00
Leonardo de Moura
fc334ffbee fix: pattern matching on UInt 2021-09-05 19:15:59 -07:00
Leonardo de Moura
152572386b chore: fix comment 2021-08-27 10:43:51 -07:00
Leonardo de Moura
6713d8777a fix: work duplication bug at specialize.cpp
closes #646
2021-08-27 10:35:27 -07:00
Leonardo de Moura
6cfdfe9942 feat: apply csimp attribute constant replacements 2021-08-21 12:22:15 -07:00
Sebastian Ullrich
5f4b1b1d44 Revert "Revert "feat: reintroduce libleanshared, link lean & leanpkg against it""
This reverts commit ccbc9d00db.
2021-08-20 09:42:05 -07:00
Sebastian Ullrich
ccbc9d00db Revert "feat: reintroduce libleanshared, link lean & leanpkg against it" 2021-08-20 15:39:00 +02:00
Sebastian Ullrich
58d6f3b817 fix: search all loaded modules for symbols on Windows 2021-08-18 13:54:52 +02:00
Leonardo de Moura
14b611af96 refactor: move buffer.h and *_ref.h files to runtime 2021-08-16 15:39:38 -07:00
Sebastian Ullrich
917eb4d081 chore: collect stdlib compilation flags in new header 2021-08-12 07:51:50 -07:00
Leonardo de Moura
a863f1b8a3 fix: fixes #616 2021-08-07 07:29:54 -07:00
Sebastian Ullrich
4b87e69ff5 fix: deletion on Windows for real 2021-08-04 16:40:57 +02:00
Sebastian Ullrich
7e2cf59aaf chore: deleting open .olean files on Windows 2021-08-04 16:40:57 +02:00
Sebastian Ullrich
3c91c9e874 feat: try memory-mapping .olean files on Windows 2021-08-04 16:40:57 +02:00
Sebastian Ullrich
0aaab9e024 chore: remove file_lock.h 2021-08-04 16:40:57 +02:00
Sebastian Ullrich
e4ef665c54 feat: atomically (re-)create .olean files 2021-08-04 16:40:57 +02:00
Sebastian Ullrich
2e8075b015 chore: raise default profiler.threshold to 100ms 2021-08-04 16:40:57 +02:00
Sebastian Ullrich
4766ee0b5e feat: try to mmap() .olean files on Linux & macOS 2021-08-04 16:40:57 +02:00
Sebastian Ullrich
a00674fcba feat: compute .olean base address from module name 2021-08-04 16:40:57 +02:00
Sebastian Ullrich
e1703bf1ae fix: main return value on 32-bit
Resolves #594
2021-08-03 11:00:10 -07:00
Sebastian Ullrich
2b451a3fed chore: remove obsolete serializer code 2021-07-22 18:59:39 +02:00
Sebastian Ullrich
d7dd2fe3ab fix: unbox trivial unparameterized structures as well 2021-07-06 08:19:56 -07:00
Sebastian Ullrich
2ca4d2693f feat: trace.compiler.inline 2021-06-17 11:25:58 +02:00