Leonardo de Moura
68ebc2a5c5
feat(library/init/data/string/basic): implement iterators using uft8 low level API
2019-03-12 06:56:05 -07:00
Leonardo de Moura
a1cbd39d74
feat(library/init/lean/extern): remove restriction from expand_extern_pattern
2019-03-10 11:42:39 -07:00
Leonardo de Moura
4828df1c7a
chore(library/init/lean/frontend): revert 4333ab620
...
The specializer has been fixed. So, we don't need this workaround
anymore.
2019-03-08 12:06:49 -08:00
Leonardo de Moura
baec9a1b78
chore(library/init/lean/compiler/ir): minor
2019-03-08 09:14:54 -08:00
Sebastian Ullrich
d0929c93cd
perf(library/init/lean/frontend): make file_map construction explicit, do it only once
2019-03-08 17:17:27 +01:00
Sebastian Ullrich
4333ab620c
refactor(library/init/lean/frontend): use direct unbounded recursion instead of iterate_eio
2019-03-08 17:04:46 +01:00
Sebastian Ullrich
e0bbc094ad
chore(library/init): remove coroutines from stdlib
2019-03-08 15:34:17 +01:00
Sebastian Ullrich
234e4d1e8a
refactor(library/init/lean/elaborator): replace coroutines with explicit state
2019-03-08 15:23:01 +01:00
Leonardo de Moura
db6f08e66d
feat(library/init/lean/compiler/ir): collect fnbody free variables
2019-03-07 15:37:45 -08:00
Leonardo de Moura
27028309a3
feat(library/init/lean/kvmap): add == for kvmap
2019-03-07 14:12:10 -08:00
Leonardo de Moura
a836bcc204
feat(library/init/lean/compiler/ir): alpha equivalence
2019-03-07 13:50:35 -08:00
Sebastian Ullrich
81615fc856
refactor(library/init/lean/parser/module): replace coroutines with explicit snapshot state
2019-03-07 10:32:28 -08:00
Leonardo de Moura
0d4da4bc76
fix(library/init/lean/elaborator): borrow annotations
...
@kha I see you found this problem too :)
2019-03-07 10:26:40 -08:00
Leonardo de Moura
819d17ebbd
chore(library/init/lean/compiler/ir): use has_beq
2019-03-07 10:21:14 -08:00
Leonardo de Moura
626d155c81
feat(library/init/lean/compiler/ir): alpha eqv for lean.ir.expr
2019-03-07 10:21:14 -08:00
Sebastian Ullrich
0e01871182
fix(library/init/lean/elaborator): re-add borrow annotations
2019-03-07 15:51:40 +01:00
Sebastian Ullrich
430fb81f69
fix(library/init/lean/parser/term,frontends/lean/builtin_exprs): @& should have higher rbp than ->
2019-03-07 14:35:25 +01:00
Sebastian Ullrich
a37dd02a41
perf(library/init/lean/frontend): do not hold on to outputs (syntax trees etc.) by default
2019-03-07 12:56:48 +01:00
Sebastian Ullrich
6f83faaee0
perf(library/init/lean/parser/command): index command parsers by first token
2019-03-07 11:28:42 +01:00
Leonardo de Moura
515556a718
feat(library/init/lean/compiler/ir): add new terminal: unreachable
2019-03-06 17:00:50 -08:00
Leonardo de Moura
d0c1c40cc1
feat(library/init/lean/compiler/ir): started alpha equivalence
...
I will continue this module later, after I fix a bug in the compiler
exposed by these new functions.
2019-03-06 12:32:30 -08:00
Leonardo de Moura
50476328ff
feat(library/init/lean/name): add name_map
2019-03-06 12:32:08 -08:00
Sebastian Ullrich
ed4a0d904d
feat(library/init/lean/elaborator): make meta, remove max_commands
2019-03-06 16:26:21 +01:00
Leonardo de Moura
5e39a711fc
chore(init/lean/ir): remove old IR
2019-03-06 07:04:47 -08:00
Leonardo de Moura
6defbf82bd
feat(library/init/lean/compiler/ir): add meta data, fix names and declarations
...
cc @kha
2019-03-06 06:56:16 -08:00
Sebastian Ullrich
cfce916438
perf(library/init/lean/parser/module): make sure commands_aux is tail-recursive
2019-03-06 13:58:26 +01:00
Sebastian Ullrich
85bc52b9f2
feat(library/init/lean/frontend): profile frontend
2019-03-06 11:08:38 +01:00
Sebastian Ullrich
f2a161e5a9
feat(library/init/lean/util): Lean API for profiler
2019-03-06 10:37:38 +01:00
Leonardo de Moura
ed4cd39d59
feat(library/init/lean/compiler/ir): new IR for Lean
...
It is currently implemented in C++. The plan is to move the procedures
for inserting inc/dec, reset/reuse, and inferring borrow inferences to
Lean. Another goal is to make sure new IR optimizations can be
implemented in Lean, and to avoid backend optimizations that would
have to be duplicated in each backend (e.g., `emit_proj_inc_reset_seq`
at `emit_cpp.cpp`).
cc @kha
2019-03-04 16:46:10 -08:00
Leonardo de Moura
3f50df70bc
perf(library/init/lean/name): use hash code to speedup name.quick_lt
...
We use the same trick in the C++ version of this function.
I measured the impact using `lean --new-frontend core.lean` and checking
the number of instructions executed reported by Valgrind.
Before: 4,891,642,264
After: 4,847,313,330
2019-03-04 12:48:06 -08:00
Leonardo de Moura
e84f7744c3
feat(library/init/lean/compiler/const_folding): const fold nat.succ and char.of_nat
2019-02-16 11:15:19 -08:00
Leonardo de Moura
61274c7d35
feat(library/init/data/char): use uint32 instead of nat for defining char
2019-02-15 18:07:55 -08:00
Leonardo de Moura
e0fd89e165
feat(library/init/lean/compiler): fold nat predicates
2019-02-15 16:17:16 -08:00
Leonardo de Moura
0cb3ac683d
feat(library/compiler): connect new const_folding module implemented in Lean with csimp
2019-02-15 14:37:48 -08:00
Leonardo de Moura
6785ad9844
fix(library/init/lean/default): missing file
2019-02-14 15:21:53 -08:00
Leonardo de Moura
390c9009f7
chore(shell,boot): update boot, and initialization process
2019-02-14 14:49:16 -08:00
Leonardo de Moura
68e8aa8d1d
feat(library/init/lean/compiler): add constant folding helper functions
2019-02-14 14:35:10 -08:00
Leonardo de Moura
5e7308d22d
chore(library/init/lean/expr): get_app_fn
2019-02-14 14:12:25 -08:00
Sebastian Ullrich
587a7a001a
feat(library/init/lean/elaborator): to_pexpr: support string literals
2019-02-14 14:07:05 -08:00
Sebastian Ullrich
dbc470d7e4
feat(library/init/lean/{parser/term,elaborator}): support @& borrowed annotations
2019-02-14 14:07:05 -08:00
Sebastian Ullrich
7cffe6935e
feat(frontends/lean/vm_elaborator): port to new runtime
2019-02-14 14:07:05 -08:00
Leonardo de Moura
9cb2005e8e
feat(library/init/lean): add hash functions and dbg_to_string
2019-02-13 16:19:25 -08:00
Leonardo de Moura
b89eb64cf1
refactor(library/init/lean/expr): use native constructors
2019-02-13 15:07:49 -08:00
Leonardo de Moura
71f5290567
feat(kernel): expose level primitives
2019-02-13 10:37:13 -08:00
Leonardo de Moura
4627929a83
refactor(boot,runtime,util): move name runtime implementation to util/name, and use "extern C" ABI
2019-02-13 08:27:23 -08:00
Leonardo de Moura
f20c132ced
feat(library/init/lean/elaborator): use extern attribute
2019-02-12 11:40:21 -08:00
Sebastian Ullrich
534b507aff
feat(library/init/lean/frontend): rework error reporting
2019-02-12 13:34:32 +01:00
Leonardo de Moura
5a5e949578
feat(library/init/lean/name): use extern attribute
2019-02-11 16:12:25 -08:00
Leonardo de Moura
bc4e06666b
chore(*): avoid 0-ary extern declarations
2019-02-11 13:21:17 -08:00
Leonardo de Moura
7e8f9e6f66
feat(library/compiler): add [extern] attribute
2019-02-09 18:53:44 -08:00