std::shared_ptr<StatementList> CIRTreeLinearizatior::Linearize(StatementPtr statement) {
    collectStmList = false;
    statement->Accept(this);
    collectStmList = true;
    currSEQ->Accept(this);
    return currStmList;
}
CodeGeneration::CCode CIRTreeCodeGenerator::Generate(StatementPtr ptr, const std::vector<Temp::CTempPtr>& args) {
    code.clear();
    code.emplace_back(new OPER("// define args operator", {}, args));
    isStartLabel = true;
    argsOnStack = &args;
    ptr->Accept(this);
    return std::move(code);
}
Пример #3
0
std::shared_ptr<StatementList> CIRTreeLin::Linearize(StatementPtr statement) {
    currStmList = nullptr;
    isLastSEQ = false;
    statement->Accept(this);
    return currStmList;
}