Commit graph

52 commits

Author SHA1 Message Date
Leonardo de Moura
faf70ed58c feat(library/vm/vm): add support for declaring builtin cfunctions 2016-05-31 16:48:11 -07:00
Leonardo de Moura
25903645a7 feat(library/vm/vm): add some sanity checking 2016-05-31 16:29:01 -07:00
Leonardo de Moura
e843062be7 feat(library/vm/vm): add support to builtin c-like functions that use the system stack to pass arguments 2016-05-31 16:19:43 -07:00
Leonardo de Moura
3a4a2828d2 chore(library/vm): style 2016-05-26 12:57:34 -07:00
Leonardo de Moura
e89082a97e feat(library/vm,library/init): add builtin timeit primitive for profiling 2016-05-26 12:44:49 -07:00
Leonardo de Moura
93ca755e56 fix(library/vm/vm): vm::execute 2016-05-26 12:41:40 -07:00
Leonardo de Moura
cc4b70e5e5 feat(library/vm/vm_nat): add native support for nat.to_string 2016-05-26 10:55:22 -07:00
Leonardo de Moura
05837a2558 refactor(library/vm): move vm_obj <=> string conversion functions to separate module 2016-05-26 10:47:19 -07:00
Leonardo de Moura
53811822d4 chore(*): style 2016-05-25 18:10:15 -07:00
Leonardo de Moura
bf2d2b9feb fix(library/vm,library/compiler,frontends/lean): IO monad support 2016-05-25 13:30:43 -07:00
Leonardo de Moura
e40c54013a feat(library/vm): add basic support for IO monad 2016-05-24 17:52:22 -07:00
Leonardo de Moura
fd1141d999 fix(library/vm/vm,library/compiler/vm_compiler): invoke n ==> apply
This change fixes a bug in the VM and simplifies the VM instruction semantics.
2016-05-23 16:45:42 -07:00
Leonardo de Moura
c3805a9a81 fix(library/vm/optimize): bytecode optimization 2016-05-23 14:35:10 -07:00
Leonardo de Moura
17e3223467 chore(library/vm/vm): add debugging helper procedure 2016-05-23 14:14:43 -07:00
Leonardo de Moura
76942ae150 fix(kernel,library): OSX warnings 2016-05-13 21:33:40 -07:00
Leonardo de Moura
af1908be94 feat(frontends/lean/decl_cmds): do not generate warning for definitions that are implemented in the VM 2016-05-13 18:17:20 -07:00
Leonardo de Moura
423d129105 feat(library/vm/vm): bytecode serialization 2016-05-13 17:51:01 -07:00
Leonardo de Moura
7242de7238 feat(library/vm/vm): improve vm_obj pretty printer 2016-05-13 16:16:31 -07:00
Leonardo de Moura
6142fbb1c6 feat(library/vm/vm): check interruptions and memory at invocation 2016-05-13 15:38:48 -07:00
Leonardo de Moura
9e7d8c10ae perf(library/vm/vm): small optimizations 2016-05-13 15:33:58 -07:00
Leonardo de Moura
0c0dec8aa6 feat(library/vm/vm): use small object allocator for VM objects 2016-05-13 14:56:53 -07:00
Leonardo de Moura
f75caddc35 feat(library/vm/vm): rename cases1 to destruct 2016-05-13 12:30:47 -07:00
Leonardo de Moura
4f53cfe5e8 fix(library/vm/vm): std::copy issue 2016-05-13 12:22:28 -07:00
Leonardo de Moura
00bc55af3e feat(library/vm/vm): improve trace 2016-05-13 12:13:47 -07:00
Leonardo de Moura
dc3d7597ee chore(library/vm/vm): document VM instructions 2016-05-13 11:54:11 -07:00
Leonardo de Moura
56ec91284b chore(library/vm/vm): cleanup 2016-05-13 11:06:25 -07:00
Leonardo de Moura
35cf7bf8e2 feat(library/vm/vm): remove atomic from VM object reference counter
VM objects should not be shared between different threads.
So, the atomic<unsigned> in the reference counter produces an
unnecessary performance penalty.
2016-05-13 11:00:33 -07:00
Leonardo de Moura
2bd400964c feat(library/vm/vm): store arguments in reverse order on the stack
It simplifies the code for handling closures.
2016-05-13 10:54:29 -07:00
Leonardo de Moura
dbcd609aff feat(library/vm/vm): disable VM trace in release mode 2016-05-13 10:33:25 -07:00
Leonardo de Moura
039e960799 feat(library/vm/vm): add InvokeBuiltin instruction 2016-05-13 10:28:05 -07:00
Leonardo de Moura
2c0dee5b41 feat(library/vm/vm): cases2 and casesn take pc of first branch too 2016-05-13 10:15:20 -07:00
Leonardo de Moura
7bdf2d4a5a feat(library/vm/vm): avoid macros 2016-05-13 09:50:07 -07:00
Leonardo de Moura
990d2dc06e fix(library/vm/vm): typo 2016-05-13 00:45:18 -07:00
Leonardo de Moura
b8b32c2a3b fix(library/vm/vm): typo 2016-05-13 00:43:09 -07:00
Leonardo de Moura
843f3a69ba fix(library/vm/vm): memory management 2016-05-13 00:29:20 -07:00
Leonardo de Moura
46c50831fd fix(library/vm/vm): initialization bug 2016-05-12 23:43:44 -07:00
Leonardo de Moura
06039d95b4 feat(library/vm/vm): add tracing 2016-05-12 23:43:30 -07:00
Leonardo de Moura
8a0b2534bb fix(library/vm/vm): builtin function invocation 2016-05-12 19:35:28 -07:00
Leonardo de Moura
a533cc56ec fix(library/vm/vm_nat): typo 2016-05-12 19:34:06 -07:00
Leonardo de Moura
38320fa07c refactor(library/vm/vm): use locals 2016-05-12 19:06:14 -07:00
Leonardo de Moura
505ab4c0ba fix(library/vm/vm): uninit var
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2016-05-12 19:03:32 -07:00
Leonardo de Moura
4e9cafb67f feat(library/vm/vm): add missing swap 2016-05-12 19:01:25 -07:00
Leonardo de Moura
682407b54d fix(library/vm/vm): incorrect assertion 2016-05-12 18:59:18 -07:00
Leonardo de Moura
8a8cafdcdb fix(library/vm/vm): support for builtin functions 2016-05-12 18:56:13 -07:00
Leonardo de Moura
474737bfb9 feat(library/vm/vm): add very basic display for vm_obj 2016-05-12 18:42:17 -07:00
Leonardo de Moura
6febe9677d feat(library/vm/vm): add main loop 2016-05-12 18:36:29 -07:00
Leonardo de Moura
9fbf3f2921 feat(library/vm): encode small numerals using scnstr instead of num operation 2016-05-12 16:43:21 -07:00
Leonardo de Moura
de327c0c20 feat(library/vm/vm_nat): add builtin support for nat lt 2016-05-12 16:36:37 -07:00
Leonardo de Moura
1393238c9d fix(library/vm/vm_nat): fix constant name 2016-05-12 15:29:14 -07:00
Leonardo de Moura
c48a17563c feat(library/vm/optimize): add basic bytecode optimizations 2016-05-12 15:24:58 -07:00