Leonardo de Moura
a27aa53e88
refactor(runtime/compact): save task objects as thunks
...
TODO: modify task API and make sure all functions there can take thunks
instead of tasks as arguments.
2018-08-20 08:52:35 -07:00
Leonardo de Moura
db98397cc0
feat(runtime): object compactor
...
We need more testing and performance testing.
We also need to compare serializer and compacted_region.
2018-08-19 17:10:18 -07:00
Leonardo de Moura
ce504b4c21
feat(runtime/serializer): support for tasks
2018-08-18 14:52:29 -07:00
Leonardo de Moura
684085d93f
refactor(runtime/object): delete data needed to execute task after it finishes
2018-08-18 14:33:27 -07:00
Leonardo de Moura
a0b5502821
fix(runtime/object): memory leak and simplify task_object
...
We remove per task condition_variable and use m_task_finished_cv.
The same condition_variable used to implement `wait_any`.
2018-08-18 10:29:12 -07:00
Leonardo de Moura
d0bc663f0d
chore(runtime/object): avoid ugly handle_finished_rec
...
Users should not rely on the order the dependencies have beed inserted.
If the order matters, priorities should be used instead.
2018-08-17 18:15:58 -07:00
Leonardo de Moura
d52507c4b2
fix(runtime/object): memory leak
2018-08-17 18:12:17 -07:00
Leonardo de Moura
861592fe6a
chore(runtime/object): cleanup
2018-08-17 15:43:01 -07:00
Leonardo de Moura
4bc8414d2b
feat(runtime/object): use "weak pointers" in the task manager, and interrupt tasks at GC time
2018-08-17 15:35:00 -07:00
Leonardo de Moura
24444d65c4
refactor(runtime/object): do not use Lean runtime lists to implement the reverse dependency list in task objects
2018-08-17 14:42:43 -07:00
Leonardo de Moura
1d5411f455
feat(runtime/object): add support for io.wait_any
2018-08-17 13:04:06 -07:00
Leonardo de Moura
5f78087b08
feat(runtime/object): add support for io.has_finished
2018-08-17 12:36:48 -07:00
Leonardo de Moura
5e63e7806c
chore(runtime/object): cleanup
2018-08-17 12:32:47 -07:00
Leonardo de Moura
ae9eac6781
feat(runtime/object): simplify and more tests
2018-08-17 09:41:22 -07:00
Leonardo de Moura
c863e86429
feat(runtime/object): primitives for interrupting threads
2018-08-17 09:25:40 -07:00
Leonardo de Moura
7a7d443ad5
test(tests/util/object): improve tests
2018-08-17 09:04:08 -07:00
Leonardo de Moura
0a2e9c109f
fix(runtime/object): memory leak and violation at task_bind
2018-08-17 09:03:45 -07:00
Leonardo de Moura
510a5ffeaa
chore(tests/util/object): adjust test
2018-08-17 08:48:11 -07:00
Leonardo de Moura
f5ecd8477f
fix(runtime/object): memory leak
2018-08-17 08:47:29 -07:00
Leonardo de Moura
168eaefff5
fix(runtime/object): finalization and avoid leak
2018-08-17 08:32:33 -07:00
Leonardo de Moura
cc13c8ee7f
refactor(runtime/object): remove unnecessary, fix malloc/delete mismatch
2018-08-17 08:10:05 -07:00
Leonardo de Moura
018542e2e1
fix(runtime/object): task bugs
2018-08-16 21:28:58 -07:00
Leonardo de Moura
066fbf2d5b
refactor(runtime/object): remove state field
2018-08-16 20:46:14 -07:00
Leonardo de Moura
584eddee01
feat(runtime/object): add support for tasks
...
This is just the first draft. We still need a lot of testing.
2018-08-16 19:09:50 -07:00
Leonardo de Moura
67ab1ec8f2
chore(util/worker_queue): remove dead code
2018-08-16 14:14:57 -07:00
Leonardo de Moura
c322ef0cab
fix(tests/util/object): use new calling convention for apply
2018-08-15 21:17:50 -07:00
Leonardo de Moura
d14831c470
fix(runtime/apply): apply should use the standard calling convention
2018-08-15 21:07:54 -07:00
Leonardo de Moura
c3be026645
chore(runtime/object): document calling convention for runtime primitives
2018-08-15 20:10:43 -07:00
Leonardo de Moura
74d94432da
fix(runtime/object): make thunk_get thread safe
2018-08-15 15:34:15 -07:00
Leonardo de Moura
4ec43a84ca
chore(runtime/object): document standard/borrowed calling convetion
2018-08-14 17:43:00 -07:00
Leonardo de Moura
f9bad161c9
chore(tests/util/object): fix "unused" variables warnings in release mode
2018-08-14 15:19:07 -07:00
Leonardo de Moura
bcb37ef862
feat(runtime): thunk serialization
2018-08-14 15:15:12 -07:00
Leonardo de Moura
8a96fde229
feat(library/init/control/coroutine): add coroutine
...
Remark: the termination proofs are commented because Lean 4 is
currently ignoring them and accepting non-terminating functions.
These files are based on an experiment implemented using Lean 3.
We can find it here:
https://gist.github.com/leodemoura/f5d82426c105b5fae0880e77024f6e9c
We will use coroutines to implement the interaction between reader,
elaborator and main driver.
2018-08-12 17:14:02 -07:00
Leonardo de Moura
f036a7ad16
chore(runtime/object): mk_thunk(c) should not modify c's RC
...
This is useful when we are generating a function that does not use the
"borrow semantics" for an argument `c` which is used in `mk_thunk(c)`.
2018-08-10 18:11:29 -07:00
Leonardo de Moura
6eb598268d
chore(runtime/object): naming convention
...
`dec_ref` methods assume the input object is *not* a scalar
2018-08-10 18:11:29 -07:00
Leonardo de Moura
ea8e1075d2
feat(runtime/thunk): add runtime support for thunks
...
We did not use constructor objects for implementing thunks because we
wanted to use `atomic<object *>` to implement the cached result.
2018-08-10 18:11:29 -07:00
Sebastian Ullrich
ba7d3ee178
refactor(library/init/lean/parser/{reader/module,syntax}): move new coercions
2018-08-06 15:05:41 -07:00
Sebastian Ullrich
bf043ab8bd
feat(library/init/lean/parser/reader/basic): first has_view prototype, plus prefix ~> notation expansion based on it
2018-08-02 20:35:15 -07:00
Sebastian Ullrich
d4364850ff
feat(library/derive_attribute): support out_params after main parameter
2018-08-02 14:45:37 -07:00
Sebastian Ullrich
dedff7d295
chore(script/prepare-commit-msg): strip 'src/' prefix
2018-08-02 14:45:37 -07:00
Sebastian Ullrich
e535ebcce8
fix(frontends/lean/util): remove reference to obsolete match syntax
2018-08-02 14:16:25 -07:00
Sebastian Ullrich
f52395140a
feat(library/init/lean/parser/parsec): add dbg helper combinator
2018-08-02 13:32:42 -07:00
Sebastian Ullrich
1e1bf4b0f8
feat(library/init/lean/parser/reader/basic): add explicit syntax.missing objects on error
2018-08-02 13:32:28 -07:00
Sebastian Ullrich
10adf10634
fix(library/derive_attribute): prevent infinite loop during parsing
2018-08-02 08:08:21 -07:00
Sebastian Ullrich
eda9e4bb3f
feat(library/derive_attribute): temporary, hacky C++ implementation of @[derive]
2018-08-01 18:44:23 -07:00
Sebastian Ullrich
8033649335
chore(library/util): fix doc
2018-08-01 18:44:23 -07:00
Leonardo de Moura
9d35d31529
refactor(kernel): merge constant_assumption and axiom
2018-08-01 09:57:47 -07:00
Sebastian Ullrich
3951db3b0b
fix(library/init/lean/parser/reader/basic): error recovery reprint issue
2018-07-30 17:55:17 -07:00
Sebastian Ullrich
87dc8adbe6
fix(library/init/lean/parser/parsec): monad_except.catch should not reset position, consumed flag
2018-07-30 17:50:37 -07:00
Sebastian Ullrich
57c25ce01d
feat(src/library/vm/vm): profile: record and display self times
2018-07-30 17:30:20 -07:00