Leonardo de Moura
16c0e62fa1
feat(library/compiler/emit_cpp): emit main
2019-02-06 14:34:52 -08:00
Leonardo de Moura
b85f4aac88
feat(library/compiler/extname): add validation
2019-02-06 13:24:42 -08:00
Leonardo de Moura
a8e2e535a2
feat(library/compiler): preserve the arity of entry points
2019-02-06 12:58:18 -08:00
Leonardo de Moura
b4a7bb4f4c
refactor(library/compiler): [cppname] ==> [extname]
...
We will use this atttribute for all backends.
2019-02-06 12:53:12 -08:00
Leonardo de Moura
722b7663a4
chore(boot): update
...
@kha note that the previous commit produced a small code bloat here.
The code bloat seems reasonable and affects definitions such as:
```
@[inline] protected def max : rbmap α β lt → option (α × β)
| ⟨t, _⟩ :=
match t.max with
| some ⟨k, v⟩ := some (k, v)
| none := none
```
Before previous commit, while compiling `max` we would not know it is
marked as `[inline]`. Thus, we would not inline `max._main` into
`max`. Now, we do.
I believe this is not a big deal since functions marked as `[inline]`
are supposed to be small.
2019-02-06 12:37:47 -08:00
Leonardo de Moura
f38de694b0
feat(frontends/lean/definition_cmds): compile code after attributes have been applied
...
@kha do you see any problem with this change?
2019-02-06 12:14:53 -08:00
Leonardo de Moura
9dd1ba6671
chore(boot): update
2019-02-06 10:58:03 -08:00
Leonardo de Moura
d103ff70fe
feat(library/compiler): avoid cnstr_set_scalar when possible
2019-02-06 10:49:58 -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
Sebastian Ullrich
57b2607463
fix(library/compiler/specialize): declare specialized functions before caller
2019-02-06 09:36:36 -08:00
Sebastian Ullrich
58830be91f
chore(library/compiler/emit_cpp): ignore warnings under GCC
2019-02-06 09:35:51 -08:00
Sebastian Ullrich
34110945f2
refactor(library/compiler/llnf): replace is_runtime_builtin_cnstr with just is_builtin_constant
2019-02-06 09:35:16 -08:00
Sebastian Ullrich
11860a65eb
fix(library/compiler/emit_cpp): replace constructor tag on reuse
2019-02-06 09:34:14 -08:00
Sebastian Ullrich
eb85081a03
fix(library/compiler/emit_cpp): let y = f x; let z = ...; y is not a tail call
2019-02-06 09:33:38 -08:00
Leonardo de Moura
2b67c38718
chore(boot): update
2019-02-05 17:07:22 -08:00
Leonardo de Moura
a35a951374
chore(library/compiler/emit_cpp): add uint* aliases
2019-02-05 17:01:10 -08:00
Leonardo de Moura
ed1b101dd2
doc(doc/examples/compiler): new example
2019-02-05 16:50:12 -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
914b023920
feat(library/compiler): treat decidable as an enumeration type
...
Before this commit, `decidable` was not being treated as an
enumeration type, and this was very inconvenient because `bool` and
`decidable` were using a different representation at runtime.
This commit does not complete the modification. We still have to
regenerate `boot`, and then fix the builtin declarations at `runtime`.
cc @kha
2019-02-05 16:08:23 -08:00
Leonardo de Moura
cfa21d6875
chore(boot): update
2019-02-05 14:41:42 -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
103a616f57
chore(boot): update
2019-02-05 13:42:02 -08:00
Leonardo de Moura
ff54bf337a
fix(library/init/data/repr): ultra inefficient to_digits
...
It was very inefficient, and was producing stack overflows for big numbers.
2019-02-05 13:36:13 -08:00
Leonardo de Moura
60c8b1870e
chore(boot): update
2019-02-05 13:08:59 -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
f17101cfbe
chore(src/CMakeLists): update version number
2019-02-05 10:15:11 -08:00
Leonardo de Moura
fe3be7a80d
chore(boot): update
2019-02-04 16:23:38 -08:00
Leonardo de Moura
c5b0258e49
feat(library/compiler/util): do not box unit
2019-02-04 16:19:48 -08:00
Leonardo de Moura
a6645645e3
chore(boot): update
2019-02-04 16:07:31 -08:00
Leonardo de Moura
e57401232c
fix(library/compiler/emit_cpp): bug at emit 0-ary constructor of non enum type (e.g., list.nil)
2019-02-04 16:07:31 -08:00
Leonardo de Moura
16f6da6a62
chore(boot): update
2019-02-04 15:28:15 -08:00
Leonardo de Moura
7c355d3ba6
feat(library/compiler): thunk support
2019-02-04 15:22:18 -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
fc4505884b
chore(boot): update
2019-02-04 12:56:11 -08:00
Leonardo de Moura
4d66836255
fix(library/compiler/llnf): bug at process_cases
...
We should not decrement the RC of borrowed variables.
2019-02-04 12:51:51 -08:00
Leonardo de Moura
7eb9c46bc6
fix(library/compiler): functions marked as @[noinline] were not being replaced by their reduced arity version
2019-02-04 12:23:37 -08:00
Leonardo de Moura
4696f603e2
chore(boot): update
2019-02-04 10:36:02 -08:00
Leonardo de Moura
25ec21b498
feat(library/compiler/name_mangling): new name mangling procedure that produces more readable output
2019-02-04 10:31:38 -08:00
Leonardo de Moura
5b3f3178ae
feat(src/CMakeLists): copy static library to bin directory
2019-02-04 09:55:22 -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
b4a78a0280
chore(src/boot): update
2019-02-03 19:22:01 -08:00
Leonardo de Moura
67f4fb603d
chore(library/compiler/emit_cpp): unnecessary line break
2019-02-03 19:19:01 -08:00
Leonardo de Moura
79e8358f9c
fix(library/compiler/emit_cpp): tail call optimization
2019-02-03 19:16:50 -08:00
Leonardo de Moura
628c377673
chore(src/boot): update
2019-02-03 10:45:48 -08:00
Leonardo de Moura
e5e245d0f2
chore(library/compiler/emit_cpp): missing space
2019-02-03 10:41:41 -08:00
Leonardo de Moura
b5f20f0b73
chore(src/boot): update
2019-02-03 10:38:57 -08:00
Leonardo de Moura
5aab81d773
chore(library/compiler/emit_cpp): ignore unused labels
2019-02-03 10:37:34 -08:00
Leonardo de Moura
73f4100a46
feat(library/compiler/emit_cpp): tail call optimization
2019-02-03 10:31:39 -08:00