Changeset 25a1cb0 for src


Ignore:
Timestamp:
Sep 1, 2020, 1:18:10 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
86c1f1c3, a77496cb
Parents:
8d8ac3b (diff), d3aa64f1 (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
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r8d8ac3b r25a1cb0  
    705705                        new KeywordCastExpr(
    706706                                get<Expression>().accept1(node->arg),
    707                                 castTarget
     707                                castTarget,
     708                                {node->concrete_target.field, node->concrete_target.getter}
    708709                        )
    709710                );
     
    20872088                                old->location,
    20882089                                GET_ACCEPT_1(arg, Expr),
    2089                                 castTarget
     2090                                castTarget,
     2091                                {old->concrete_target.field, old->concrete_target.getter}
    20902092                        )
    20912093                );
  • src/AST/Copy.hpp

    r8d8ac3b r25a1cb0  
    2121#include "Stmt.hpp"
    2222#include "Type.hpp"
     23#include <unordered_set>
     24#include <unordered_map>
    2325
    2426namespace ast {
  • src/AST/Expr.hpp

    r8d8ac3b r25a1cb0  
    312312public:
    313313        ptr<Expr> arg;
     314        struct Concrete {
     315                std::string field;
     316                std::string getter;
     317
     318                Concrete() = default;
     319                Concrete(const Concrete &) = default;
     320        };
    314321        ast::AggregateDecl::Aggregate target;
     322        Concrete concrete_target;
     323
    315324
    316325        KeywordCastExpr( const CodeLocation & loc, const Expr * a, ast::AggregateDecl::Aggregate t )
    317326        : Expr( loc ), arg( a ), target( t ) {}
     327
     328        KeywordCastExpr( const CodeLocation & loc, const Expr * a, ast::AggregateDecl::Aggregate t, const Concrete & ct )
     329        : Expr( loc ), arg( a ), target( t ), concrete_target( ct ) {}
    318330
    319331        /// Get a name for the target type
  • src/AST/Pass.hpp

    r8d8ac3b r25a1cb0  
    266266
    267267/// Keep track of the polymorphic const TypeSubstitution * env for the current expression
     268
     269/// marker to force shallow copies in pass visit
     270struct PureVisitor {};
     271
    268272struct WithConstTypeSubstitution {
    269273        const TypeSubstitution * env = nullptr;
  • src/AST/Pass.impl.hpp

    r8d8ac3b r25a1cb0  
    2121
    2222#include "AST/TypeSubstitution.hpp"
     23// #include "AST/Copy.hpp"
    2324
    2425#define VISIT_START( node ) \
     
    5758
    5859namespace ast {
     60        template<typename node_t>
     61        node_t * shallowCopy( const node_t * node );
     62
    5963        namespace __pass {
    6064                // Check if this is either a null pointer or a pointer to an empty container
     
    6266                static inline bool empty( T * ptr ) {
    6367                        return !ptr || ptr->empty();
     68                }
     69
     70                template< typename core_t, typename node_t >
     71                static inline node_t* mutate(const node_t *node) {
     72                        return std::is_base_of<PureVisitor, core_t>::value ? ::ast::shallowCopy(node) : ::ast::mutate(node);
    6473                }
    6574
     
    320329
    321330                if( __pass::differs(old_val, new_val) ) {
    322                         auto new_parent = mutate(parent);
     331                        // auto new_parent = mutate(parent);
     332                        auto new_parent = __pass::mutate<core_t>(parent);
    323333                        new_parent->*child = new_val;
    324334                        parent = new_parent;
     
    334344                        if ( node->forall.empty() ) return;
    335345
    336                         node_t * mut = mutate( node );
     346                        node_t * mut = __pass::mutate<core_t>( node );
    337347                        mut->forall = subs->clone( node->forall, *this );
    338348                        node = mut;
     
    894904
    895905                if(mutated) {
    896                         auto n = mutate(node);
     906                        auto n = __pass::mutate<core_t>(node);
    897907                        n->clauses = std::move( new_clauses );
    898908                        node = n;
     
    904914                        auto nval = call_accept( node->field ); \
    905915                        if(nval != node->field ) { \
    906                                 auto nparent = mutate(node); \
     916                                auto nparent = __pass::mutate<core_t>(node); \
    907917                                nparent->field = nval; \
    908918                                node = nparent; \
     
    16101620
    16111621                if(mutated) {
    1612                         auto n = mutate(node);
     1622                        auto n = __pass::mutate<core_t>(node);
    16131623                        n->associations = std::move( new_kids );
    16141624                        node = n;
     
    19401950                        }
    19411951                        if (mutated) {
    1942                                 auto new_node = mutate( node );
     1952                                auto new_node = __pass::mutate<core_t>( node );
    19431953                                new_node->typeEnv.swap( new_map );
    19441954                                node = new_node;
     
    19561966                        }
    19571967                        if (mutated) {
    1958                                 auto new_node = mutate( node );
     1968                                auto new_node = __pass::mutate<core_t>( node );
    19591969                                new_node->varEnv.swap( new_map );
    19601970                                node = new_node;
  • src/AST/Pass.proto.hpp

    r8d8ac3b r25a1cb0  
    2222template<typename core_t>
    2323class Pass;
     24
     25struct PureVisitor;
    2426
    2527namespace __pass {
  • src/AST/Print.cpp

    r8d8ac3b r25a1cb0  
    2121#include "Type.hpp"
    2222#include "TypeSubstitution.hpp"
     23#include "CompilationState.h"
    2324
    2425#include "Common/utility.h" // for group_iterate
     
    239240
    240241                if ( node->result ) {
    241                         os << endl << indent << "... with resolved type:" << endl;
    242                         ++indent;
    243                         os << indent;
    244                         node->result->accept( *this );
    245                         --indent;
     242                        if (!deterministic_output) {
     243                                os << endl << indent << "... with resolved type:" << endl;
     244                                ++indent;
     245                                os << indent;
     246                                node->result->accept( *this );
     247                                --indent;
     248                        }
    246249                }
    247250
  • src/AST/TypeSubstitution.hpp

    r8d8ac3b r25a1cb0  
    159159
    160160// definitition must happen after PassVisitor is included so that WithGuards can be used
    161 struct TypeSubstitution::Substituter : public WithGuards, public WithVisitorRef<Substituter> {
     161struct TypeSubstitution::Substituter : public WithGuards, public WithVisitorRef<Substituter>, public PureVisitor {
    162162                static size_t traceId;
    163163
     
    187187        assert( input );
    188188        Pass<Substituter> sub( *this, false );
    189         input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );
     189//      input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );
     190        input = strict_dynamic_cast< const SynTreeClass * >( input->accept( sub ) );
    190191        return { input, sub.core.subCount };
    191192}
     
    195196        assert( input );
    196197        Pass<Substituter> sub( *this, true );
    197         input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );
     198//      input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );
     199        input = strict_dynamic_cast< const SynTreeClass * >( input->accept( sub ) );
    198200        return { input, sub.core.subCount };
    199201}
  • src/AST/module.mk

    r8d8ac3b r25a1cb0  
    1717SRC_AST = \
    1818        AST/AssertAcyclic.cpp \
     19        AST/AssertAcyclic.hpp \
    1920        AST/Attribute.cpp \
     21        AST/Attribute.hpp \
     22        AST/Bitfield.hpp \
     23        AST/Chain.hpp \
    2024        AST/Convert.cpp \
     25        AST/Convert.hpp \
     26        AST/Copy.hpp \
     27        AST/CVQualifiers.hpp \
    2128        AST/Decl.cpp \
     29        AST/Decl.hpp \
    2230        AST/DeclReplacer.cpp \
     31        AST/DeclReplacer.hpp \
     32        AST/Eval.hpp \
    2333        AST/Expr.cpp \
     34        AST/Expr.hpp \
    2435        AST/ForallSubstitutionTable.cpp \
     36        AST/ForallSubstitutionTable.hpp \
     37        AST/ForallSubstitutor.hpp \
     38        AST/FunctionSpec.hpp \
     39        AST/Fwd.hpp \
    2540        AST/GenericSubstitution.cpp \
     41        AST/GenericSubstitution.hpp \
    2642        AST/Init.cpp \
     43        AST/Init.hpp \
     44        AST/Label.hpp \
    2745        AST/LinkageSpec.cpp \
     46        AST/LinkageSpec.hpp \
    2847        AST/Node.cpp \
     48        AST/Node.hpp \
     49        AST/ParseNode.hpp \
    2950        AST/Pass.cpp \
     51        AST/Pass.hpp \
     52        AST/Pass.impl.hpp \
     53        AST/Pass.proto.hpp \
    3054        AST/Print.cpp \
     55        AST/Print.hpp \
    3156        AST/Stmt.cpp \
     57        AST/Stmt.hpp \
     58        AST/StorageClasses.hpp \
    3259        AST/SymbolTable.cpp \
     60        AST/SymbolTable.hpp \
    3361        AST/Type.cpp \
     62        AST/Type.hpp \
    3463        AST/TypeEnvironment.cpp \
    35         AST/TypeSubstitution.cpp
     64        AST/TypeEnvironment.hpp \
     65        AST/TypeSubstitution.cpp \
     66        AST/TypeSubstitution.hpp \
     67        AST/Visitor.hpp
    3668
    3769SRC += $(SRC_AST)
  • src/CodeGen/module.mk

    r8d8ac3b r25a1cb0  
    2020SRC_CODEGEN = \
    2121        CodeGen/CodeGenerator.cc \
     22        CodeGen/CodeGenerator.h \
    2223        CodeGen/FixMain.cc \
     24        CodeGen/FixMain.h \
    2325        CodeGen/GenType.cc \
    24         CodeGen/OperatorTable.cc
     26        CodeGen/GenType.h \
     27        CodeGen/OperatorTable.cc \
     28        CodeGen/OperatorTable.h \
     29        CodeGen/Options.h
    2530
    26 SRC += $(SRC_CODEGEN) CodeGen/Generate.cc CodeGen/FixNames.cc
     31SRC += $(SRC_CODEGEN) CodeGen/Generate.cc CodeGen/Generate.h CodeGen/FixNames.cc CodeGen/FixNames.h
    2732SRCDEMANGLE += $(SRC_CODEGEN)
  • src/CodeTools/module.mk

    r8d8ac3b r25a1cb0  
    1515###############################################################################
    1616
    17 SRC += CodeTools/DeclStats.cc \
     17SRC += \
     18        CodeTools/DeclStats.cc \
     19        CodeTools/DeclStats.h \
    1820        CodeTools/ResolvProtoDump.cc \
    19         CodeTools/TrackLoc.cc
     21        CodeTools/ResolvProtoDump.h \
     22        CodeTools/TrackLoc.cc \
     23        CodeTools/TrackLoc.h
  • src/Common/module.mk

    r8d8ac3b r25a1cb0  
    1717SRC_COMMON = \
    1818      Common/Assert.cc \
     19      Common/CodeLocation.h \
     20      Common/CompilerError.h \
     21      Common/Debug.h \
     22      Common/ErrorObjects.h \
    1923      Common/Eval.cc \
     24      Common/FilterCombos.h \
     25      Common/Indenter.h \
    2026      Common/PassVisitor.cc \
     27      Common/PassVisitor.h \
     28      Common/PassVisitor.impl.h \
     29      Common/PassVisitor.proto.h \
     30      Common/PersistentMap.h \
     31      Common/ScopedMap.h \
    2132      Common/SemanticError.cc \
     33      Common/SemanticError.h \
     34      Common/Stats.h \
     35      Common/Stats/Base.h \
    2236      Common/Stats/Counter.cc \
     37      Common/Stats/Counter.h \
    2338      Common/Stats/Heap.cc \
     39      Common/Stats/Heap.h \
    2440      Common/Stats/Stats.cc \
    2541      Common/Stats/Time.cc \
    26       Common/UniqueName.cc
     42      Common/Stats/Time.h \
     43      Common/UnimplementedError.h \
     44      Common/UniqueName.cc \
     45      Common/UniqueName.h \
     46      Common/utility.h \
     47      Common/VectorMap.h
    2748
    2849SRC += $(SRC_COMMON) Common/DebugMalloc.cc
  • src/Concurrency/module.mk

    r8d8ac3b r25a1cb0  
    1515###############################################################################
    1616
    17 SRC += Concurrency/Keywords.cc Concurrency/Waitfor.cc
     17SRC += Concurrency/Keywords.cc Concurrency/Keywords.h Concurrency/Waitfor.cc Concurrency/Waitfor.h
    1818SRCDEMANGLE += Concurrency/Keywords.cc
    1919
  • src/ControlStruct/module.mk

    r8d8ac3b r25a1cb0  
    1717SRC_CONTROLSTRUCT = \
    1818        ControlStruct/ForExprMutator.cc \
     19        ControlStruct/ForExprMutator.h \
    1920        ControlStruct/LabelFixer.cc \
     21        ControlStruct/LabelFixer.h \
    2022        ControlStruct/LabelGenerator.cc \
     23        ControlStruct/LabelGenerator.h \
    2124        ControlStruct/MLEMutator.cc \
    22         ControlStruct/Mutate.cc
     25        ControlStruct/MLEMutator.h \
     26        ControlStruct/Mutate.cc \
     27        ControlStruct/Mutate.h
    2328
    24 SRC += $(SRC_CONTROLSTRUCT) ControlStruct/ExceptTranslate.cc
     29SRC += $(SRC_CONTROLSTRUCT) ControlStruct/ExceptTranslate.cc ControlStruct/ExceptTranslate.h
    2530SRCDEMANGLE += $(SRC_CONTROLSTRUCT)
    2631
  • src/GenPoly/module.mk

    r8d8ac3b r25a1cb0  
    1616
    1717SRC += GenPoly/Box.cc \
     18       GenPoly/Box.h \
     19       GenPoly/ErasableScopedMap.h \
     20       GenPoly/FindFunction.cc \
     21       GenPoly/FindFunction.h \
    1822       GenPoly/GenPoly.cc \
     23       GenPoly/GenPoly.h \
     24       GenPoly/InstantiateGeneric.cc \
     25       GenPoly/InstantiateGeneric.h \
     26       GenPoly/Lvalue.cc \
     27       GenPoly/Lvalue.h \
     28       GenPoly/ScopedSet.h \
    1929       GenPoly/ScrubTyVars.cc \
    20        GenPoly/Lvalue.cc \
     30       GenPoly/ScrubTyVars.h \
    2131       GenPoly/Specialize.cc \
    22        GenPoly/FindFunction.cc \
    23        GenPoly/InstantiateGeneric.cc
     32       GenPoly/Specialize.h
    2433
    25 SRCDEMANGLE += GenPoly/GenPoly.cc GenPoly/Lvalue.cc
     34SRCDEMANGLE += GenPoly/GenPoly.cc GenPoly/GenPoly.h GenPoly/Lvalue.cc GenPoly/Lvalue.h
    2635
  • src/InitTweak/module.mk

    r8d8ac3b r25a1cb0  
    1515###############################################################################
    1616
    17 SRC += InitTweak/GenInit.cc \
     17SRC += \
     18        InitTweak/FixGlobalInit.cc \
     19        InitTweak/FixGlobalInit.h \
    1820        InitTweak/FixInit.cc \
    19         InitTweak/FixGlobalInit.cc \
    20         InitTweak/InitTweak.cc
     21        InitTweak/FixInit.h \
     22        InitTweak/GenInit.cc \
     23        InitTweak/GenInit.h \
     24        InitTweak/InitTweak.cc \
     25        InitTweak/InitTweak.h
    2126
    22 SRCDEMANGLE += InitTweak/GenInit.cc \
    23         InitTweak/InitTweak.cc
     27SRCDEMANGLE += \
     28        InitTweak/GenInit.cc \
     29        InitTweak/GenInit.h \
     30        InitTweak/InitTweak.cc \
     31        InitTweak/InitTweak.h
    2432
  • src/Makefile.am

    r8d8ac3b r25a1cb0  
    2020
    2121SRC = main.cc \
     22      CompilationState.cc \
     23      CompilationState.h \
    2224      MakeLibCfa.cc \
    23       CompilationState.cc
     25        MakeLibCfa.h
    2426
    2527SRCDEMANGLE = CompilationState.cc
     
    6668___driver_cfa_cpp_SOURCES = $(SRC)
    6769___driver_cfa_cpp_LDADD = -ldl $(LIBPROFILER) $(LIBTCMALLOC)
     70EXTRA_DIST = include/cassert include/optional BasicTypes-gen.cc
    6871
    6972AM_CXXFLAGS = @HOST_FLAGS@ -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I$(srcdir)/Parser -I$(srcdir)/include -DYY_NO_INPUT -O3 -g -std=c++14 $(TCMALLOCFLAG)
  • src/Parser/module.mk

    r8d8ac3b r25a1cb0  
    2323       Parser/ExpressionNode.cc \
    2424       Parser/InitializerNode.cc \
     25       Parser/lex.ll \
    2526       Parser/ParseNode.cc \
     27       Parser/ParseNode.h \
     28       Parser/parser.yy \
     29       Parser/ParserTypes.h \
     30       Parser/parserutility.cc \
     31       Parser/parserutility.h \
    2632       Parser/StatementNode.cc \
    2733       Parser/TypeData.cc \
     34       Parser/TypeData.h \
    2835       Parser/TypedefTable.cc \
    29        Parser/lex.ll \
    30        Parser/parser.yy \
    31        Parser/parserutility.cc
     36       Parser/TypedefTable.h
    3237
    3338MOSTLYCLEANFILES += Parser/lex.cc Parser/parser.cc Parser/parser.hh Parser/parser.output
  • src/ResolvExpr/CandidateFinder.cpp

    r8d8ac3b r25a1cb0  
    10891089                }
    10901090
     1091                void postvisit( const ast::KeywordCastExpr * castExpr ) {
     1092                        const auto & loc = castExpr->location;
     1093                        assertf( castExpr->result, "Cast target should have been set in Validate." );
     1094                        auto ref = castExpr->result.strict_as<ast::ReferenceType>();
     1095                        auto inst = ref->base.strict_as<ast::StructInstType>();
     1096                        auto target = inst->base.get();
     1097
     1098                        CandidateFinder finder{ symtab, tenv };
     1099
     1100                        auto pick_alternatives = [target, this](CandidateList & found, bool expect_ref) {
     1101                                for(auto & cand : found) {
     1102                                        const ast::Type * expr = cand->expr->result.get();
     1103                                        if(expect_ref) {
     1104                                                auto res = dynamic_cast<const ast::ReferenceType*>(expr);
     1105                                                if(!res) { continue; }
     1106                                                expr = res->base.get();
     1107                                        }
     1108
     1109                                        if(auto insttype = dynamic_cast<const ast::TypeInstType*>(expr)) {
     1110                                                auto td = cand->env.lookup(insttype->name);
     1111                                                if(!td) { continue; }
     1112                                                expr = td->bound.get();
     1113                                        }
     1114
     1115                                        if(auto base = dynamic_cast<const ast::StructInstType*>(expr)) {
     1116                                                if(base->base == target) {
     1117                                                        candidates.push_back( std::move(cand) );
     1118                                                        reason.code = NoReason;
     1119                                                }
     1120                                        }
     1121                                }
     1122                        };
     1123
     1124                        try {
     1125                                // Attempt 1 : turn (thread&)X into ($thread&)X.__thrd
     1126                                // Clone is purely for memory management
     1127                                std::unique_ptr<const ast::Expr> tech1 { new ast::UntypedMemberExpr(loc, new ast::NameExpr(loc, castExpr->concrete_target.field), castExpr->arg) };
     1128
     1129                                // don't prune here, since it's guaranteed all alternatives will have the same type
     1130                                finder.find( tech1.get(), ResolvMode::withoutPrune() );
     1131                                pick_alternatives(finder.candidates, false);
     1132
     1133                                return;
     1134                        } catch(SemanticErrorException & ) {}
     1135
     1136                        // Fallback : turn (thread&)X into ($thread&)get_thread(X)
     1137                        std::unique_ptr<const ast::Expr> fallback { ast::UntypedExpr::createDeref(loc,  new ast::UntypedExpr(loc, new ast::NameExpr(loc, castExpr->concrete_target.getter), { castExpr->arg })) };
     1138                        // don't prune here, since it's guaranteed all alternatives will have the same type
     1139                        finder.find( fallback.get(), ResolvMode::withoutPrune() );
     1140
     1141                        pick_alternatives(finder.candidates, true);
     1142
     1143                        // Whatever happens here, we have no more fallbacks
     1144                }
     1145
    10911146                void postvisit( const ast::UntypedMemberExpr * memberExpr ) {
    10921147                        CandidateFinder aggFinder{ symtab, tenv };
  • src/ResolvExpr/Unify.cc

    r8d8ac3b r25a1cb0  
    767767                /// If this isn't done when satifying ttype assertions, then argument lists can have
    768768                /// different size and structure when they should be compatible.
    769                 struct TtypeExpander_new : public ast::WithShortCircuiting {
     769                struct TtypeExpander_new : public ast::WithShortCircuiting, public ast::PureVisitor {
    770770                        ast::TypeEnvironment & tenv;
    771771
     
    793793                                // TtypeExpander pass is impure (may mutate nodes in place)
    794794                                // need to make nodes shared to prevent accidental mutation
    795                                 ast::ptr<ast::DeclWithType> dc = d;
    796                                 dc = dc->accept( expander );
     795                                ast::ptr<ast::DeclWithType> dc = d->accept(expander);
    797796                                auto types = flatten( dc->get_type() );
    798797                                for ( ast::ptr< ast::Type > & t : types ) {
     
    11141113                        ast::Pass<TtypeExpander_new> expander{ tenv };
    11151114
    1116                         ast::ptr<ast::TupleType> tuplec = tuple;
    1117                         ast::ptr<ast::TupleType> tuple2c = tuple2;
    1118                         const ast::Type * flat = tuplec->accept( expander );
    1119                         const ast::Type * flat2 = tuple2c->accept( expander );
     1115                        // ast::ptr<ast::TupleType> tuplec = tuple;
     1116                        // ast::ptr<ast::TupleType> tuple2c = tuple2;
     1117                        const ast::Type * flat = tuple->accept( expander );
     1118                        const ast::Type * flat2 = tuple2->accept( expander );
    11201119
    11211120                        auto types = flatten( flat );
  • src/ResolvExpr/module.mk

    r8d8ac3b r25a1cb0  
    1919      ResolvExpr/Alternative.cc \
    2020      ResolvExpr/AlternativeFinder.cc \
     21      ResolvExpr/AlternativeFinder.h \
     22      ResolvExpr/Alternative.h \
    2123      ResolvExpr/Candidate.cpp \
    2224      ResolvExpr/CandidateFinder.cpp \
     25      ResolvExpr/CandidateFinder.hpp \
     26      ResolvExpr/Candidate.hpp \
    2327      ResolvExpr/CastCost.cc \
    2428      ResolvExpr/CommonType.cc \
    2529      ResolvExpr/ConversionCost.cc \
     30      ResolvExpr/ConversionCost.h \
     31      ResolvExpr/Cost.h \
    2632      ResolvExpr/CurrentObject.cc \
     33      ResolvExpr/CurrentObject.h \
    2734      ResolvExpr/ExplodedActual.cc \
     35      ResolvExpr/ExplodedActual.h \
    2836      ResolvExpr/ExplodedArg.cpp \
     37      ResolvExpr/ExplodedArg.hpp \
    2938      ResolvExpr/FindOpenVars.cc \
     39      ResolvExpr/FindOpenVars.h \
    3040      ResolvExpr/Occurs.cc \
    3141      ResolvExpr/PolyCost.cc \
     
    3343      ResolvExpr/PtrsCastable.cc \
    3444      ResolvExpr/RenameVars.cc \
     45      ResolvExpr/RenameVars.h \
    3546      ResolvExpr/ResolveAssertions.cc \
     47      ResolvExpr/ResolveAssertions.h \
    3648      ResolvExpr/Resolver.cc \
     49      ResolvExpr/Resolver.h \
    3750      ResolvExpr/ResolveTypeof.cc \
     51      ResolvExpr/ResolveTypeof.h \
     52      ResolvExpr/ResolvMode.h \
    3853      ResolvExpr/SatisfyAssertions.cpp \
     54      ResolvExpr/SatisfyAssertions.hpp \
    3955      ResolvExpr/SpecCost.cc \
    4056      ResolvExpr/TypeEnvironment.cc \
    41       ResolvExpr/Unify.cc
     57      ResolvExpr/TypeEnvironment.h \
     58      ResolvExpr/typeops.h \
     59      ResolvExpr/Unify.cc \
     60      ResolvExpr/Unify.h \
     61      ResolvExpr/WidenMode.h
    4262
    43 SRC += $(SRC_RESOLVEXPR) ResolvExpr/AlternativePrinter.cc
     63
     64SRC += $(SRC_RESOLVEXPR) ResolvExpr/AlternativePrinter.cc ResolvExpr/AlternativePrinter.h
    4465SRCDEMANGLE += $(SRC_RESOLVEXPR)
  • src/SymTab/module.mk

    r8d8ac3b r25a1cb0  
    1717SRC_SYMTAB = \
    1818      SymTab/Autogen.cc \
     19      SymTab/Autogen.h \
    1920      SymTab/FixFunction.cc \
     21      SymTab/FixFunction.h \
    2022      SymTab/Indexer.cc \
     23      SymTab/Indexer.h \
    2124      SymTab/Mangler.cc \
    2225      SymTab/ManglerCommon.cc \
    23       SymTab/Validate.cc
     26      SymTab/Mangler.h \
     27      SymTab/Validate.cc \
     28      SymTab/Validate.h
    2429
    2530SRC += $(SRC_SYMTAB)
  • src/SynTree/Expression.cc

    r8d8ac3b r25a1cb0  
    3030#include "Type.h"                    // for Type, BasicType, Type::Qualifiers
    3131#include "TypeSubstitution.h"        // for TypeSubstitution
     32#include "CompilationState.h"        // for deterministic_output
    3233
    3334#include "GenPoly/Lvalue.h"
     
    7172
    7273        if ( result ) {
    73                 os << std::endl << indent << "with resolved type:" << std::endl;
    74                 os << (indent+1);
    75                 result->print( os, indent+1 );
     74                if (!deterministic_output) {
     75                        os << std::endl << indent << "with resolved type:" << std::endl;
     76                        os << (indent+1);
     77                        result->print( os, indent+1 );
     78                }
    7679        }
    7780
     
    299302}
    300303
    301 KeywordCastExpr::KeywordCastExpr( Expression * arg, AggregateDecl::Aggregate target ) : Expression(), arg(arg), target( target ) {
    302 }
    303 
    304 KeywordCastExpr::KeywordCastExpr( const KeywordCastExpr & other ) : Expression( other ), arg( maybeClone( other.arg ) ), target( other.target ) {
    305 }
     304KeywordCastExpr::KeywordCastExpr( Expression * arg, AggregateDecl::Aggregate target ) : Expression(), arg(arg), target( target ) {}
     305KeywordCastExpr::KeywordCastExpr( Expression * arg, AggregateDecl::Aggregate target, const KeywordCastExpr::Concrete & concrete_target ) : Expression(), arg(arg), target( target ), concrete_target(concrete_target) {}
     306
     307KeywordCastExpr::KeywordCastExpr( const KeywordCastExpr & other ) : Expression( other ), arg( maybeClone( other.arg ) ), target( other.target ) {}
    306308
    307309KeywordCastExpr::~KeywordCastExpr() {
  • src/SynTree/Expression.h

    r8d8ac3b r25a1cb0  
    248248
    249249        KeywordCastExpr( Expression * arg, AggregateDecl::Aggregate target );
     250        KeywordCastExpr( Expression * arg, AggregateDecl::Aggregate target, const Concrete & concrete_target );
    250251        KeywordCastExpr( const KeywordCastExpr & other );
    251252        virtual ~KeywordCastExpr();
  • src/SynTree/module.mk

    r8d8ac3b r25a1cb0  
    2020      SynTree/ApplicationExpr.cc \
    2121      SynTree/ArrayType.cc \
     22      SynTree/Attribute.cc \
     23      SynTree/Attribute.h \
    2224      SynTree/AttrType.cc \
    23       SynTree/Attribute.cc \
     25      SynTree/BaseSyntaxNode.h \
    2426      SynTree/BasicType.cc \
    2527      SynTree/CommaExpr.cc \
    2628      SynTree/CompoundStmt.cc \
    2729      SynTree/Constant.cc \
     30      SynTree/Constant.h \
     31      SynTree/Declaration.cc \
     32      SynTree/Declaration.h \
     33      SynTree/DeclarationWithType.cc \
    2834      SynTree/DeclReplacer.cc \
     35      SynTree/DeclReplacer.h \
    2936      SynTree/DeclStmt.cc \
    30       SynTree/Declaration.cc \
    31       SynTree/DeclarationWithType.cc \
    3237      SynTree/Expression.cc \
     38      SynTree/Expression.h \
    3339      SynTree/FunctionDecl.cc \
    3440      SynTree/FunctionType.cc \
    3541      SynTree/Initializer.cc \
     42      SynTree/Initializer.h \
     43      SynTree/Label.h \
    3644      SynTree/LinkageSpec.cc \
     45      SynTree/LinkageSpec.h \
     46      SynTree/Mutator.h \
    3747      SynTree/NamedTypeDecl.cc \
    3848      SynTree/ObjectDecl.cc \
     
    4151      SynTree/ReferenceType.cc \
    4252      SynTree/Statement.cc \
     53      SynTree/Statement.h \
     54      SynTree/SynTree.h \
    4355      SynTree/TupleExpr.cc \
    4456      SynTree/TupleType.cc \
     
    4658      SynTree/TypeDecl.cc \
    4759      SynTree/TypeExpr.cc \
     60      SynTree/Type.h \
     61      SynTree/TypeofType.cc \
    4862      SynTree/TypeSubstitution.cc \
    49       SynTree/TypeofType.cc \
     63      SynTree/TypeSubstitution.h \
    5064      SynTree/VarArgsType.cc \
     65      SynTree/Visitor.h \
    5166      SynTree/VoidType.cc \
    5267      SynTree/ZeroOneType.cc
  • src/Tuples/module.mk

    r8d8ac3b r25a1cb0  
    1515###############################################################################
    1616
    17 SRC += Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc Tuples/Explode.cc \
    18         Tuples/Tuples.cc
    19 SRCDEMANGLE += Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc Tuples/Explode.cc \
    20         Tuples/Tuples.cc
     17SRC_TUPLES = \
     18        Tuples/Explode.cc \
     19        Tuples/Explode.h \
     20        Tuples/TupleAssignment.cc \
     21        Tuples/TupleExpansion.cc \
     22        Tuples/Tuples.cc \
     23        Tuples/Tuples.h
     24
     25
     26SRC += $(SRC_TUPLES)
     27SRCDEMANGLE += $(SRC_TUPLES)
  • src/Validate/module.mk

    r8d8ac3b r25a1cb0  
    1515###############################################################################
    1616
    17 SRC += Validate/HandleAttributes.cc Validate/FindSpecialDecls.cc
    18 SRCDEMANGLE += Validate/HandleAttributes.cc Validate/FindSpecialDecls.cc
     17SRC += Validate/HandleAttributes.cc Validate/HandleAttributes.h Validate/FindSpecialDecls.cc Validate/FindSpecialDecls.h
     18SRCDEMANGLE += Validate/HandleAttributes.cc Validate/HandleAttributes.h Validate/FindSpecialDecls.cc Validate/FindSpecialDecls.h
  • src/Virtual/module.mk

    r8d8ac3b r25a1cb0  
    1515###############################################################################
    1616
    17 SRC += Virtual/ExpandCasts.cc
     17SRC += Virtual/ExpandCasts.cc Virtual/ExpandCasts.h
Note: See TracChangeset for help on using the changeset viewer.