Changeset c54b0b4


Ignore:
Timestamp:
Mar 14, 2017, 11:09:16 AM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
64adb03
Parents:
3ad7978
Message:

Added isMutex qualifier

Location:
src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Autogen.h

    r3ad7978 rc54b0b4  
    5858                        assert( type );
    5959                        Type * castType = type->clone();
    60                         castType->get_qualifiers() -= Type::Qualifiers(true, true, true, false, true);
     60                        castType->get_qualifiers() -= Type::Qualifiers(true, true, true, false, true, false);
    6161                        castType->set_isLvalue( true ); // xxx - might not need this
    6262                        dstParam = new CastExpr( dstParam, new PointerType( Type::Qualifiers(), castType ) );
  • src/SymTab/Validate.cc

    r3ad7978 rc54b0b4  
    323323                        ObjectDecl * obj = dynamic_cast< ObjectDecl * >( *i );
    324324                        assert( obj );
    325                         obj->set_type( new EnumInstType( Type::Qualifiers( true, false, false, false, false ), enumDecl->get_name() ) );
     325                        obj->set_type( new EnumInstType( Type::Qualifiers( true, false, false, false, false, false ), enumDecl->get_name() ) );
    326326                } // for
    327327                Parent::visit( enumDecl );
  • src/SynTree/Type.h

    r3ad7978 rc54b0b4  
    2525  public:
    2626        struct Qualifiers {
    27                 Qualifiers(): isConst( false ), isVolatile( false ), isRestrict( false ), isLvalue( false ), isAtomic( false ) {}
    28                 Qualifiers( bool isConst, bool isVolatile, bool isRestrict, bool isLvalue, bool isAtomic ): isConst( isConst ), isVolatile( isVolatile ), isRestrict( isRestrict ), isLvalue( isLvalue ), isAtomic( isAtomic ) {}
     27                Qualifiers(): isConst( false ), isVolatile( false ), isRestrict( false ), isLvalue( false ), isAtomic( false ), isMutex( false ) {}
     28                Qualifiers( bool isConst, bool isVolatile, bool isRestrict, bool isLvalue, bool isAtomic, bool isMutex ): isConst( isConst ), isVolatile( isVolatile ), isRestrict( isRestrict ), isLvalue( isLvalue ), isAtomic( isAtomic ), isMutex( isMutex ) {}
    2929
    3030                Qualifiers &operator&=( const Qualifiers &other );
     
    4545                bool isLvalue;
    4646                bool isAtomic;
     47                bool isMutex;
    4748        };
    4849
     
    511512        isLvalue &= other.isLvalue;
    512513        isAtomic &= other.isAtomic;
     514        isMutex &= other.isMutex;
    513515        return *this;
    514516}
     
    520522        isLvalue |= other.isLvalue;
    521523        isAtomic |= other.isAtomic;
     524        isMutex |= other.isMutex;
    522525        return *this;
    523526}
     
    528531        if ( other.isRestrict ) isRestrict = 0;
    529532        if ( other.isAtomic ) isAtomic = 0;
     533        if ( other.isMutex ) isMutex = 0;
    530534        return *this;
    531535}
  • src/Tuples/TupleAssignment.cc

    r3ad7978 rc54b0b4  
    199199                                Type * type = InitTweak::getPointerBase( castType );
    200200                                assert( type );
    201                                 type->get_qualifiers() -= Type::Qualifiers(true, true, true, false, true);
     201                                type->get_qualifiers() -= Type::Qualifiers(true, true, true, false, true, false);
    202202                                type->set_isLvalue( true ); // xxx - might not need this
    203203                                expr = new CastExpr( expr, castType );
  • src/Tuples/TupleExpansion.cc

    r3ad7978 rc54b0b4  
    305305        Type * makeTupleType( const std::list< Expression * > & exprs ) {
    306306                // produce the TupleType which aggregates the types of the exprs
    307                 TupleType *tupleType = new TupleType( Type::Qualifiers(true, true, true, true, true) );
     307                TupleType *tupleType = new TupleType( Type::Qualifiers(true, true, true, true, true, true) );
    308308                Type::Qualifiers &qualifiers = tupleType->get_qualifiers();
    309309                for ( Expression * expr : exprs ) {
Note: See TracChangeset for help on using the changeset viewer.