Commit graph

106 commits

Author SHA1 Message Date
Leonardo de Moura
3a7d407d6c feat(library/compiler/builtin): register io primitives
TODO: implement `io` primitives in the new runtime
2018-11-15 16:14:50 -08:00
Leonardo de Moura
b501613f8c feat(library/compiler/builtin): register string primitive functions 2018-11-15 13:26:41 -08:00
Leonardo de Moura
70c4e33cf2 feat(runtime/object): missing string.iterator builtin functions 2018-11-15 13:05:29 -08:00
Leonardo de Moura
d0e96ee600 feat(runtime/object): missing int builtins 2018-11-15 12:31:34 -08:00
Leonardo de Moura
a3db4e8e09 chore(*): style 2018-11-15 10:59:17 -08:00
Leonardo de Moura
efa703d2b5 feat(runtime): implement string.iterator primitives in the new runtime
Some of the primitives do not have optimal implementation.

@Kha Could you please check if everything we use in the parser has a
reasonable implementation?
2018-11-15 10:42:23 -08:00
Leonardo de Moura
ed4eeddf0a feat(runtime/object): add more string primitives 2018-11-14 16:51:10 -08:00
Leonardo de Moura
23202bada1 chore(runtime/object): allow shared objects at string_append and string_push 2018-11-14 16:30:23 -08:00
Leonardo de Moura
9258a12ed4 feat(library/compiler): add new builtin management module
TODO: register `int`, `string` and `io` primitives
2018-11-14 15:58:12 -08:00
Leonardo de Moura
81545c12f2 chore(runtime/object): fix comment 2018-09-11 14:31:14 -07:00
Leonardo de Moura
46d6f7bfb5 chore(runtime/object): store function pointer as void * inside closure 2018-09-11 14:27:45 -07:00
Leonardo de Moura
e8fa692611 chore(runtime/object): change default object_memory_kind to STHeap 2018-09-11 13:57:55 -07:00
Leonardo de Moura
5bc9b07ab9 feat(runtime/object): split Heap into MTHeap and STHeap 2018-09-09 14:46:28 -07:00
Leonardo de Moura
0573d7e1d5 fix(runtime/object): parray RC bugs 2018-09-09 12:04:27 -07:00
Leonardo de Moura
b45ac3fcc0 chore(runtime/object): minor 2018-09-09 10:59:36 -07:00
Leonardo de Moura
36423e4389 fix(runtime): parray memory leaks 2018-09-09 10:33:15 -07:00
Leonardo de Moura
4863ca071a chore(runtime): make sure we use the same naming convention for getters and setters 2018-09-09 10:07:00 -07:00
Leonardo de Moura
8f195515a6 feat(runtime): add persistent arrays to runtime 2018-09-09 09:44:38 -07:00
Leonardo de Moura
3770df2a48 fix(runtime/apply): must use free_heap_obj instead of free 2018-08-28 12:29:14 -07:00
Leonardo de Moura
5c3678482f chore(runtime/object): cleanup 2018-08-28 12:29:04 -07:00
Leonardo de Moura
3e528a9b67 chore(runtime): fix assertions 2018-08-28 10:33:22 -07:00
Leonardo de Moura
4d6da3dd69 fix(runtime/compact): bug at read 2018-08-28 10:30:51 -07:00
Leonardo de Moura
b63b05e5fd fix(runtime/thread): MULTI_THREAD=OFF build 2018-08-28 08:08:55 -07:00
Leonardo de Moura
030669ea4d feat(runtime): do not waste space with RC for region and stack allocated objects
The modification introduces an overhead of 1.5% on the
execution time. Here is the the time for compiling the corelib

Before: 8.61 secs (avg of 3 runs)
After:  8.74 secs (avg of 3 runs)

On the other hand, the size of the compacted region for the command
`#compact_tst 10` is smaller.

Before: 176687728
After:  153794704

The size before this change was 14.8% bigger.

For reference, using the old serializer we generate a buffer of size 105291117.

cc @kha
2018-08-28 07:41:55 -07:00
Leonardo de Moura
fdcbf3fe9e chore(runtime/object): "section comments" 2018-08-22 17:53:11 -07:00
Leonardo de Moura
3ab1ebcb3f feat(init/core): add task 2018-08-21 16:10:07 -07:00
Leonardo de Moura
0b349f1abf chore(*): fix style 2018-08-21 09:32:01 -07:00
Leonardo de Moura
38b23431a3 chore(runtime/compact): add inline 2018-08-20 15:30:21 -07:00
Leonardo de Moura
7f9d131a1f chore(runtime/compact): one alloc per object 2018-08-20 14:46:06 -07:00
Leonardo de Moura
474a0c40c7 fix(runtime/compact): missing memcpy 2018-08-20 10:33:04 -07:00
Leonardo de Moura
dc1f5c0aa6 feat(runtime/object): task API functions can take thunks as arguments 2018-08-20 09:13:35 -07:00
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
0a2e9c109f fix(runtime/object): memory leak and violation at task_bind 2018-08-17 09:03:45 -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