Changeset ac1ed49 for src/SynTree


Ignore:
Timestamp:
Feb 25, 2016, 5:14:15 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
33e6a2cc, 90c3b1c, c14cff1
Parents:
41a2620 (diff), 44b7088 (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:/u/cforall/software/cfa/cfa-cc

Location:
src/SynTree
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Mutator.cc

    r41a2620 rac1ed49  
    421421}
    422422
     423Type *Mutator::mutate( VarArgsType *varArgsType ) {
     424        mutateAll( varArgsType->get_forall(), *this );
     425        return varArgsType;
     426}
     427
    423428Initializer *Mutator::mutate( SingleInit *singleInit ) {
    424429        singleInit->set_value( singleInit->get_value()->acceptMutator( *this ) );
  • src/SynTree/Mutator.h

    r41a2620 rac1ed49  
    9090        virtual Type* mutate( TypeofType *typeofType );
    9191        virtual Type* mutate( AttrType *attrType );
     92        virtual Type* mutate( VarArgsType *varArgsType );
    9293
    9394        virtual Initializer* mutate( SingleInit *singleInit );
  • src/SynTree/SynTree.h

    r41a2620 rac1ed49  
    9797class TypeofType;
    9898class AttrType;
     99class VarArgsType;
    99100
    100101class Initializer;
  • src/SynTree/Type.h

    r41a2620 rac1ed49  
    400400};
    401401
     402/// Represents the GCC built-in varargs type
     403class VarArgsType : public Type {
     404        VarArgsType();
     405
     406        virtual VarArgsType *clone() const { return new VarArgsType( *this ); }
     407        virtual void accept( Visitor &v ) { v.visit( this ); }
     408        virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     409        virtual void print( std::ostream &os, int indent = 0 ) const;
     410};
     411
    402412inline Type::Qualifiers &Type::Qualifiers::operator+=( const Type::Qualifiers &other ) {
    403413        isConst |= other.isConst;
  • src/SynTree/TypeSubstitution.cc

    r41a2620 rac1ed49  
    198198}
    199199
     200Type * TypeSubstitution::mutate( VarArgsType *varArgsType ) {
     201        return handleType( varArgsType );
     202}
     203
    200204void TypeSubstitution::print( std::ostream &os, int indent ) const {
    201205        os << std::string( indent, ' ' ) << "Types:" << std::endl;
  • src/SynTree/TypeSubstitution.h

    r41a2620 rac1ed49  
    7474        virtual Type* mutate(ContextInstType *aggregateUseType);
    7575        virtual Type* mutate(TupleType *tupleType);
     76        virtual Type* mutate(VarArgsType *varArgsType);
    7677       
    7778        // TODO: worry about traversing into a forall-qualified function type or type decl with assertions
  • src/SynTree/Visitor.cc

    r41a2620 rac1ed49  
    355355}
    356356
     357void Visitor::visit( VarArgsType *varArgsType ) {
     358        acceptAll( varArgsType->get_forall(), *this );
     359}
     360
    357361void Visitor::visit( SingleInit *singleInit ) {
    358362        singleInit->get_value()->accept( *this );
  • src/SynTree/Visitor.h

    r41a2620 rac1ed49  
    9090        virtual void visit( TypeofType *typeofType );
    9191        virtual void visit( AttrType *attrType );
     92        virtual void visit( VarArgsType *varArgsType );
    9293
    9394        virtual void visit( SingleInit *singleInit );
  • src/SynTree/module.mk

    r41a2620 rac1ed49  
    2525       SynTree/TypeofType.cc \
    2626       SynTree/AttrType.cc \
     27       SynTree/VarArgsType.cc \
    2728       SynTree/Constant.cc \
    2829       SynTree/Expression.cc \
Note: See TracChangeset for help on using the changeset viewer.