コード例 #1
0
std::shared_ptr<StatementList> CIRTreeLinearizatior::Linearize(StatementPtr statement) {
    collectStmList = false;
    statement->Accept(this);
    collectStmList = true;
    currSEQ->Accept(this);
    return currStmList;
}
コード例 #2
0
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;
}