Commit graph

5048 commits

Author SHA1 Message Date
Sebastian Ullrich
560e7af128 fix(library/init/lean/compiler/ir/compilerm): borrow annotations on extern decls do not do anything right now 2019-09-12 18:26:15 +02:00
Sebastian Ullrich
9015fc1e34 chore(library/compiler/ir_interpreter): add step-level trace 2019-09-12 18:26:15 +02:00
Sebastian Ullrich
1a99fc5c5d feat(init/lean/compiler): export some internals 2019-09-12 18:22:02 +02:00
Leonardo de Moura
8e47b6396f chore(library/init/lean/compiler/ir): simplify mkCase, the xType field is set by explicitBoxing 2019-09-12 08:55:09 -07:00
Leonardo de Moura
ca54240843 fix(library/init/lean/compiler/ir): the xType field at FnBody.case must be set by explicitBoxing 2019-09-12 08:47:58 -07:00
Leonardo de Moura
0284d4a7a2 chore(library/compiler/ir): use new mkCase 2019-09-12 08:23:29 -07:00
Leonardo de Moura
a16d3f09cf feat(library/init/lean/compiler/ir): store scrutinee type at FnBody.case 2019-09-12 08:07:47 -07:00
Leonardo de Moura
56e0c0efae chore(library/init/lean/compiler/ir/boxing): apply elimDead 2019-09-11 11:55:38 -07:00
Leonardo de Moura
3aeeadd255 chore(library/init/lean/compiler/ir/boxing): cleanup 2019-09-11 11:11:33 -07:00
Leonardo de Moura
f39220ac01 feat(library/init/lean/compiler/ir/boxing): ignore "cheap" cases when caching boxing operations 2019-09-11 10:56:37 -07:00
Leonardo de Moura
61a3ea61c4 perf(library/init/lean/compiler/ir/boxing): create auxiliary constants for caching the value of boxed/unboxed literals and constants
For example, in the new test `qsort64.lean`, the new optimization
prevents the repeated execution of `box UInt64.inhabited`.
On my machine
```
./run.sh qsort64.lean 2000000
```
Goes from 1.22s to 0.355s
2019-09-11 10:37:35 -07:00
Leonardo de Moura
e8cdd2b29f fix(library/init/lean/compiler/ir/default): missing explicitRC 2019-09-09 10:53:34 -07:00
Leonardo de Moura
f7af9a73bd chore(library/init/lean/compiler/ir): move addBoxedVersion to entry point file 2019-09-09 10:35:52 -07:00
Leonardo de Moura
7dfec3c724 feat(library/init/lean/compiler/ir): add persistent field to inc/dec
If `persistent == true`, then object is known to be persistent at
compilation time. `emitc` omits `inc/dec` operations to
persistent objects. The interpreter does not to avoid memory leaks.
2019-09-09 07:42:06 -07:00
Leonardo de Moura
a188bb8497 chore(library/init/lean/compiler/ir): remove emitcpp 2019-09-07 19:46:22 -07:00
Leonardo de Moura
3e48a0cc2b feat(library/Makefile.in): generate ".c" files 2019-08-24 07:40:56 -07:00
Leonardo de Moura
6afded1104 chore(library/Makefile): use C backend 2019-08-24 07:40:55 -07:00
Leonardo de Moura
09d8dd536c fix(library/init/lean/compiler/ir/emitc): invisible unicode character 2019-08-24 07:40:55 -07:00
Leonardo de Moura
db83a52748 chore(library/init/lean/compiler/ir/emitc): cleanup 2019-08-24 07:40:55 -07:00
Leonardo de Moura
70f3537a29 feat(runtime): add lean_panic and variants 2019-08-24 07:40:39 -07:00
Leonardo de Moura
5124ab07c0 feat(library/init/lean/compiler/ir/emitcpp): use extern "C" { in generated files 2019-08-24 07:40:38 -07:00
Leonardo de Moura
128acd3b47 chore(library/init): remove @[extern cpp ...] 2019-08-24 07:40:38 -07:00
Leonardo de Moura
b020ca3259 feat(library/init/lean/compiler/ir/emitcpp): allow C++ backend to use @[extern c ...] when @[extern cpp ...] is missing 2019-08-24 07:40:38 -07:00
Leonardo de Moura
41a4eaacd3 fix(runtime, library/init/lean/compiler/ir/emitc): missing export, ensure we can compile with C++ compiler 2019-08-24 07:40:38 -07:00
Sebastian Ullrich
cf18cda557 chore(library/Makefile.in): make sure failures from lean --deps are propagated 2019-08-23 17:24:35 +02:00
Leonardo de Moura
78d87cf4cd fix(library/init/lean/compiler/ir/emitcpp): add missing lean::
@kha It is unclear why the C++ compilers were accepting our generated
files without `lean::`. I found the issue by accident while working on
the new C backend.
2019-08-21 09:51:01 -07:00
Leonardo de Moura
25481d5cef chore(runtime/object): preparing for implementing object.h using lean.h 2019-08-20 13:00:18 -07:00
Leonardo de Moura
4405b30cc8 fix(library/init/lean/compiler/ir/emitc): lean_inc 2019-08-20 12:19:31 -07:00
Leonardo de Moura
dbabee0711 fix(library/init): missing "extern c" 2019-08-20 12:02:46 -07:00
Leonardo de Moura
98e6e0c09a feat(library/init): add "extern c" attributes 2019-08-20 11:53:46 -07:00
Leonardo de Moura
c46387e98c chore(library/init/fix): test "extern c" 2019-08-20 11:18:19 -07:00
Leonardo de Moura
6d6cb14f9e feat(library/init/lean/compiler/ir/emitc,shell/lean): add --c=<filename> option 2019-08-20 10:13:40 -07:00
Leonardo de Moura
b2693962bd chore(library/init/lean): export as C functions 2019-08-17 07:30:07 -07:00
Leonardo de Moura
66304d83a0 chore(library/init/lean/compiler): export as C functions 2019-08-17 06:58:36 -07:00
Leonardo de Moura
4429aac0b3 chore(library/compiler/ir): remove box(13) hack 2019-08-16 20:58:30 -07:00
Leonardo de Moura
ec0e74f5f8 chore(library/init/lean): export as C functions 2019-08-16 20:52:10 -07:00
Leonardo de Moura
a5c97e21bf chore(library/init/lean): export as C functions 2019-08-16 20:15:30 -07:00
Leonardo de Moura
19051d9a0d chore(library/init/lean/localcontext): export as C functions 2019-08-16 19:49:17 -07:00
Leonardo de Moura
67a37c6917 chore(library/init/lean/class): export as C functions 2019-08-16 19:42:14 -07:00
Leonardo de Moura
8a3522c8e5 chore(library/init/lean/compiler/ir/emitcpp): small hack for exporting functions as C functions instead of C++ 2019-08-16 19:26:03 -07:00
Sebastian Ullrich
c57de174a3 fix(library/init/lean/elaborator/resolvename): prelude 2019-08-16 19:11:01 +02:00
Leonardo de Moura
deecda22bd feat(library/init/lean/compiler/ir/emitc): C code emitter
It will eventually replace emitcpp.lean
2019-08-15 20:29:06 -07:00
Leonardo de Moura
52b86c3b4b chore(library/init/data/persistentarray/basic): missing "reset" 2019-08-14 16:22:35 -07:00
Leonardo de Moura
8e37fc512b fix(library/init/data/persistentarray/basic): bug at pop
fixes #28
2019-08-14 16:14:20 -07:00
Leonardo de Moura
46a2e6f311 feat(library/init/lean/elaborator): add skeletons 2019-08-14 14:13:16 -07:00
Leonardo de Moura
e0a781063a feat(library/init/lean/elaborator/term): expand and invoke old elaborator as fallback 2019-08-14 07:34:44 -07:00
Leonardo de Moura
e1588c3fe7 feat(library/init/lean/elaborator): add expected type 2019-08-14 07:16:24 -07:00
Leonardo de Moura
d002e550bb chore(library/init/lean): filename ==> fileName 2019-08-13 19:51:04 -07:00
Leonardo de Moura
b77fcc4a0f feat(library/init/lean/parser/command): add #elab command 2019-08-13 19:48:23 -07:00
Leonardo de Moura
13a67cb9a7 feat(library/init/lean/elaborator/preterm): add glue code for new and old elaborators 2019-08-13 19:42:41 -07:00