-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 创建一个Playground 开始写trans_func_impl(把AST函数定义翻译成ANF函数定义) 目前func_label和func_body都是dummy value * [mmzk] (feat) 使用gen_label生成func_label * Add (preprocess(pps ppx_deriving.show)) * Add [@@deriving show] for all AST types * deriving shows * Playground works * [mmzk] (refactor)把ANF逻辑放到IR文件夹下 * parser bug不知怎么好像又好了( * 把Playground中的逻辑拆进Conversion.ml * [mmzk] (fix) 修复编译问题 * anf expr trans * expr variable trans * 处理trans_stmt的StmtSeq分支 * 实现StmtSeq的IR转换 * trans_expr_assign draft * 将context改成var_table * 将continuation换成program -> program的函数 * Can translate single return : / * simplify ANF IR * setup ANF conversion framework * properly show source span * setup test framework * translate [let] & improve test * translate [if] * nicer output of ANF IR * translate variables and binary op * add some comments * translate [while] * add tag to ADT label * basic pattern matching compiler * hand-written pretty printer for ANF * add index information to struct fields * translate struct patterns * optimize: stop matching when first row is irrefutable * translate literal pattern * update to nix flake * add comment to match compiler & bugfix * 为loop增加break label 实现continue * fix comment typo * 更新test文件 * trans_stmt中记录当前level的所有label * 实现break * 增加continue的test case * 在注释中修改loop的形状 此前的loop形状有问题 * 修正break和continue的tests * unop * Implement traverse_expr * tuple * tuple * tuple again --------- Co-authored-by: chinesebear <[email protected]> Co-authored-by: Guest0x0 <[email protected]>
- Loading branch information
1 parent
ca53a73
commit ba22304
Showing
25 changed files
with
1,841 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ _build | |
.DS_Store | ||
*.bak | ||
*.o | ||
flake.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.