Commit graph

15646 commits

Author SHA1 Message Date
Leonardo de Moura
06bb9b7ea8 test(tests/compiler): add simple test for expr 2019-02-13 16:22:01 -08:00
Leonardo de Moura
9cb2005e8e feat(library/init/lean): add hash functions and dbg_to_string 2019-02-13 16:19:25 -08:00
Leonardo de Moura
6ccdd18260 feat(library/compiler/emit_cpp): initialize the whole system if main module depends directly/indirectly of lean. declarations 2019-02-13 16:16:43 -08:00
Leonardo de Moura
b89eb64cf1 refactor(library/init/lean/expr): use native constructors 2019-02-13 15:07:49 -08:00
Leonardo de Moura
811a480d77 feat(kernel/expr): low level API for expr 2019-02-13 14:59:18 -08:00
Leonardo de Moura
e10240fe5c refactor(runtime/io): use extern "C" for io primitives 2019-02-13 11:21:29 -08:00
Leonardo de Moura
71f5290567 feat(kernel): expose level primitives 2019-02-13 10:37:13 -08:00
Leonardo de Moura
90260e005e feat(library/compiler/emit_bytecode): ignore unknown decls
cc @kha
2019-02-13 10:31:52 -08:00
Leonardo de Moura
4627929a83 refactor(boot,runtime,util): move name runtime implementation to util/name, and use "extern C" ABI 2019-02-13 08:27:23 -08:00
Leonardo de Moura
b3f0ce5355 fix(kernel/runtime): use extern "C" 2019-02-13 08:04:47 -08:00
Leonardo de Moura
6afad35aac feat(library/compiler): emit extern "C" for extern/foreign dependencies when needed 2019-02-13 07:58:06 -08:00
Leonardo de Moura
19b6a5d0d1 chore(kernel): builtin => runtime
We don't need builtin.h anymore
2019-02-13 07:56:14 -08:00
Leonardo de Moura
d4dce78b0e chore(library/compiler): delete compiler/builtin module
It has been replaced with `compiler/extern_attribute`
2019-02-12 18:23:09 -08:00
Leonardo de Moura
008ac698d7 chore(boot): update 2019-02-12 18:18:18 -08:00
Leonardo de Moura
456ed23cc2 feat(library/init): use extern when declarating nat primitives 2019-02-12 18:12:29 -08:00
Leonardo de Moura
532a51b152 chore(boot): update 2019-02-12 17:58:52 -08:00
Leonardo de Moura
f41e4dac72 fix(frontends/lean): must set m_gen_code = false for auxiliary declarations of extern declarations
We cannot check the `[extern]` attribute because the auxiliary
declarations are compiled before we even define the main declaration
and set the attribute.
We should consider a better design in the future where we first define
all auxiliary and main definitions, then set the attributes, and then
compile the code.

cc @kha
2019-02-12 17:52:06 -08:00
Leonardo de Moura
cd4b8c0c28 fix(library/equations_compiler/unbounded_rec): it was ignored m_gen_code flag 2019-02-12 17:48:11 -08:00
Leonardo de Moura
64a2742859 chore(boot): update 2019-02-12 16:11:49 -08:00
Leonardo de Moura
a82eab824a fix(library/compiler/emit_cpp): skip inline and adhoc extern declarations 2019-02-12 16:05:49 -08:00
Leonardo de Moura
52db59eb87 fix(library/init/data/int/basic): nasty bug at int.repr 2019-02-12 15:58:59 -08:00
Leonardo de Moura
0e98f6bd66 chore(boot): update 2019-02-12 15:48:44 -08:00
Leonardo de Moura
09d194d5b7 feat(library/compiler): emit external declarations
We only skip `inline` and `adhoc` externs.
2019-02-12 15:42:59 -08:00
Leonardo de Moura
4df56faf6a chore(boot): update 2019-02-12 14:11:36 -08:00
Leonardo de Moura
888252b5db feat(library/private): more deterministic private names 2019-02-12 14:00:24 -08:00
Leonardo de Moura
88de217cb7 chore(library/init): remove version.lean.in
We are currently not using this file. In the future, we should
reintroduce it, but its functions should be implemented as builtins.
Thus, every `chore(boot): update` commit will not have to update it.
2019-02-12 11:57:09 -08:00
Leonardo de Moura
c8e8fbf840 chore(boot): update after rebase 2019-02-12 11:49:49 -08:00
Leonardo de Moura
425a4b70d1 feat(library/init/data/int/basic): use extern attribute, and fix div/mod mess
Now, int.div and int.mod behave like C++ `/` and `%` for int,
moreover, they satisfy

          (a/b)*b + (a%b) = a
