Sebastian Ullrich
7718795178
fix: mark Lean objects in C++ globals reachable from the new frontend as persistent
...
sed -Ei 's/(g_\w+)\s*= new (name|expr|format|level|string_ref)\W.*;/\0\n mark_persistent(\1->raw());/' src/kernel/**/*.cpp src/util/**/*.cpp src/library/**/*.cpp
2020-10-11 17:43:28 +02:00
Sebastian Ullrich
e946aa9135
fix: interpreter thread-unsafety
2020-09-14 17:57:33 +02:00
Leonardo de Moura
7c76a19885
chore: fix includes
2020-05-22 14:17:25 -07:00
Leonardo de Moura
8bdca35282
chore: use #include <lean/runtime/...> for runtime .h files
2020-05-18 11:30:07 -07:00
Sebastian Ullrich
e971c8dd7a
feat: support Float in the interpreter
...
/cc @leodemoura @dselsam
2020-04-05 10:50:30 +02:00
Sebastian Ullrich
d7170df527
feat: interpreter: print stacktrace on stack overflow
2020-03-14 15:08:03 -07:00
Sebastian Ullrich
e30717a85a
fix: interpreter::call_boxed on unboxed constants
2020-03-14 15:04:38 -07:00
Leonardo de Moura
021d906542
fix: remove filler fields (part 2)
2020-02-27 10:02:26 -08:00
Leonardo de Moura
1fb7a3a208
fix: position of first Bool field
2020-02-25 14:05:53 -08:00
Leonardo de Moura
9095f3caa0
chore: update stage0
2020-02-25 13:53:08 -08:00
Leonardo de Moura
1305824b03
chore: add get_bool_field helper function
...
Motivation: help us to adjust the code when we modify the position of
scalar fields.
2020-02-25 13:43:06 -08:00
Sebastian Ullrich
47f3d54acb
fix: interpreter: do not consume values in explicit unbox instructions
2020-02-06 09:36:19 -08:00
Sebastian Ullrich
2791cdf326
fix: interpreter::call_boxed: support under-application
...
/cc @leodemoura
2020-01-01 21:15:05 +01:00
Leonardo de Moura
73e114c6a2
chore: remove unnecessary argument
2020-01-01 09:19:00 -08:00
Sebastian Ullrich
b439de68a5
feat: support nested interpreter executions and make sure closures are run in compatible environments
...
/cc @leodemoura
2019-12-31 00:07:45 +01:00
Leonardo de Moura
28a4859832
feat: expose evalConst
...
@Kha Could you please check `lean_eval_const`?
2019-12-30 11:41:36 -08:00
Sebastian Ullrich
a2d668ec99
fix: leaks
2019-12-22 17:24:57 -08:00
Sebastian Ullrich
3b37737c8a
fix: leaks
2019-12-22 15:09:19 -08:00
Sebastian Ullrich
948b0bf1f1
fix: interpreter::call_boxed: support over-application
...
MetaHasEval instances were not fully eta-expanded
2019-12-05 13:21:08 +01:00
Sebastian Ullrich
1afd3b9d01
refactor: interpreter::run_main: use call_boxed
2019-12-05 13:21:08 +01:00
Sebastian Ullrich
44ce73ced9
refactor: call generated boxed wrapper instead of reinventing it in the interpreter
2019-12-05 13:21:08 +01:00
Sebastian Ullrich
e3e50b7940
chore: rename confusing interpreter function
2019-12-05 13:21:08 +01:00
Sebastian Ullrich
c93fb5c4b2
chore: interpreter: rename misleading accessor
2019-11-19 09:36:59 +01:00
Leonardo de Moura
043e011b72
fix: bug at USet
...
@Kha: I found the bug. The issue was at `USet`. The argument is a
usize scalar. So, we should use `var` instead of `eval_arg`.
2019-11-18 19:51:53 -08:00
Leonardo de Moura
39e8499c7b
fix: new offset at param_borrow
2019-10-11 16:27:29 -07:00
Leonardo de Moura
02ab51505c
fix: adjust ir_interpreter
...
IRType is not a scalar type anymore.
2019-10-11 15:00:26 -07:00
Sebastian Ullrich
ce558b6a9e
doc(library/compiler/ir_interpreter): update docs
2019-09-20 10:46:33 +02:00
Sebastian Ullrich
31c170117e
feat(frontends/lean/builtin_cmds,library/compiler/ir_interpreter): reimplement #eval
2019-09-19 17:52:18 +02:00
Sebastian Ullrich
61819bee6d
refactor(library/compiler/ir_interpreter): make box_t/unbox_t total
2019-09-19 17:51:51 +02:00
Sebastian Ullrich
a083cab532
fix(library/compiler/ir_interpreter): fix UB sequencing found by GCC
2019-09-17 09:51:24 +02:00
Sebastian Ullrich
a1bc3164e8
refactor(library/compiler/ir_interpreter): remove case type inference
2019-09-12 18:38:10 +02:00
Sebastian Ullrich
6c4976e044
perf(library/compiler/ir_interpreter): push_frame: avoid frame copy
...
6.4% speedup on unionfind
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
7c6668d5c2
perf(library/compiler/ir_interpreter): no need for decl lookup at tail recursion
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
8dd851d64f
perf(library/compiler/ir_interpreter): cache environment lookup in existing symbol cache
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
0c71a493d0
feat(library/compiler/ir_interpreter): check system at the start of each function
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
ea9a5de498
fix(library/compiler/ir_interpreter): values of unboxed types should be stored unboxed
...
We previously boxed all such values to `object *`s. However, because this does not correspond to the IR types, there are
no `dec` instructions to actually free these values.
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
79588d2ce6
refactor(library/compiler/ir_interpreter): replace C++ template with Python template
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
944de141d3
perf(library/compiler/ir_interpreter): use specialized stubs
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
693fc63702
fix(library/compiler/ir_interpreter): constants do not have to be persistent anymore, so stop leaking them
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
8da203b91a
perf(compiler/ir_interpreter): do not allocate temp closure for saturated partial applications
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
237e4a4489
feat(library/compiler/ir_interpreter): multi-threading support
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
daae0f67bb
fix(library/compiler/ir_interpreter): --run ignored first argument
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
c23e6829c0
refactor(library/compiler/ir_interpreter): move constant caching into load
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
2d04ecc704
refactor(util/object_ref): move and adjust cnstr_get_ref_t
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
3ee59aa17f
feat(library/compiler/ir_interpreter): add Windows support
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
1732461a66
doc(library/compiler/ir_interpreter): add a few comments
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
d27cbe2dc5
perf(library/compiler/ir_interpreter): cache symbol lookup
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
2d4276e819
feat(library/compiler/ir_interpreter): tail recursion
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
bdb7152768
feat(library/compiler/ir_interpreter): cache constants
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
9015fc1e34
chore(library/compiler/ir_interpreter): add step-level trace
2019-09-12 18:26:15 +02:00