Changeset a065f1f for src/AST


Ignore:
Timestamp:
Sep 20, 2022, 8:37:17 PM (3 years ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
53a768d
Parents:
4520b77e (diff), ef1da0e2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/AST
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Print.cpp

    r4520b77e ra065f1f  
    9090
    9191                static constexpr auto Qualifiers = make_array<const char*>(
    92                         "const", "restrict", "volatile", "lvalue", "mutex", "_Atomic"
     92                        "const", "restrict", "volatile", "mutex", "_Atomic"
    9393                );
    9494        };
     
    16351635constexpr array<const char*, 3> Printer::Names::FuncSpecifiers;
    16361636constexpr array<const char*, 6> Printer::Names::StorageClasses;
    1637 constexpr array<const char*, 6> Printer::Names::Qualifiers;
     1637constexpr array<const char*, 5> Printer::Names::Qualifiers;
    16381638}
  • src/AST/Type.hpp

    r4520b77e ra065f1f  
    412412                std::string typeString() const { return std::string("_") + std::to_string(formal_usage) + "_" + std::to_string(expr_id) + "_" + base->name; }
    413413                bool operator==(const TypeEnvKey & other) const { return base == other.base && formal_usage == other.formal_usage && expr_id == other.expr_id; }
    414 
    415414        };
    416415
  • src/AST/TypeEnvironment.hpp

    r4520b77e ra065f1f  
    5656struct AssertCompare {
    5757        bool operator()( const VariableExpr * d1, const VariableExpr * d2 ) const {
     58                auto kind1 = ast::SymbolTable::getSpecialFunctionKind(d1->var->name);
     59                auto kind2 = ast::SymbolTable::getSpecialFunctionKind(d2->var->name);
     60                // heuristics optimization: force special functions to go last
     61                if (kind1 > kind2) return true;
     62                else if (kind1 < kind2) return false;
     63
    5864                int cmp = d1->var->name.compare( d2->var->name );
    5965                return cmp < 0 || ( cmp == 0 && d1->result < d2->result );
  • src/AST/module.mk

    r4520b77e ra065f1f  
    2424        AST/Copy.cpp \
    2525        AST/Copy.hpp \
     26        AST/Create.cpp \
     27        AST/Create.hpp \
    2628        AST/CVQualifiers.hpp \
    2729        AST/Decl.cpp \
Note: See TracChangeset for help on using the changeset viewer.