Commit graph

15728 commits

Author SHA1 Message Date
Leonardo de Moura
e2eeccdb2a chore(boot): update 2019-02-19 13:06:33 -08:00
Leonardo de Moura
fe1d17583c feat(library/compiler/emit_cpp): special support for (proj|inc)*;reset sequences
We save inc/dec operations. It improved the performance of
`expr_const_folding.lean`. On my Linux desktop
Before: 3.7 secs
After:  3.1 secs

cc @kha
2019-02-19 13:06:22 -08:00
Sebastian Ullrich
76753a0696 test(tests/playground/expr_const_folding): add Swift translation 2019-02-19 11:24:10 +01:00
Leonardo de Moura
b739d7f343 chore(boot): update 2019-02-18 20:53:04 -08:00
Leonardo de Moura
00aa78fffc feat(library/compiler/llnf): given y := _unbox.n x, mark x as an unboxed scalar if n < sizeof(void*) 2019-02-18 20:52:02 -08:00
Leonardo de Moura
fe4b1509ba chore(boot): update 2019-02-18 20:22:18 -08:00
Leonardo de Moura
feea8ecccd feat(library/compiler/llnf): avoid inc/dec operations on persistent objects
inc/dec operations are noop's for persistent objects.
2019-02-18 20:22:18 -08:00
Sebastian Ullrich
ddab7bcea8 test(tests/playground/expr_const_folding): Haskell version 2019-02-18 14:59:33 +01:00
Sebastian Ullrich
59d19aee2b test(tests/playground/expr_const_folding): fix Lean version 2019-02-18 14:29:07 +01:00
Leonardo de Moura
aff5f96a3d test(tests/playground): simple task benchmarks 2019-02-17 11:47:02 -08:00
Leonardo de Moura
59e9751c2b chore(boot): update 2019-02-17 11:46:17 -08:00
Leonardo de Moura
b752dd1984 fix(library/compiler/emit_cpp): mark global objects as persistent
They may be used by tasks, but they are not directly reachable from
task starting point.
2019-02-17 11:45:51 -08:00
Leonardo de Moura
8ac1a1969d fix(runtime/object): task.bind and task.map should also invoke to_mt 2019-02-17 11:11:41 -08:00
Leonardo de Moura
0a19f46c6a chore(boot): update 2019-02-17 10:53:04 -08:00
Leonardo de Moura
fca40151b2 fix(library/compiler/emit_cpp): is_shared should only be used on heap objects 2019-02-17 10:51:51 -08:00
Leonardo de Moura
827021a6c5 feat(runtime/object): given mk_task(o), mark objects reachable from o as MTHeap 2019-02-17 10:29:41 -08:00
Leonardo de Moura
d100f95469 feat(runtime/object): make dbg_trace thread safe 2019-02-17 09:50:55 -08:00
Leonardo de Moura
7623f64b5e feat(runtime,library/init/util): add some debugging helper function 2019-02-17 09:22:37 -08:00
Leonardo de Moura
75f4eb2f84 feat(library/compiler/emit_cpp): initialize task_manager at generated main function 2019-02-17 09:21:17 -08:00
Leonardo de Moura
170579c803 feat(library/init/core): task builting primitives 2019-02-17 08:45:46 -08:00
Leonardo de Moura
b7e7ca9527 chore(boot): update 2019-02-17 07:32:05 -08:00
Leonardo de Moura
243d7c08e3 feat(library/compiler/llnf): avoid inc and dec operations on (boxed) small nat literals 2019-02-17 07:31:14 -08:00
Leonardo de Moura
fbedc1d098 chore(boot): update 2019-02-17 07:18:28 -08:00
Leonardo de Moura
3c60af74ae feat(library/compiler/llnf): avoid inc and dec instructions on neutral elements 2019-02-17 07:17:54 -08:00
Leonardo de Moura
f4143c030f chore(boot): update 2019-02-17 06:53:05 -08:00
Leonardo de Moura
78440919e8 feat(library/compiler/llnf): avoid unnecessary inc x and dec x instructions
Example:
```
x = lean::box(0);
...
lean::inc(x);
...
lean::inc(x);
...
lean::dec(x);
...
```
In the example above, the `inc` and `dec` operations are unnecessary
since `x` is known to be a (boxed) scalar value. This commit fixes this.
2019-02-17 06:50:25 -08:00
Leonardo de Moura
0c1c1dd607 chore(boot): update 2019-02-17 06:26:15 -08:00
Leonardo de Moura
221704900a feat(library/compiler/llnf): avoid inc x and dec x instructions in branches where x is known to be a scalar value 2019-02-17 06:25:00 -08:00
Leonardo de Moura
dfce086c9e test(tests/compiler/array_test): basic array test 2019-02-16 16:08:49 -08:00
Leonardo de Moura
9e0b28d8ce feat(library/init/data/array/basic): improve 2019-02-16 16:08:10 -08:00
Leonardo de Moura
3c73c43ab2 feat(runtime,library/init/data/array/basic): add builtin support for arrays 2019-02-16 15:27:23 -08:00
Leonardo de Moura
7ed04d3ff1 chore(boot): update 2019-02-16 12:28:41 -08:00
Leonardo de Moura
e98acc86b8 feat(library/compiler/emit_cpp): "merge" the case with most occurrences as default: 2019-02-16 12:27:25 -08:00
Leonardo de Moura
54985b5a0e fix(library/compiler/csimp): accidentally removed nat.succ x ==> x + 1 transformation from csimp 2019-02-16 12:05:17 -08:00
Leonardo de Moura
370561fbdd chore(boot): update 2019-02-16 11:42:48 -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
c855094ecb feat(library/init/data/char/basic): mark char.of_nat as noinline 2019-02-16 10:45:52 -08:00
Leonardo de Moura
821bdcdac0 chore(tests/playground): add helper files 2019-02-15 18:13:37 -08:00
Leonardo de Moura
98d8657f74 chore(boot): update 2019-02-15 18:11:20 -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
38c7ec133d fix(library/compiler/llnf): missing case 2019-02-15 17:51:08 -08:00
Leonardo de Moura
e819e980f0 chore(boot): update 2019-02-15 17:48:26 -08:00
Leonardo de Moura
ab45af5936 fix(library/compiler/csimp): avoid potential expensive reduction at csimp
`whnf_core(e)` uses `whnf` to reduce the major premise of recursors and
projections, and `whnf` unfolds arbitrary definitions.
This commit adds a new option (`cheap`) to `whnf_core`. When
`whnf_core(e, true)` is used, the type checker will not unfolding
definitions when reducing the major premises.
2019-02-15 17:43:21 -08:00
Leonardo de Moura
9ebe820410 chore(boot): update 2019-02-15 16:21:20 -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
90a1616cff chore(boot): update 2019-02-15 15:26:41 -08:00
Leonardo de Moura
1080edd490 fix(library/compiler/lambda_lifting): make sure auxiliary _lambda declarations come before the declarations that use them
This fixes a nasty initialization bug where an auxiliary `_closed`
declaration for an auxiliary `_lambda` is accessed before it is
initialized.
2019-02-15 15:23:46 -08:00
Leonardo de Moura
542bd432f8 test(tests/compiler): uint constant folding tests 2019-02-15 14:53:29 -08:00
Leonardo de Moura
11c4e2dd94 chore(boot): update 2019-02-15 14:42:20 -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