Commit 1306a415 authored by 李晓奇's avatar 李晓奇

update report

parent 698a4326
# 重现问题
> 这个在运行py脚本或者gdb运行时不会出现。
>
> 只有单独使用`cminusfc`生成可执行文件会出错。
- 构建`cminusfc`
- ```
$ # at path `2022fall-compiler_cminus`
$ cd tests/3-ir-gen/testcases/lv3/
$ cminusfc complex4.cminus
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::erase: __pos (which is 18446744073709551615) > this->size() (which is 8)
[1] 22357 IOT instruction (core dumped) cminusfc complex4.cminus
```
# 实验说明 # 实验说明
请 fork 此 repo 到自己的仓库下,随后在自己的仓库中完成实验,请确保自己的 repo 为 Private。
## 目前已布置的实验 ## 目前已布置的实验
* [lab1](./Documentations/1-parser/) * [lab1](./Documentations/1-parser/)
+ DDL:2022-10-03 23:59:59 (UTC+8) + DDL:2022-10-03 23:59:59 (UTC+8)
- [report](./report/1-parser/)
* [lab2](./Documentations/2-ir-gen-warmup/) * [lab2](./Documentations/2-ir-gen-warmup/)
+ DDL:2022-10-23 23:59:59 (UTC+8) + DDL:2022-10-23 23:59:59 (UTC+8)
- [report](./report/2-ir-gen-warmup/report.md)
* [lab3](./Documentations/3-ir-gen/) * [lab3](./Documentations/3-ir-gen/)
+ DDL:2022-11-07 23:59:59 (UTC+8) + DDL:2022-11-07 23:59:59 (UTC+8)
- [report](./report/3-ir-gen/report.md)
## FAQ: How to merge upstream remote branches ## FAQ: How to merge upstream remote branches
......
1-parser/*.pdf 1-parser/*.pdf
2-ir-gen-warmup/*.pdf 2-ir-gen-warmup/*.pdf
3-ir-gen/*.pdf
This diff is collapsed.
...@@ -313,9 +313,6 @@ void CminusfBuilder::visit(ASTCompoundStmt &node) { ...@@ -313,9 +313,6 @@ void CminusfBuilder::visit(ASTCompoundStmt &node) {
// You may need to add some code here // You may need to add some code here
// to deal with complex statements. // to deal with complex statements.
/* auto bb = BasicBlock::create(builder->get_module(), "", cur_fun);
* builder->create_br(bb);
* builder->set_insert_point(bb); */
scope.enter(); scope.enter();
for (auto &decl : node.local_declarations) { for (auto &decl : node.local_declarations) {
...@@ -714,11 +711,6 @@ void CminusfBuilder::visit(ASTCall &node) { ...@@ -714,11 +711,6 @@ void CminusfBuilder::visit(ASTCall &node) {
else else
error_exit("BUG HERE: function param needs weird pointer type"); error_exit("BUG HERE: function param needs weird pointer type");
/* if (not Type::is_eq_type(param_type->get_pointer_element_type(),
* cur_value->get_type()->get_pointer_element_type()->get_array_element_type()))
* error_exit("expected right pointer type");
* // int[] to int* or float[] to flot*
* cur_value = builder->create_gep(cur_value, {CONST_INT(0), CONST_INT(0)}); */
} else if (param_type->is_integer_type() or param_type->is_float_type()) { } else if (param_type->is_integer_type() or param_type->is_float_type()) {
// need type cast between int and float // need type cast between int and float
if (not cur_value->get_type()->is_integer_type() and not cur_value->get_type()->is_float_type()) if (not cur_value->get_type()->is_integer_type() and not cur_value->get_type()->is_float_type())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment