Leonardo de Moura
313fd69e8c
feat(library/compiler/borrowed_annotation): mark objects as owned when stored in constructors
...
@kha
2019-02-23 09:12:53 -08:00
Leonardo de Moura
b971db6c11
chore(boot): update
2019-02-22 16:09:48 -08:00
Leonardo de Moura
d23216e3ee
fix(library/compiler/llnf): bug at explicit_rc_fn
2019-02-22 16:01:52 -08:00
Leonardo de Moura
07aa990f22
fix(library/compiler/borrowed_annotation): ensure that exported functions do not take borrowed arguments
...
In the future, we should automatically generate wrappers that make all
adjustments for us.
2019-02-22 15:32:30 -08:00
Leonardo de Moura
b1b75c7c2e
feat(library/compiler): borrow inference procedure
2019-02-22 15:23:42 -08:00
Leonardo de Moura
ba43d355b7
feat(library/compiler): add borrowed annotation inference skeleton
2019-02-22 11:14:38 -08:00
Leonardo de Moura
6646d7d62c
chore(boot): update
2019-02-22 10:19:39 -08:00
Leonardo de Moura
01922794c5
fix(library/compiler/llnf): mk_boxed_version must take care of borrowed arguments and result
2019-02-22 10:18:17 -08:00
Leonardo de Moura
20c877b277
chore(library/init/io): add inline
2019-02-22 09:55:36 -08:00
Leonardo de Moura
778e7e41f9
refactor(library/init/data/rbmap/basic): pass ins node-cell to balance1 and balance2.
...
The idea is to reuse the cell. The trick is like the one we used for
improving state_t. It seems to work pretty well. Now, the Lean
version is 29% slower than the C++ one.
cc @kha
2019-02-20 18:27:58 -08:00
Leonardo de Moura
835718955f
refactor(library/init/data/rbmap/basic): store color in the node
...
@kha Now the Lean version is approx. 50% slower than the C++ version.
2019-02-20 17:52:03 -08:00
Leonardo de Moura
f91a37e686
chore(boot): update
2019-02-20 17:06:02 -08:00
Leonardo de Moura
ac9e37ed86
feat(library/compiler/llnf): we postpone the simplification of 1-reachable and all-eq cases_on expressions
...
Reason: the `cases_on`-expressions are used to guide
`insert_reset_reuse_fn`. The new `simp_cases` simplifier applies the
1-reachable and all-eq cases_on expression simplifications after
`insert_reset_reuse_fn` is executed.
2019-02-20 17:00:50 -08:00
Leonardo de Moura
35adf5f540
feat(library/compiler/llnf): avoid unfruitful reuse instruction replacements
2019-02-20 16:34:46 -08:00
Leonardo de Moura
a068c91e50
chore(boot): update
2019-02-20 16:20:22 -08:00
Leonardo de Moura
54a89dabb7
feat(library/compiler/llnf): new reset/reuse insertion procedure
2019-02-20 16:12:58 -08:00
Leonardo de Moura
937b947938
feat(library/compiler/llnf): decorate _cnstr instruction with inductive type name
2019-02-20 14:45:35 -08:00
Leonardo de Moura
b8cee758a5
feat(library/compiler/llnf): add push_proj_fn
2019-02-20 13:20:27 -08:00
Leonardo de Moura
2f218f7ec0
refactor(library/compiler/llnf): remove reset/reuse insertion from to_llnf_fn
...
`to_llnf_fn` now produces an IR similar to the \lambda_pure in our paper.
2019-02-20 11:16:29 -08:00
Leonardo de Moura
0cbf587a00
chore(boot): update
2019-02-19 22:17:57 -08:00
Leonardo de Moura
75ad042c66
feat(library/compiler/llnf): improve reuse/reset insertion
...
It is now closer to the procedure at reuse.txt
2019-02-19 22:14:29 -08:00
Leonardo de Moura
6276d1a7f1
feat(library/compiler/emit_cpp): avoid reset field instructions when reuse instruction is guaranteed to be executed
...
expr_const_folding.lean takes 3 secs now.
2019-02-19 13:44:46 -08:00
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
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
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
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