Commit Graph

64 Commits

Author SHA1 Message Date
tali 605698e13b pretty print vtables (again) 2023-12-23 14:35:55 -05:00
tali f3954e6ca5 refactor interpreter to use bytecode graph 2023-12-23 14:35:55 -05:00
tali 31da3529a5 bytecode graph ir 2023-12-23 14:35:55 -05:00
tali d8df7e1eac rust fmt ... 2023-12-21 18:36:40 -05:00
tali d66b336435 rework the interpreted bc to resemble the prospective actual bc 2023-12-21 18:13:26 -05:00
tali 12a519cfd7 completely redo bytecode format and decoder 2023-12-21 14:00:57 -05:00
tali 18cc66697e rust decoder POC 2023-12-17 16:21:44 -05:00
tali 80f5ab654b ocaml encoder POC 2023-12-17 16:21:44 -05:00
tali 509ccc132d rust opcodes 2023-12-17 16:21:44 -05:00
tali d65bef661e wip bytecode format specification in rust 2023-12-16 15:01:30 -05:00
tali 5ebb404276 comments 2023-12-14 16:13:34 -05:00
tali c080982044 implement closure conversion on Ir.id's 2023-12-13 19:19:19 -05:00
tali c986aa6ec0 env cons-list instead of tree structure 2023-12-13 18:22:55 -05:00
tali 752d36d855 deny referencing variables outside of captured scope 2023-12-13 18:16:23 -05:00
tali 21bc2c3cb3 newlines are overrated am i right 2023-12-13 17:38:30 -05:00
tali 37377c044d rename Ir.compile_lambda => lower_lambda 2023-12-13 17:37:19 -05:00
tali fab3b76d9c add slightly buggy closures; methods can access self fields 2023-12-13 17:33:32 -05:00
tali 6837ee414f restore support for stdlib functions 2023-12-13 17:27:06 -05:00
tali 884570598c Bop codegen "optimization" (?) 2023-12-13 17:24:20 -05:00
tali be83ca2177 codegen method arguments 2023-12-13 17:16:57 -05:00
tali c61c1d4e25 prefix the debug logs 2023-12-13 17:16:38 -05:00
tali d7bb317e2b fix Ir.Bop codegen bugs 2023-12-13 17:13:30 -05:00
tali 22a11c7e47 add recursive bytecode printout for vtables 2023-12-13 17:12:40 -05:00
tali a3f92e5621 improve code pretty printer 2023-12-13 16:59:54 -05:00
tali dd27dc04d2 reimplement bc compiler to utilize a simpler intermediate repr 2023-12-13 16:40:44 -05:00
tali 898cf7380c change LOC ins pretty printer 2023-12-07 12:54:17 -05:00
tali 10f5a5a6e2 fix binop codegen 2023-12-07 12:34:50 -05:00
tali 1aa704fa49 add back bcc with support for simple functions 2023-12-06 22:25:35 -05:00
tali d7bf73a17c change RET instruction to take an argument 2023-12-06 22:25:16 -05:00
tali 44406a233e add back CALl instruction 2023-12-06 22:20:59 -05:00
tali c51b482607 big clean up of Code, Interp, removed all of Bcc 2023-12-06 21:49:54 -05:00
tali ec9dffc780 ocp-indent no maximum 2023-12-02 17:16:45 -05:00
tali 1da782920e added nil, true, false literals to the parser! 2023-12-02 17:04:14 -05:00
tali 333b8e7450 switch formatter to ocp-indent 2023-12-02 17:02:40 -05:00
tali d523c5c997 slightly improve pretty printing 2023-12-02 16:12:51 -05:00
tali 88fff1c119 add standard library / initial environment 2023-12-02 16:08:29 -05:00
tali ffbe99061f compile basic function calls 2023-12-02 16:06:36 -05:00
tali 62cf27b0c7 refactor codegen emitting slot indices 2023-12-02 15:36:53 -05:00
tali 0460e6b646 refactor handling slot/method indices 2023-12-02 15:31:29 -05:00
tali 24409f7902 add named fields and preliminary method support 2023-12-02 13:51:15 -05:00
tali b018c83782 rename Spice.Syn -> Spice.Ast 2023-12-02 13:50:24 -05:00
tali 59de107878 regenerated spice.opam i guess 2023-12-02 13:49:36 -05:00
tali 32b3eda926 refactor 'stack pointer' manip to be a parameter instead of a ref 2023-11-30 17:27:47 -05:00
tali fd3b356699 compile scope expressions 2023-11-30 14:01:40 -05:00
tali c089d893c6 fix eval true/false :O 2023-11-30 13:57:18 -05:00
tali 2bdb1511ab add GRT instruction and implement missing comparators 2023-11-30 13:57:18 -05:00
tali b89ddd45b5 don't warning -26 2023-11-30 13:16:04 -05:00
tali 22b0ce775d compile if expressions into conditional branches 2023-11-29 23:06:12 -05:00
tali 58827f230d prettier printing for basic block labels 2023-11-29 23:06:07 -05:00
tali 5a7ae5d5a4 add exp parenthesis syntax (FIXME: shift/reduce conflict!) 2023-11-29 23:04:55 -05:00