2019-02-12 11:41:46 -08:00
Leonardo de Moura
f20c132ced feat(library/init/lean/elaborator): use extern attribute 2019-02-12 11:40:21 -08:00
Sebastian Ullrich
8e7faeeb5d chore(boot): update 2019-02-12 13:35:50 +01:00
Sebastian Ullrich
534b507aff feat(library/init/lean/frontend): rework error reporting 2019-02-12 13:34:32 +01:00
Leonardo de Moura
babaaed322 chore(library/compiler/builtin): add remark 2019-02-11 17:59:46 -08:00
Leonardo de Moura
6be47dfb97 feat(library/init/data/string/basic): use extern attribute 2019-02-11 17:54:24 -08:00
Leonardo de Moura
9675b7c952 fix(frontends/lean/elaborator): ignore mdata when processing field notation 2019-02-11 17:29:38 -08:00
Leonardo de Moura
e920faf76d chore(boot): update 2019-02-11 17:01:46 -08:00
Leonardo de Moura
73d590f1fb feat(library/init/io): use extern attribute 2019-02-11 16:56:54 -08:00
Leonardo de Moura
58783a2d3b fix(library/compiler/extern_attribute): bug at get_given_arity 2019-02-11 16:51:23 -08:00
Leonardo de Moura
d877bdf546 chore(boot): update 2019-02-11 16:19:30 -08:00
Leonardo de Moura
5a5e949578 feat(library/init/lean/name): use extern attribute 2019-02-11 16:12:25 -08:00
Leonardo de Moura
7b0227572f fix(library/init/core): missing borrowed annotation 2019-02-11 16:01:56 -08:00
Leonardo de Moura
c105da0d86 chore(boot): update 2019-02-11 15:57:05 -08:00
Leonardo de Moura
07ed77e724 fix(library/compiler/util): decidable A missing at mk_runtime_type 2019-02-11 15:51:09 -08:00
Leonardo de Moura
ccc4fe1468 fix(library/compiler/extract_closed): add new auxiliary declarations before 2019-02-11 15:40:22 -08:00
Leonardo de Moura
c27167f445 fix(library/compiler/ll_infer_type): use extern_attribute 2019-02-11 15:35:03 -08:00
Leonardo de Moura
9c3675f58f feat(library/init/data): use extern when declaring uint and usize primitives 2019-02-11 15:15:57 -08:00
Leonardo de Moura
03ecc363a0 fix(library/compiler/util): missing case 2019-02-11 15:14:02 -08:00
Leonardo de Moura
6bc23bcc65 feat(library/compiler/extern_attribute): infer ll_type, arity and borrowed flags from type 2019-02-11 14:57:13 -08:00
Leonardo de Moura
8acb2d4ed8 chore(library/compiler): minor modifications before builtin ==> extern refactor 2019-02-11 13:29:39 -08:00
Leonardo de Moura
bc4e06666b chore(*): avoid 0-ary extern declarations 2019-02-11 13:21:17 -08:00
Leonardo de Moura
57ed6fea3a chore(boot): update 2019-02-11 12:54:41 -08:00