Leonardo de Moura
434627ee8e
chore(runtime/io): implement io.prim.put_str just to be able to test
2019-02-06 14:35:13 -08:00
Leonardo de Moura
fbc6c47094
chore(boot): update
2019-02-06 09:59:22 -08:00
Sebastian Ullrich
83e0c35204
chore(runtime/object): closure double-free assert
2019-02-06 09:38:35 -08:00
Leonardo de Moura
c4e8770342
feat(runtime,boot): second part of the previous commit
2019-02-05 16:28:18 -08:00
Leonardo de Moura
2058d33d07
feat(runtime,library/compiler): add name.dec_eq builtin
2019-02-05 14:36:02 -08:00
Leonardo de Moura
eb57a904af
chore(runtime): avoid overloads
2019-02-05 14:04:29 -08:00
Leonardo de Moura
3444a295e7
feat(library/compiler,runtime): builtin support for lean.name
2019-02-05 12:57:46 -08:00
Leonardo de Moura
579ac58b62
chore(runtime/object): expose thunk_map and thunk_bind
2019-02-04 13:11:37 -08:00
Leonardo de Moura
98edae152a
fix(runtime): replace lean::alloca with macro
...
Functions using `alloca` are not inlined even when marked with
`inline` in some compilers.
Remark: GCC will _not_ inline a function calling alloca unless it is
annotated with always_inline.
2019-02-04 09:36:53 -08:00
Leonardo de Moura
0918a599ae
feat(*): builtin support for uint functions
...
@kha The VM versions just throw exceptions. They are just stubs to
make sure we can compile Lean.
I implemented the uint functions in the new runtime, but there are a
few missing cases marked with TODO.
I needed these builtins to be able to compile the C++ generated code for
corelib.
2019-02-01 17:04:24 -08:00
Sebastian Ullrich
a8f668a3d2
feat(runtime/object): add LEAN_FAKE_FREE option to disable freeing runtime objects while debugging
2019-02-01 16:33:18 +01:00
Sebastian Ullrich
c162ec9583
fix(runtime/object): mk_option_some
2019-02-01 16:33:13 +01:00
Sebastian Ullrich
e3afa47c9e
fix(runtime/object): fix some string primitives
2019-02-01 16:33:11 +01:00
Sebastian Ullrich
e0fc2a7812
feat(runtime/object): string_to_std
2019-02-01 16:32:52 +01:00
Leonardo de Moura
4166851574
feat(library/compiler/emit_cpp): emit_box and emit_unbox
2019-01-31 16:16:30 -08:00
Leonardo de Moura
7c3354f15f
feat(library/compiler/emit_cpp): emit_reset
2019-01-31 12:33:17 -08:00
Leonardo de Moura
d2cbf9584f
feat(library/compiler/emit_cpp): emit _apply instruction
2019-01-30 14:37:21 -08:00
Leonardo de Moura
bb43567273
fix(runtime/object): typos
2019-01-29 16:03:40 -08:00
Sebastian Ullrich
ead4e8998d
feat(library/init/lean/elaborator): elaborate constants
2018-12-19 15:04:48 +01:00
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