Leonardo de Moura
abd0f89820
feat(runtime): avoid extra switch
2019-02-23 17:35:21 -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
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
d2cbf9584f
feat(library/compiler/emit_cpp): emit _apply instruction
2019-01-30 14:37:21 -08: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
0b349f1abf
chore(*): fix style
2018-08-21 09:32:01 -07:00
Sebastian Ullrich
37e5f03351
refactor(library/system/io): move into init
2018-08-21 08:43:09 -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
2944f7a027
chore(runtime): lean_obj.* ==> object.*
2018-05-20 10:17:15 -07:00
Leonardo de Moura
2d604e7d25
chore(runtime/lean_obj): remove lean_ prefix
2018-05-20 10:13:44 -07:00
Leonardo de Moura
a4583e23ea
chore(gen/apply): fix bogus style warning
2018-05-17 16:09:20 -07:00
Leonardo de Moura
74b7ae0734
fix(runtime/apply): the trick to avoid alloca is not thread safe
2018-05-17 13:34:00 -07:00
Leonardo de Moura
ba1d050134
chore(gen/apply): line break
2018-05-17 13:11:47 -07:00
Leonardo de Moura
53d459911f
refactor(library/init/lean/ir): RC instructions
2018-05-16 10:28:51 -07:00
Leonardo de Moura
0556412f8d
refactor(*): add runtime folder
...
@kha The runtime folder includes what is needed to link a
standalone Lean program. It is still contains some unnecessary files.
We will be able to remove them after we release Lean4.
2018-05-14 14:23:56 -07:00
Leonardo de Moura
4fa1022388
fix(gen/apply): emit #pragma once
2018-05-14 11:08:45 -07:00
Leonardo de Moura
fbac1d45a3
refactor(library/init/control/combinators): move nat.mrepeat to combinators
2018-05-13 11:34:39 -07:00
Leonardo de Moura
5c3cbbf2cd
feat(library/init/lean): add lean.closure_max_args
2018-05-13 08:40:46 -07:00
Leonardo de Moura
1ab4c9f8bf
feat(gen/apply): simplify over-application case and avoid quadratic blowup
...
The over-application doesn't occur very often in practice.
The new version adds an extra "copy" step, but it avoids the quadratic
blowup in code size.
Xavier Leroy reports that only 5% of all calls are over-applications
in his experiments.
In Lean3, 6.59% of all calls performed to compile corelib are "over",
and we did not implement any fancy optimization.
2018-05-12 15:10:26 -07:00
Leonardo de Moura
d02c36df18
chore(gen/apply): style
2018-05-11 18:01:58 -07:00
Leonardo de Moura
1d69493b83
feat(gen/apply): add generator for apply
...
It generates the functions at `util/apply.h` that are used by
the Lean runtime.
2018-05-11 17:54:09 -07:00